Skip to content

review: close remaining finding-ledger gaps from #1608 #1634

Open

Description

@waynesun09

Follow-up to #1608 (finding ids and dispositions). These gaps remain at f2901d3. None of them makes approval or dismissal looser than on main, so they were left out of #1608 to keep its approved head.

Approval guard

  • Reclassified high stays approvable. scripts/post-review.src.sh:697: $still_open takes only open, so a supported reclassified disposition for a prior high, with the id re-emitted at high or critical, leaves blocking empty. Two cases: critical reclassified to high, and a high-to-high category change. Main never gated approve together with a current high finding either. Fix: block on any prior high/critical id whose effective status is reclassified when its current row is still high or critical. Or gate approve against any current high/critical finding.

Id assignment

  • Rejected dismissal re-mints the id. post-review.src.sh:195: $closing includes raw dismissed_by_human dispositions before they are verified. If the dismissal is then rejected, the current row has already received a fresh id, and the original id is carried forward as open. Duplicate dispositions also disagree: assignment looks at every entry, while reconciliation takes the last one.
  • Challenger merges with distinct prior ids. skills/pr-review/SKILL.md:1070: a merged finding has one scalar id, and merged_from is stripped. The absorbed id is carried as open, and its reclassification fails. Fix: keep one row per prior id, or add alias accounting.

Human dismissal verification

  • The unstamped-thread fallback reuses old resolutions. post-review.src.sh:673: file+line matching counts only open priors. A closed historical finding at the same anchor lets its resolved thread dismiss a new finding there. Fix: reject the fallback when a closed finding shares the anchor, or bind it to the original id.
  • Loose stamp parsing. scripts/lib/github-review-ops.lib.sh:361: any finding:f_ID substring in an agent-authored comment counts as a stamp, including quoted cross-references. Fix: parse only the dedicated stamp position.
  • Custom repository roles are rejected. github-review-ops.lib.sh:373 compares .role_name with admin/maintain/write. A custom role with write base access gets its custom name there, so its dismissal stays open. This fails closed. Fix: check .permission instead.

Ledger contents

  • Ordinary below-threshold findings enter the ledger. post-review.src.sh:798: $ledger_findings takes every projectable unfiltered finding. So an info finding that the threshold filtered out becomes a prior id that later reviews must answer. Fix: let only supported reclassifications through below the threshold.

Tests and tidy-up

  • Several disposition fixtures in scripts/post-review-test.sh use findings: [], which the schema rejects (minItems: 1). Validate the fixtures against the schema, or omit the field.
  • scripts/lib/gitlab-review-ops.lib.sh:172: forge_get_human_dismissals() sits under the # --- Labels --- header. Give it its own header, as the GitHub lib does.

Activity

  1. fullsend-ai-triage commented on Oct 7, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 11:51 PM UTC · Completed 11:53 PM UTC

    Commit: 56b9aa3 · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.20

  2. fullsend-ai-triage commented on Oct 7, 2026

    @fullsend-ai-triage

    This issue is a follow-up to the finding-ids-and-dispositions change in #1608, and the code it points to (the approval guard, id assignment, human-dismissal verification and ledger-contents logic) exists only on that PR's branch. It is not on main yet. #1608 is still open (approved but unmerged), so these gaps can't be implemented until it lands.

    The gaps are well described, with file and line references and suggested fixes. Once #1608 merges, this issue can be re-triaged against the merged code. The line references should be re-checked at that point, since they may shift if #1608's head changes before merge.

    Blocked by:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions