fix(ploeg): show verification from the worker's record, not agent prose #152

Merged
ryangr0 merged 1 commit from ryangr0/ploeg-structured-verification into development 2026-10-03 00:21:49 +00:00 AGit
Owner

The worker reported its verification only as prose: a
"[Ploeg verification passed|failed|incomplete]" marker appended to the
agent-written summary and a "### Ploeg verification" section appended to
the findings. The usage report took the first marker in the summary and
the first commit hash in the findings, so an agent whose own summary said
"[Ploeg verification passed]" made a failed check render as passed, on
whatever commit the agent named.

The worker now also sends a structured verification record on the
OutcomeReport: the result, the full commit, the dirty-tree flag, why
checks stopped, start and finish times, and each check with its result,
exit status and times. resolveOutcome discards any verification an
adapter or agent reported, so only the worker's own run sets it. ploegd
validates the record, stores it in agent_runs.verification (migration
0034) for writing Runs only, and RoundReports returns it. parseEvidence
uses the record whenever the last writing Run has one; summary and
findings text cannot change it. Dirty, failed, incomplete and unknown
render distinctly.

Runs reported by an older worker have no record and still render from
the prose, now taking the last marker and the last section, which are
the ones the worker appended. The field is optional on the wire, so
older payloads decode unchanged and an older ploegd ignores it. The
outcome report schema and contract docs describe the new field.

Adds an optional verification record to the outcome contract (schema and README updated) and migration 0034 (agent_runs.verification JSONB, writers only). Older payloads decode unchanged and fall back to the prose, now reading the last marker the worker appended. Not yet exposed in Vloer or the Run APIs (follow-up). A malformed record makes ploegd reject the outcome with 400, like other invalid fields.

Verified with mise run verify on the pinned toolchain (all gates passed).

Ticket: https://vikunja.webgrip.dev/tasks/1733

🤖 Generated with Claude Code

The worker reported its verification only as prose: a "[Ploeg verification passed|failed|incomplete]" marker appended to the agent-written summary and a "### Ploeg verification" section appended to the findings. The usage report took the first marker in the summary and the first commit hash in the findings, so an agent whose own summary said "[Ploeg verification passed]" made a failed check render as passed, on whatever commit the agent named. The worker now also sends a structured verification record on the OutcomeReport: the result, the full commit, the dirty-tree flag, why checks stopped, start and finish times, and each check with its result, exit status and times. resolveOutcome discards any verification an adapter or agent reported, so only the worker's own run sets it. ploegd validates the record, stores it in agent_runs.verification (migration 0034) for writing Runs only, and RoundReports returns it. parseEvidence uses the record whenever the last writing Run has one; summary and findings text cannot change it. Dirty, failed, incomplete and unknown render distinctly. Runs reported by an older worker have no record and still render from the prose, now taking the last marker and the last section, which are the ones the worker appended. The field is optional on the wire, so older payloads decode unchanged and an older ploegd ignores it. The outcome report schema and contract docs describe the new field. Adds an optional `verification` record to the outcome contract (schema and README updated) and migration 0034 (agent_runs.verification JSONB, writers only). Older payloads decode unchanged and fall back to the prose, now reading the last marker the worker appended. Not yet exposed in Vloer or the Run APIs (follow-up). A malformed record makes ploegd reject the outcome with 400, like other invalid fields. Verified with `mise run verify` on the pinned toolchain (all gates passed). Ticket: https://vikunja.webgrip.dev/tasks/1733 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(ploeg): show verification from the worker's record, not agent prose
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
7bfd8a34fb
The worker reported its verification only as prose: a
"[Ploeg verification passed|failed|incomplete]" marker appended to the
agent-written summary and a "### Ploeg verification" section appended to
the findings. The usage report took the first marker in the summary and
the first commit hash in the findings, so an agent whose own summary said
"[Ploeg verification passed]" made a failed check render as passed, on
whatever commit the agent named.

The worker now also sends a structured verification record on the
OutcomeReport: the result, the full commit, the dirty-tree flag, why
checks stopped, start and finish times, and each check with its result,
exit status and times. resolveOutcome discards any verification an
adapter or agent reported, so only the worker's own run sets it. ploegd
validates the record, stores it in agent_runs.verification (migration
0034) for writing Runs only, and RoundReports returns it. parseEvidence
uses the record whenever the last writing Run has one; summary and
findings text cannot change it. Dirty, failed, incomplete and unknown
render distinctly.

Runs reported by an older worker have no record and still render from
the prose, now taking the last marker and the last section, which are
the ones the worker appended. The field is optional on the wire, so
older payloads decode unchanged and an older ploegd ignores it. The
outcome report schema and contract docs describe the new field.

VIK-1733

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ryangr0 merged commit 855022c634 into development 2026-10-03 00:21:49 +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!152
No description provided.