fix: persist pipeline state to disk and restore on server restart#1585
Merged
OneStepAt4time merged 1 commit intodevelopfrom Apr 10, 2026
Merged
fix: persist pipeline state to disk and restore on server restart#1585OneStepAt4time merged 1 commit intodevelopfrom
OneStepAt4time merged 1 commit intodevelopfrom
Conversation
) - Delete pipelines.json when no running pipelines remain (was leaking stale file, causing hydrate() to restore completed/failed entries) - Persist after advancePipeline transitions pipeline to completed/failed (was only persisting at stage-level transitions) - Pass stateDir to PipelineManager constructor instead of relying on hydrate() to set it (removes fragile ordering dependency) - Replace dynamic import('node:fs/promises').unlink with static import - Add 10 tests covering persist, hydrate, orphan detection, and edge cases Closes #1424 Generated by Hephaestus (Aegis dev agent)
Owner
Author
OneStepAt4time
pushed a commit
that referenced
this pull request
Apr 10, 2026
…1583) Remove all documentation references to deleted features (PR #1583). REMOVED FEATURES: - Consensus Review endpoints (/v1/sessions/:id/consensus, /v1/consensus/:id) - Model Router config and tiered routing FILES CHANGED: - README.md: Remove consensus/model router from features list - docs/advanced.md: Remove Consensus Review section - docs/api-reference.md: Remove consensus endpoints; remove consensus.completed SSE event - docs/architecture.md: Remove consensus.ts and model-router.ts from module overview - docs/getting-started.md: Update advanced features reference - docs/enterprise.md: Remove modelRouter from config example - docs/enterprise/01-architecture.md: Remove consensus/model-router; mark findings RESOLVED - docs/enterprise/03-testing-observability.md: Remove model-router.ts from thin-tests list - docs/enterprise/05-enterprise-roadmap.md: Remove E4-1 (consensus); update M-E4 scope - docs/enterprise/index.md: Remove consensus reliability finding RESOLVED IN v0.3.3: - P-3 (PipelineManager persistence): PR #1585 - P-1 (Pipeline stage timeout): PR #1606 - CON-1 (Consensus): PR #1583 (feature removed) NOTE: openapi.yaml still contains /consensus endpoints — separate update needed.
This was referenced Apr 10, 2026
OneStepAt4time
pushed a commit
that referenced
this pull request
Apr 12, 2026
…1583) Remove all documentation references to deleted features (PR #1583). REMOVED FEATURES: - Consensus Review endpoints (/v1/sessions/:id/consensus, /v1/consensus/:id) - Model Router config and tiered routing FILES CHANGED: - README.md: Remove consensus/model router from features list - docs/advanced.md: Remove Consensus Review section - docs/api-reference.md: Remove consensus endpoints; remove consensus.completed SSE event - docs/architecture.md: Remove consensus.ts and model-router.ts from module overview - docs/getting-started.md: Update advanced features reference - docs/enterprise.md: Remove modelRouter from config example - docs/enterprise/01-architecture.md: Remove consensus/model-router; mark findings RESOLVED - docs/enterprise/03-testing-observability.md: Remove model-router.ts from thin-tests list - docs/enterprise/05-enterprise-roadmap.md: Remove E4-1 (consensus); update M-E4 scope - docs/enterprise/index.md: Remove consensus reliability finding RESOLVED IN v0.3.3: - P-3 (PipelineManager persistence): PR #1585 - P-1 (Pipeline stage timeout): PR #1606 - CON-1 (Consensus): PR #1583 (feature removed) NOTE: openapi.yaml still contains /consensus endpoints — separate update needed.
OneStepAt4time
added a commit
that referenced
this pull request
Apr 12, 2026
…1583) (#1709) Remove all documentation references to deleted features (PR #1583). REMOVED FEATURES: - Consensus Review endpoints (/v1/sessions/:id/consensus, /v1/consensus/:id) - Model Router config and tiered routing FILES CHANGED: - README.md: Remove consensus/model router from features list - docs/advanced.md: Remove Consensus Review section - docs/api-reference.md: Remove consensus endpoints; remove consensus.completed SSE event - docs/architecture.md: Remove consensus.ts and model-router.ts from module overview - docs/getting-started.md: Update advanced features reference - docs/enterprise.md: Remove modelRouter from config example - docs/enterprise/01-architecture.md: Remove consensus/model-router; mark findings RESOLVED - docs/enterprise/03-testing-observability.md: Remove model-router.ts from thin-tests list - docs/enterprise/05-enterprise-roadmap.md: Remove E4-1 (consensus); update M-E4 scope - docs/enterprise/index.md: Remove consensus reliability finding RESOLVED IN v0.3.3: - P-3 (PipelineManager persistence): PR #1585 - P-1 (Pipeline stage timeout): PR #1606 - CON-1 (Consensus): PR #1583 (feature removed) NOTE: openapi.yaml still contains /consensus endpoints — separate update needed. Co-authored-by: Argus <argus@openclaw.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pipelines.jsonbut the implementation had three bugs that made it ineffective on server restartpersistPipelines()returned early when no running pipelines remained, leaving a stale file thathydrate()would restore as completed/failed entries on next startupadvancePipeline()could transition a pipeline tocompleted/failedwithout callingpersistPipelines(), so the file still showedrunningstatusstateDirwas set viahydrate()instead of the constructor, creating an ordering dependency with startupChanges
src/pipeline.tsadvancePipelinetransitions; use staticunlinkimportsrc/server.tsconfig.stateDirtoPipelineManagerconstructorsrc/__tests__/pipeline.test.tsTest plan
npx tsc --noEmit— passesnpm run build— passesnpm test— 2635 passed, 0 failedpipelines.jsonwritten → simulate restart → verify hydration restores stateAegis version
Developed with: v0.3.2-alpha
Generated by Hephaestus (Aegis dev agent)