LearnNewsExamplesServices
Frontmatter
id14688
titlePR-review anchor-lint: pre-post guard that the review body carries every canonical template anchor
stateClosed
labels
enhancementdeveloper-experienceai
assigneesneo-gpt
createdAtJul 4, 2026, 6:20 AM
updatedAt6:22 AM
githubUrlhttps://github.com/neomjs/neo/issues/14688
authorneo-opus-grace
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAt6:22 AM

PR-review anchor-lint: pre-post guard that the review body carries every canonical template anchor

Closed Backlog/active-chunk-3 enhancementdeveloper-experienceai
neo-opus-grace
neo-opus-grace commented on Jul 4, 2026, 6:20 AM

Problem

manage_pr_review runs a server-side template-structure validator on the review body; a body missing any canonical ### anchor (or over-collapsing audit sections into one N/A line) is rejected, costing a full compose→reject→rebuild→re-post round-trip. This is an empirically-recurring failure: the same miss — dropping ### 🧠 Graph Ingestion Notes, collapsing ### 🧪 Test-Execution into the N/A block — has now hit ≥3 times across sessions (PR #14393, #14468, #14584) despite a durable agent memory documenting it. Discipline alone has failed 3× → the fix is mechanical, not another reminder.

The cost is asymmetric: the reviewer has already done the substantive review; the rejection is pure structural tax on the post, and the rebuild burns context re-reading the template.

Intended solution shape

A client-side pre-post anchor-lint (or a pre-filled skeleton) so the validator never round-trips:

  • Option A (lint): before manage_pr_review sends, validate the composed body against the required canonical anchor set; on a missing/mis-collapsed anchor, fail locally naming the exact anchor — a fast local loop instead of an API round-trip.
  • Option B (skeleton): expose the template as a fill-in skeleton (all anchors pre-present) the composer edits in place, so anchors are structurally impossible to drop.
  • Either way the required-anchor set is a single source of truth derived from pr-review-template.md (not a re-hardcoded copy that can drift from the server validator), and the collapse rule (empirically: zero-collapse is safest; the server accepts only a narrow collapsible subset) is encoded so the local lint matches the server validator exactly.

Acceptance Criteria

  • A pre-post check (lint or skeleton) catches a missing/mis-collapsed canonical anchor BEFORE the manage_pr_review API call.
  • The check's anchor set is derived from pr-review-template.md (single SoT), not a hardcoded copy that can drift from the server validator.
  • On failure, the exact missing/offending anchor is named.
  • Regression fixture: a body missing ### 🧠 Graph Ingestion Notes (the empirical 3× miss) fails the check.

Contract Ledger

Surface Contract Consumer
required-anchor set derived from pr-review-template.md canonical ### headers the pre-post lint and the server-side validator (must agree)
collapsible subset the server's narrow allowance; zero-collapse is the safe superset the lint's collapse-allowance check

Notes

  • Leaf, one-PR-deliverable (Resolves this ticket); not epic-linked — a standalone review-workflow tooling fix.
  • Provenance: friction→gold from the 3rd recurrence (2026-07-04, during the PR #14584 review). Durable memory anchor: pr-review-template-validator-anchors.
  • Claimable — filed unassigned. Internal review-tooling, not product-critical → should NOT consume Fable hours (an Opus/mechanical peer fits). Complements, does not touch, the stop-hook lane (#14580) — different surface.
tobiu referenced in commit 2afbdfe - "feat(ai): add pr-review body preflight lint (#14688) (#14796)" on 6:22 AM
tobiu closed this issue on 6:22 AM