SShortSingh.
Back to feed

Developer builds crash-safe state machine to fix AI publishing pipeline failures

0
·1 views

A software developer shared how their AI agent repeatedly created duplicate article drafts after crashing mid-pipeline, with no mechanism to track progress between runs. The root cause was that each pipeline step assumed the previous one had succeeded, leaving no shared state or recovery path after failures. To fix this, the developer implemented a state machine that splits the pipeline into discrete phases, each tied to a unique run ID and a manifest file written to disk before and after every step. This design ensures that if the process crashes, the next run can resume from the exact phase where it left off rather than starting over. The pattern reportedly completed 50 consecutive runs without producing duplicate drafts or orphaned files.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Spec-Driven Development With AI Agents: How Checkpoints and Handoffs Tame Long Features

AI coding agents perform well on small, scoped tasks but struggle with large, multi-day features due to context window limits, lost session history, and unmanageable code diffs. A structured workflow built around a constitution, a frozen spec-driven plan, and explicit checkpoints addresses these as process failures rather than model shortcomings. The agent works through small, review-sized groups of tasks at a time, stopping at each checkpoint to pass automated gates and document any deviations from the plan. A two-stage review follows, where a separate reviewer agent first receives a written brief from the coding agent before analyzing the diff, keeping each review to a few hundred lines of coherent changes. This approach keeps complexity bounded, catches drift early, and ensures that a 'done' status is backed by verifiable evidence rather than an agent's unreviewed output.

0
ProgrammingDEV Community ·

Benin Engineer Builds Software to Automate Building Energy Audit PDF Reports

Dr. Sunny, CEO of BTECE, an engineering and technology firm based in Benin, has developed a building energy audit software aimed at replacing manual, spreadsheet-based audit workflows. The tool allows energy professionals to assess electrical equipment, lighting, HVAC systems, and energy performance indicators within a single platform. Its standout feature is the automatic generation of professional PDF reports, complete with executive summaries, equipment inventories, inefficiency findings, and improvement recommendations. The software is designed to reduce time, minimize errors, and improve consistency in energy reporting for organizations. Future updates planned by the developer include AI-powered recommendations, cloud deployment, mobile integration, and multi-building management capabilities.

0
ProgrammingDEV Community ·

ChatGPT Calendar Tools Enable Custom Briefings, But No Family Podcast Feature Confirmed

ChatGPT supports calendar integrations via Microsoft Outlook and Google Calendar, allowing the AI to read and act on scheduled events. These connections make it technically feasible for users to generate personalized daily briefings grounded in their calendar data. However, OpenAI has not announced any built-in feature that automatically creates or delivers a family-oriented audio podcast each morning. The idea of a kid-friendly school-run briefing drawn from family calendars is a plausible user-built workflow, not a packaged product. Turning calendar access into a fully automated personal audio experience would require additional product decisions around voice output, scheduling, and audience controls that OpenAI has not confirmed.

Developer builds crash-safe state machine to fix AI publishing pipeline failures · ShortSingh