Skip to content

#1304 Gate the review divergence callout on criteria, not timestamps - #1305

Merged
williamthorsen merged 2 commits into
mainfrom
1304
Aug 13, 2026
Merged

#1304 Gate the review divergence callout on criteria, not timestamps#1305
williamthorsen merged 2 commits into
mainfrom
1304

Conversation

@williamthorsen

@williamthorsen williamthorsen commented Aug 13, 2026

Copy link
Copy Markdown
Owner

What

Revises the guidance in review-branch to correct the issue that agents treated any difference in timestamps between remote and local versions of a ticket as worthy of a warning. The new guidance surfaces a divergence only when the local snapshot guided the review, and only when their acceptance criteria differ enough to change a verdict.

Why

A ticket refined during planning is snapshotted locally and pushed to the remote moments apart, so a review of a freshly-planned ticket reported a caution about two contracts that said the same thing. A downstream agent relaying that caution would typically add that the sources agree anyway, inverting the signal a second time.

Details

🐛 Bug fixes

  • The callout trigger in the ## Specification compliance output template is now a comparison of the two candidates' acceptance criteria, read by the same extraction rule the compliance table states, so both candidates are judged by one rule. Materiality is bounded rather than left to judgment: a criterion on one side with no counterpart on the other (absence on either side counts), or worded so the verdict could differ; rewording that cannot change a verdict is not material.
  • Both silences are stated affirmatively rather than left as the absence of a trigger -- agreeing criteria whatever the timestamps, and a remote-won selection whatever the snapshot holds -- so the instruction does not invite a reader to reconstruct the old default. The pre-existing omissions (single candidate, explicit --ticket, pr_description source) survive alongside them.
  • The --spec-source pointer inside the callout narrows from remote|local to remote. On the only branch that renders, the reader is already on the local snapshot.
  • Step 3's resolution bullet retains the rejected candidate's raw content in place of its last_updated, and retains nothing where the remote candidate is chosen. Retention and render now turn on the same test, so the --spec-source=local override cannot reach the comparison with nothing held.

Closes #1304

Revises `review-branch`'s specification-compliance guidance so the ⚠️ divergence callout is gated on a content difference rather than a timestamp delta. Previously any nonzero gap between the two auto-resolved ticket candidates' `last_updated` values triggered it, which fired hardest on the healthy path: saving a local ticket snapshot and pushing the same refined text to the remote are two steps of one operation, so the timestamps differ while the content is identical.

The callout is now one-directional. It is emitted only where the chosen source is the local snapshot and its acceptance criteria differ materially from the rejected remote candidate's, the case in which the contract the review judged is not the one published on the ticket. Where the remote candidate wins, the guidance directs silence: the snapshot is a plan-time artifact the selection rule already supersedes. Resolution correspondingly retains the rejected candidate's `content` rather than its `last_updated`, and retains nothing at all on the remote-wins branch.
Revises `review-branch`'s resolution bullet so the retention clause and the callout that consumes it turn on the same test. The clause retained the rejected candidate's `last_updated` alongside its `content`, though the callout renders no timestamp for that candidate and the `**Source:**` line renders only the chosen source's. The field had no consumer, and binding it to the divergence check invited the reading that timestamps still feed the comparison. Retention is now `content` alone.

The condition widens from "when the local snapshot won over a remote candidate" to "when the chosen source is the local snapshot and a remote candidate existed", mirroring the render step. `--spec-source=local` forces a selection rather than winning one, so the narrower phrasing left the override path asking for a comparison whose input was never held.
@github-actions

Copy link
Copy Markdown

Dependency audit

Production dependency audit passed.

@williamthorsen williamthorsen self-assigned this Aug 13, 2026
@williamthorsen
williamthorsen marked this pull request as ready for review August 13, 2026 10:20
@williamthorsen
williamthorsen merged commit 1ad8242 into main Aug 13, 2026
3 checks passed
@williamthorsen
williamthorsen deleted the 1304 branch August 13, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review divergence callout fires on a timestamp delta, not a content difference

1 participant