fix(ploeg): keep a writer's problem and solution when Claude stdout is malformed #162

Merged
ryangr0 merged 1 commit from ryangr0/ploeg-writer-narrative-malformed-stdout into development 2026-10-03 10:38:03 +00:00 AGit
Owner

Claude ParseOutcome now treats the result envelope and PLOEG_OUTCOME_FILE as independent sources: a writer's problem/solution, findings, verdict, outcome or created Work Items survive a malformed/banner/truncated envelope; usage comes only from the envelope and stays nil when undecodable; agent-written usage is discarded; the exit error stays authoritative; the shared runner parse-error contract is unchanged. Tests written first and failing on old code: new conformance property WritingRunAccountSurvivesGarbageOnStdout (Claude failed, ACP/exec/OpenHands passed), Claude fake-executable table through harness.RunCommand (exit 7, idle timeout, cancel, {} and malformed box), worker runAgent+resolveOutcome on a new PR. Checks: go test ./... all ok; go vet, gofmt, go build, brand-marks, license-check, openspec validate (17/17), helm-golden check pass. Checks left to CI: full mise run verify stopped at Vloer typecheck (tsc not installed in this worktree). 🤖 Generated with Claude Code

Claude ParseOutcome now treats the result envelope and PLOEG_OUTCOME_FILE as independent sources: a writer's problem/solution, findings, verdict, outcome or created Work Items survive a malformed/banner/truncated envelope; usage comes only from the envelope and stays nil when undecodable; agent-written usage is discarded; the exit error stays authoritative; the shared runner parse-error contract is unchanged. Tests written first and failing on old code: new conformance property WritingRunAccountSurvivesGarbageOnStdout (Claude failed, ACP/exec/OpenHands passed), Claude fake-executable table through harness.RunCommand (exit 7, idle timeout, cancel, {} and malformed box), worker runAgent+resolveOutcome on a new PR. Checks: go test ./... all ok; go vet, gofmt, go build, brand-marks, license-check, openspec validate (17/17), helm-golden check pass. Checks left to CI: full mise run verify stopped at Vloer typecheck (tsc not installed in this worktree). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(ploeg): keep a writer's problem and solution when Claude stdout is malformed
Some checks failed
[Workflow] On Pull Request / checks (pull_request) Has been cancelled
[Workflow] On Pull Request / warnings (pull_request) Has been cancelled
[Workflow] On Pull Request / release-policy (pull_request) Has been cancelled
f77d8d3ac3
Writers put only problem and solution in PLOEG_OUTCOME_FILE (ADR-0042).
The Claude adapter forgave an undecodable result envelope only when the
drop box carried an outcome or a verdict, so a compliant writer's account
came back with a parse error and harness.RunCommand discarded it.

The envelope and the drop box are now independent sources. Any agent
report in the box (outcome, verdict, findings, problem, solution or
created Work Items) survives a malformed envelope; usage comes only from
the envelope and stays nil when it cannot be decoded, and a usage figure
the agent wrote into the box is discarded. The process exit error stays
authoritative, and the shared runner's parse-error contract is unchanged.

A new conformance property runs every adapter against garbage stdout with
a writer's box; Claude failed it, ACP, exec and OpenHands already passed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ryangr0 merged commit 619d838985 into development 2026-10-03 10:38:03 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
webgrip/unfold!162
No description provided.