Repository navigation
feat(outcome): record_outcome accepts the predicate verdict (E0-01) - #1141
Conversation
Add --verdict (verified, no_op, incomplete, unverified, failed) to mix hypatia.record_outcome with a fixed table of accepted pairs. Reject invalid verdicts, unlisted pairs, false_positive with a verdict, and unknown options with exit 1 and no row. Store "verdict" in each row. Add a :metadata option to record_and_verify/5 that cannot override the keys the function sets itself. A verdict can lower trust; it never raises it. Co-Authored-By: Claude <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 32a872e75d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| repo, | ||
| file, | ||
| outcome_atom, | ||
| %{"verification" => verdict, "verdict" => verdict} |
There was a problem hiding this comment.
Preserve the verdict in the fleet outcome row
For every no_op or unverified call, this records the local metadata but record_outcome/5 also invokes write_fleet_outcome/1, whose reconstructed fleet_record omits both verdict and verification. Consequently shared-context/learning/fix-outcomes.jsonl receives a bare success row and cannot distinguish these neutral results, despite the new contract saying each written row carries the verdict; propagate the verdict into that exported row as well.
Useful? React with 👍 / 👎.



What
Work order E0-01.
mix hypatia.record_outcomeaccepts--verdictwith the 5 fleet verdicts, stores it as"verdict"in each row it writes, and rejects every pair outside the work order's table. A verdict can lower trust. It never raises trust by itself.Why
gitbot-fleet issue 647 (only
verifiedis positive evidence,no_opis neutral,unverifiedis no evidence) and issue 984, acceptance A3 (#984).Evidence
73bfbeaac669d2f58d76f73f9506caa3fbc46989test/mix_tasks/record_outcome_test.exs(15 tests). Before the change (tests first, same file, unchanged code):The 2 that pass before are the "no
--verdict" tests, which pin the unchanged behaviour.mix test test/mix_tasks/record_outcome_test.exsgave15 tests, 0 failures.no_opandunverifiedrows leavequalified_outcome_counts/1at 0 successes and 0 failures;failedandincompleterows count as 1 failure each; an invalid verdict, each unlisted pair,false_positivewith each verdict, and unknown options (--bogus,--verdct) exit 1 with no row;--verdict verifiedwrites"verdict"in every row whether the rescan returns clean (1 row), still_present (2 rows, exit 2) or fails (1 row,scan_failed); a call with no--verdictwrites no"verdict"key.mix test(LANG=C.UTF-8) gave3600 tests, 0 failures, 246 excluded.mix help hypatia.record_outcomeprints--verdictand the pair table.mix format --check-formatted: exit 0 forlib/mix/tasks/hypatia.record_outcome.ex(formatted at origin/main) and the new test file.lib/outcome_tracker.exwas already unformatted at origin/main; its format diff is the same 8 lines before and after, so my lines add none.mix escript.build && ./hypatia scan . --format json: 17 findings in total, 0 on the changed files.docs/operations/dispatch-runner-contract.adoc,lib/mix/tasks/hypatia.record_outcome.ex,lib/outcome_tracker.ex(the:metadataoption),test/mix_tasks/record_outcome_test.exs. Nothing else.gitbot-fleetcheckout was present (ls ../gitbot-fleet: no such directory).Not done
--no-verifywith--verdict verifiedrecords"verification" => "unverified"plus"verdict" => "verified", so it gets no credit; (2) the unknown-option check usesOptionParserstrict mode, so a typo such as--verdctnow exits 1, as the work order asks.estate-gateschecklist read in part only; no.hypatia-ignore, baseline or SPDX change was made.panic-attackscript on PATH inside a temp dir because the container has no scanner. Seen, not changed:OutcomeTracker.verify_fix/3does not catch the error whenpanic-attackis absent from PATH;System.cmdraises.mix deps.getneededHEX_CACERTS_PATH=/etc/ssl/certs/ca-certificates.crtin this container.Cost
E0-01, cap $6. Cost unknown: the launch script was not run for real, so there is no ledger line and the agent cannot see its own spend. Check the Console.