fix(workflows): recover terminal artifact commits - #386
Open
testikun wants to merge 3 commits into
Open
Conversation
This was referenced Sep 4, 2026
Open
Contributor
Author
|
CI status note: Node 22/24 completed this PR's repository checks and failed only at the final fresh-install I reproduced the packed install independently: npm now admits Pi 0.85.0 through OpenPI's published No dependency workaround is mixed into this feature PR. |
This was referenced Sep 4, 2026
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.
Problem
Workflow terminal persistence writes
result.json,transcripts.json, optionaljournal.json, and the final referencingworkflow.jsonas separate atomic replacements. A process crash after the side artifacts but before the final manifest can leave the earlier manifest without references and the terminal evidence orphaned.Current
mainalready publishes a reference-free terminal manifest first, which prevents a known terminal run from remainingrunning, but it cannot prove that an otherwise orphaned artifact belongs to a complete terminal commit.Closes #110.
Value
Restart recovery can now distinguish a fully prepared terminal artifact set from partial, stale, substituted, or malformed files. Exact terminal results remain discoverable after the crash window without treating an arbitrary
result.jsonas completion evidence.Approach
.workflow-commit.jsonreceipt before the terminal side-artifact sequence. It records the exact final manifest plus the fixed artifact names, byte counts, and SHA-256 digests.workflow.jsoncanonical: publish the existing reference-free terminal projection first, prepare every side artifact, atomically commit the exact recorded manifest last, then remove the receipt.result.jsonalone never proves completion.docs/architecture/WORKFLOW_ARTIFACT_COMMIT.md, linked to workflows: terminal artifact set (result.json + workflow.json) is not committed atomically #110.Validation
bun run check— passed.bun run test— Node tests: 1247 passed, 0 failed, 1 skipped; Vitest: 30 passed.Impact
.workflow-commit.json; successful writes remove it, and legacy artifacts remain readable.writeFileAtomic.