fix(agent-execution): quarantine malformed bus history and fail fan-out baseline loudly (AGT-3487) - #718
Merged
Conversation
…ead helper (AGT-3490)
…ut baseline loudly (AGT-3487)
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.
Closes AGT-3487.
What
src/agents/agentBus.ts):getAllMessages()now shape-checks each JSON file (id/timestamp/type/sender/executionIdas strings). Malformed or corrupt files are moved into a siblingquarantine/directory (recoverable, inspectable) instead of throwing — one corrupt payload can no longer wedge the whole retrieval pass, and valid history keeps flowing.src/agents/auditor.ts,src/agents/documenter.ts): parse functions now reject non-string outputs explicitly (transport defect) instead of feeding them into NDJSON splitting / JSON assumptions.parseAuditorOutput/parseDocumenterOutputare exported so the contract is testable.src/agents/workerFanout.ts): whencaptureBaselinePatchthrows (git broken, index race, FS error), fan-out now returns an explicitfallbackReason: 'baseline capture failed: …'instead of silently falling back to an empty baseline — which would have made the winner's diff base+delta and double-applied the dirty state on promotion. A genuinely clean worktree still yields an empty patch normally.DoD mapping
sharedPathModeFormapsundefined → 'copy'(safe default),true → 'link',false → 'off'; link mode still goes throughlinkSharedPathswhich never silently degrades isolation (verified by existing tests, no change needed)Verification
npm run typecheck— 0 errorsagentBus+auditor+documenter+workerFanoutsuites + newartifactValidation.test.ts— 163 passed