fix(ploeg): show verification from the worker's record, not agent prose #152
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ryangr0/ploeg-structured-verification"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
verificationrecord 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 verifyon the pinned toolchain (all gates passed).Ticket: https://vikunja.webgrip.dev/tasks/1733
🤖 Generated with Claude Code