Skip to content

feat(goal): record reporting faithfulness apart from the review outcome - #316

Open
raymondginger2018-sudo wants to merge 1 commit into
HKUDS:mainfrom
raymondginger2018-sudo:pr/report-faithfulness
Open

raymondginger2018-sudo wants to merge 1 commit into
HKUDS:mainfrom
raymondginger2018-sudo:pr/report-faithfulness

Conversation

@raymondginger2018-sudo

Copy link
Copy Markdown
Contributor

Summary

A completion review currently answers one question with one boolean. That boolean cannot say whether the evidence was missing or contradicting, and it cannot keep the two things it is measuring apart.

arXiv:2611.25760 (Characterizing and Detecting Unfaithful Work Reports by Coding Agents, Peking University) studies 435 real developer–agent reports: 37.24% contain at least one unsupported claim, with overstated task success at 69.3%. Its central distinction is:

Task success and reporting faithfulness are therefore distinct properties, and evidence of the first cannot vouch for the second.

The paper's strongest detector reported exactly one class of false alarm, and it came from collapsing those two: a claim that a real side effect happened was flagged only because no later observation confirmed it. A passing npm install without a follow-up ls is not evidence that the lockfile was never written.

This change keeps the two apart in the record.

Changes

core/agent_runtime/goal_verifier.py

  • GoalVerdict.conflict: bool = False — a rejection now distinguishes "a record contradicts the claim" from "no record supports it". Only a recorded failure of the claimed work sets it.
  • GoalVerdict.faithfulness — a derived property returning supported / unsupported / contradicted. Derived from confirmed and conflict rather than stored, so the three can never disagree; a stored third field would let them drift.
  • review_record() now carries faithfulness next to result, so the durable Goal history keeps the report axis. An unavailable review records unassessed rather than guessing.

What this deliberately does not do

  • It does not change what confirmed means, and adds no branch to the verdict path.
  • It does not score task success. That belongs to the Goal's own state; merging the two into one number is the mistake the paper documents.
  • It does not attempt detection. The paper's detector is a separate LLM-judge pipeline; this repository already has one judge path, and duplicating it here would be a second implementation of the same thing.

Tests

tests/test_goal_report_faithfulness.py (new, 7 cases):

  • a failed check is a conflict; missing evidence and a missing rationale are not (insufficient, not failure);
  • a supported claim is confirmed without a conflict;
  • all three faithfulness states derive correctly;
  • review_record() carries the axis beside result, and records unassessed when no verdict exists.

29 passed on a clean worktree of main at 80634442 together with the MCP change this was developed beside; the four affected files here are 2. ruff format --check clean.

Compatibility

No new dependency, no new configuration, no behaviour change: conflict defaults to False and faithfulness is a pure read of existing fields. Every existing construction site keeps working.

A passing check does not prove the claim that cites it: arXiv:2611.25760 shows
task success and reporting faithfulness are distinct properties, and evidence of
one cannot vouch for the other. The verifier already rejected unsupported
claims, but a single boolean could not say whether evidence was *missing* or
*contradicting* -- and the paper's strongest detector reported exactly that
collapse as its one false alarm (a real side effect flagged only because no
later observation confirmed it).

- `GoalVerdict.conflict`: a rejection now distinguishes "a record contradicts
  the claim" from "no record supports it".
- `GoalVerdict.faithfulness`: derived from the two booleans (supported /
  unsupported / contradicted) rather than stored, so it cannot disagree with
  them.
- `review_record()` carries `faithfulness` next to `result`, so the durable
  history keeps the report axis; an unavailable review records `unassessed`
  instead of guessing.

Task success stays out of this record on purpose -- the Goal's own state carries
it, and merging the two would repeat the mistake the paper documents. No
existing behaviour changes: `confirmed` keeps its meaning and no new branch was
added to the verdict path.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant