Skip to content

feat(pm-stack): lane-guard skips a repeated triage verdict (F2a) - #12543

Merged
dezren39 merged 3 commits into
mainfrom
xaltha/fleet-queue-feature-slice
Nov 23, 2026
Merged

dezren39 merged 3 commits into
mainfrom
xaltha/fleet-queue-feature-slice

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Slice

F2a of #12233 ("No repeated verdicts") — the first of the issue's three plan steps. F2b (coverage accepts a verdict) and F2c (the feature_slice packet kind) each need a decision record first per the plan; F2a does not, and it creates the machine-readable recorded verdict both of them will read.

What changes

pm-stack/lane-guard/lane_guard.py note gains a verdict path:

  • A triage note records its verdict as a token in the canonical header: lane_guard.py note --state triaged --verdict still_blocked → <!-- agent-note:v1 state=triaged task=N verdict=still_blocked -->. parse_note reads the token back (normalised, so Still blocked! and still_blocked are the same verdict).
  • A verdict note is skipped when the newest agent note on the issue already records the same verdict — across task ids, with no 24h window (a verdict stands until the issue changes) — and nothing has changed since: no human comment, and no commit, label or body change on the issue. Issue changes are read from the issue timeline by the new pure helper changes_from_timeline (labeled/unlabeled → label, referenced with a commit_id → commit, edited → body).
  • Mixed forms never match: a note with a recorded verdict does not dedupe one without, or vice versa. Notes recorded before --verdict existed (state-only triaged) still dedupe against each other.
  • Park/pick-up dedupe is byte-for-byte unchanged, and the timeline is fetched only for verdict requests, so existing lane calls see no new failure mode.

Why

#1062 collected four identical triage verdicts and no code. The verdicts were free-form prose, so no guard could recognise them as identical. This slice makes the verdict a recorded token and teaches the guard to honour it.

Verification

  • python3 -I pm-stack/lane-guard/test_lane_guard.py — 47 tests pass (16 new), including the plan's done-test: two tasks + one unchanged issue → second note skipped; a third after a new commit → posted.
  • Mutation check: inverting the change-time comparison fails 5 freshness tests; reverted and re-verified green.
  • Pure Python, offline; no build needed. The pm-stack tests workflow runs this suite in CI.

Refs #12233


See it in action
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Extend lane_guard.py note with a verdict path: a triage verdict
(state triaged, with a recorded --verdict token in the canonical
note header) is skipped when the newest agent note on the issue
already records the same verdict — across task ids, with no time
window — and nothing has changed since: no human comment, and no
commit, label or body change on the issue (read from its timeline
via changes_from_timeline). Park/pick-up dedupe is unchanged, and
the timeline is only fetched for verdict requests.

This is the recorded-verdict format F2b coverage will read: the
verdict token lives in the agent-note header, so it is
machine-checkable instead of free-form prose (#1062 collected four
identical verdicts as prose).

Tests: 47 offline tests pass (16 new), including the F2a done-test —
two tasks, one unchanged issue, second note skipped; a third after
a new commit is posted. Mutation check: inverting the change-time
comparison fails 5 freshness tests.

Refs #12233
@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 13:12
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1a477503-a6e3-4af8-9c30-ec155fedb2eb
Commits

Reviewing files that changed from the base of the PR and between 5133832 and 2b49d80.

Files selected for processing: 2

  • pm-stack/lane-guard/lane_guard.py
  • pm-stack/lane-guard/test_lane_guard.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T16:14:14.337740Z 2b49d80 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 766a7a6175

ℹ️ 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".

Comment thread pm-stack/lane-guard/lane_guard.py Resolved
dezren39 added a commit that referenced this pull request Nov 22, 2026
An open effort/l or effort/m issue whose newest agent note is a
triage verdict with a recorded verdict token and a valid resume
condition (resume=<slice_landed|dependency_closed>:<number>) is
covered: the verdict note is the park record for the triage
disposition, so the coverage reconciler no longer re-enqueues it
for triage. Rules per the F2b decision record on #12233 (D7).

- lane_guard.py: parse the resume condition into the note, write
  it via note --resume / note_header, and add a  check
  applying the decision record's rules to one issue (effort scope,
  recorded token required, placeholder verdicts excluded, F2a
  freshness: a human comment, a newer non-verdict note, or a
  commit/label/body change ends the coverage).
- check_coverage.py: the same rules in the reconciler — labels
  ride the issue enumeration, the verdict is read from the newest
  agent note for broker-uncovered effort issues, verdict-covered
  issues are reported as covered and get no triage packet.
- Fixture tests cover the plan's done-test both ways: a triaged
  large issue is covered and not re-enqueued; an issue with no
  verdict (or no resume condition) is still uncovered.

Stacked on PR #12543 (F2a): the verdict token and note format this
reads are the ones F2a records. Refs #12233
The lane-guard verdict path mapped a timeline 'edited' event to a
body change, but GitHub's REST timeline exposes no 'edited' event
type, so a body edit after a triage verdict never invalidated it
and the guard suppressed re-triage indefinitely.

Verdict notes now record a body_fp (first 16 hex of the sha256 of
the normalised issue body) in the canonical header, and the verdict
check compares it with the issue's current body, fetched by the
note CLI. A changed body posts; a verdict note with no fingerprint
posts once so the new note records one. The dead 'edited' timeline
mapping is removed, and the verdict regex no longer swallows a
following header field into the verdict token.

Fixes the Codex review thread on #12543 (comment 4658254256).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df60d7cc77

ℹ️ 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".

Comment thread pm-stack/lane-guard/lane_guard.py Resolved
Comment thread pm-stack/lane-guard/lane_guard.py Resolved
Two follow-ups from the Codex review of the body-fingerprint fix:

- The verdict regex's multi-word continuation used \s+, which
  crossed blank lines: a YAML note whose verdict was the last
  field swallowed the narrative below it into the verdict key
  (still_blocked_still_blocked_on_f12), so the next identical
  verdict posted again on an unchanged issue. Whitespace inside
  the verdict value is now horizontal only.
- A body cleared to null was passed to the verdict check as None
  (body unavailable), so the fingerprint comparison was skipped
  and the identical verdict was suppressed despite the change.
  A fetched null body is now normalised to an empty string, so
  deletions invalidate the stored fingerprint and initially
  empty bodies still get one recorded.
@dezren39
dezren39 merged commit e6268f8 into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the xaltha/fleet-queue-feature-slice branch November 23, 2026 00:53
@dezren39 dezren39 added the audit:completed-later Gap completed by later merged PR label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit:completed-later Gap completed by later merged PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant