Skip to content

pr-self-review: auto-ack + source-issue exception (closes #62)#78

Merged
SnowboardTechie merged 6 commits into
mainfrom
issue-62-observational-ack-source-issue-exception
May 3, 2026
Merged

pr-self-review: auto-ack + source-issue exception (closes #62)#78
SnowboardTechie merged 6 commits into
mainfrom
issue-62-observational-ack-source-issue-exception

Conversation

@SnowboardTechie
Copy link
Copy Markdown
Owner

Summary

Two coordinated spec edits to pr-self-review plus a small contract change to issue-work:

  • Auto-ack on accept-without-diff. An accept triage that produces no worktree edit (typical for observational findings the reviewer prose-flagged as "no fix required") is auto-classified as an acknowledgment: the suppression key enters suppression_set and the finding lands under a new ## Acknowledged section in summary.md. Observational findings stop re-surfacing across passes. No fifth verb — the four-action vocab is unchanged. Mechanism: each accept records its files_touched set at triage time; Phase 2.4 reconciliation classifies entries with empty sets as acks before deciding whether to commit.

  • Source-issue exception to related_issue pre-skip. Findings tagged with the issue this PR commits to closing (parsed from Closes #N / Fixes #N / Resolves #N PR-body tags) no longer pre-select skip. In per-finding mode they pre-select accept; in the >5 batch case they're separated from the batch and triaged individually. A real defect about the PR's own intent now surfaces for explicit triage instead of being silently dropped. Phase 1.1's match_reason enum splits the previous linked value into closes (declarative tags) and refs (informational tags + timeline cross-references) so the exception is mechanical.

  • Pre-pr coverage. issue-work Phase 4 now passes source_issue: {owner}/{repo}#{N} to pr-self-review. In pre-pr mode (no PR body yet), pr-self-review fetches the source issue via gh issue view and seeds a synthetic match_reason: closes cache entry, so the exception fires in the dominant code path. The source_issue arg is validated against ^[A-Za-z0-9_.-]+$ / ^[0-9]+$ before any gh interpolation, mirroring Phase 1.1 dimension B's metacharacter rejection rule.

Closes #62.

Test plan

Skill bodies are LLM instructions; no executable tests. Verified via:

  • /pr-self-review self-review loop — 5 passes (hit cap), 0 Critical / 0 Major outstanding. Full audit trail at ~/.claude/issue-work/SnowboardTechie-athena-notes-62/summary.md.
  • python3 scripts/lint-frontmatter.py — clean (14 agents, 18 skills).
  • docs-lint (relative trailing-slash links) — clean.
  • Behavioral verification deferred to the next real /pr-self-review run: confirm a pass-N accept on a "no fix required" finding doesn't re-surface in pass N+1, and a finding tagged related_issue: #N where #N is the source issue is not pre-skipped.

Changelog

  • Non-release PR — added bullets under ## [Unreleased] in CHANGELOG.md.

…loses #62)

- Phase 2.3 accept semantics extended: a triaged accept that produces no
  worktree diff by end of pass is auto-classified as an acknowledgment —
  key enters suppression_set, finding lands under a new ## Acknowledged
  section in summary.md, and observational findings stop re-surfacing
  across passes. No fifth verb; the four-action vocab is unchanged.

- Phase 2.3 related_issue pre-skip rule gains a source-issue exception:
  findings tagged related_issue: #N where #N is matched via a declarative
  close tag (Closes/Fixes/Resolves) in the PR body do NOT pre-select skip
  — those findings are about the PR's own implementation, not about
  overlap with separately-tracked work. Refs/Related and timeline
  cross-references keep the pre-skip default.

- Phase 1.1 plumbing: parse list adds Resolves; match_reason enum splits
  the previous "linked" value into "closes" (declarative) and "refs"
  (informational + cross-references) so the exception above is mechanical.
- Cross-file edit detection (correctness+security Major): track files
  touched per finding at triage time via accepts_per_pass[].files_touched
  instead of inferring from `git diff --name-only HEAD` against the cited
  file. A fix that lands in a helper file no longer misclassifies as ack.
- Defer accept-bullet to Phase 2.4 (simplicity Major): the `accept`
  semantic now states the contract; reconciliation mechanics live in 2.4.
- Outstanding-section coverage (correctness Major): Critical/Major
  template prose lists "acknowledged" alongside pushed-back/skipped/filed.
- Batch mode source-issue exception (correctness+security Minor): the
  pre-skip rule and exception are restated under batch mode with a default
  annotation pattern.
- Phrasing tightenings: "pre-select accept instead" mirrors skip wording;
  source-issue exception drops "intentionally narrow" preamble; match_reason
  prose note drops the rationale clauses (the source-issue exception block
  carries them); Phase 2.4 drops the "Concretely:" preamble and the
  regression-protection parenthetical (covered by the edge-case row);
  ## Acknowledged section description tightened.
- Revert pass-1 mistake: outstanding-section descriptions added "acknowledged"
  to the unresolved axis, but acks are suppressed and have their own
  ## Acknowledged section. Including them outstanding would double-list and
  inflate ship-readiness counts. Restore the original outstanding list and
  add a forward-pointer to ## Acknowledged from the description.
- Description frontmatter mentions auto-ack so readers see the model upfront.
- State Root session-state enumeration includes acks.
- match_reason note clarifies timeline events always classify as refs.
- Batch-mode source-issue annotation includes the issue number for sanity check.
- ## Acknowledged section drops the over-hyphenation.
- CHANGELOG entry for the source-issue exception drops implementation detail
  (enum split, parse-list addition) in favor of observable behavior.
…mbiguous

- Pre-pr mode synthesizes a source-issue closes-entry. issue-work now
  passes source_issue ({owner}/{repo}#N); pr-self-review fetches the
  issue and seeds related-issues.json with match_reason: "closes" so
  the source-issue exception fires in the issue-work flow (previously
  a no-op in pre-pr because dimension A was wholly skipped). Without
  source_issue, dimension A still degrades cleanly to zero entries.
- Batch-mode omission rule is unambiguous: omitted findings are skipped
  even when their annotation says "default: accept" (annotations are
  recommendations to engage, not behavioral defaults). Closes the
  silent-suppression path where omitting a source-issue finding would
  auto-accept → auto-ack → suppress without user engagement.
- ## Acknowledged description: trigger is mechanical (empty
  files_touched after any accept), not semantic (reviewer prose).
- match_reason note: parenthetical aside on timeline classification
  becomes a direct sentence; same content, less dense.
…uched contract

- Batch-mode annotation no longer says "default: accept" (which lied —
  omission still routes to skip). New form: "↳ source issue: #N —
  type {num} accept to triage" puts the actual mechanic in the hint
  the user reads. The same pattern applies to related_issue / related_note
  hints. The omission rule prose drops the now-redundant "even if
  annotation suggests accept" caveat.
- Pre-pr source-issue synthesis now mandates owner/repo/N validation
  against the same metacharacter pattern dimension B uses. source_issue
  crosses the trust boundary into gh; without the guard a malformed
  value would interpolate into the gh invocation.
- accept semantics: files_touched contract is now explicit on the
  no-edit-attempted path. If Claude agrees with the reviewer that no
  fix is required, populate files_touched as an empty set explicitly
  rather than leaving it undefined. Closes a contract gap that would
  break Phase 2.4 reconciliation if an executor inferred "no edit
  needed" without writing files_touched.
…cate body at ingest

- Source-issue exception protection extended to batch-mode case. Phase 2.3
  now separates source-issue findings (related_issue matches cached
  match_reason: closes) before mode dispatch; they always go through
  per-finding mode regardless of unsuppressed count, then non-source-issue
  findings dispatch normally per the >5 threshold. Closes the gap where
  batch-mode omission-equals-skip silently dropped a source-issue finding
  whose annotation said "type {num} accept to triage" — annotation alone
  was advisory, not protective.
- Pre-pr synthesis truncates issue body to 400 chars at ingest, mirroring
  the body_excerpt schema's write-time bound. Full body never enters LLM
  context regardless of consumer-side handling.
- Two-axis-shape narrative names the section "## Accepted this session"
  matching the actual template header.
@SnowboardTechie SnowboardTechie added the enhancement New feature or request label May 3, 2026
@SnowboardTechie SnowboardTechie marked this pull request as ready for review May 3, 2026 23:48
@SnowboardTechie SnowboardTechie merged commit 04e3755 into main May 3, 2026
3 checks passed
@SnowboardTechie SnowboardTechie deleted the issue-62-observational-ack-source-issue-exception branch May 3, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pr-self-review: don't re-surface observational findings; clarify related_issue pre-skip for source-issue tags

1 participant