Repository navigation
Description
Parent EPIC: #2278 - Strengthen PR Review Author Self-Audit and Evidence Generation
This subissue of #2278 follows #2308. It settles five contract gaps that the post-merge review of PR #2313 (the #2308 implementation) found still open on develop. #2347 routed them here.
Goal
Make process-pr-review and PR-REVIEW-TEMPLATE.md give exactly one answer for each of the five cases below, so that an author following either document records the same disposition, thread state, and resolution reference.
Background
Issue #2308 reconciled eight contract rules. Reviewer da2ce7's post-merge review of PR #2313 (review 5293099957) found five places where the reconciled contract still gives two answers or none. The #2347 triage re-checked each one on develop at 478516cf, and all five are live:
| Finding | Case | Current state |
|---|---|---|
review-finding:pr-2313-f4 |
A duplicate thread whose concern was fixed | The template says both An outdated thread whose concern was fixed is `FIXED`/`RESOLVED` and that NO_ACTION/SUPERSEDED applies to "a duplicate, superseded, or no-change concern". Nothing orders the two rules. The PR #2313 audit picked FIXED while its log called the item a duplicate. |
review-finding:pr-2313-f5 |
Resolution reference stated three ways |
The field placeholder <UNIQUE_COMMIT_SUBJECT_OR_REPLY_URL> and the Completion Rules bullet "Cite a fix by its unique Conventional Commit subject or durable reply URL" both contradict the FIXED-only rule Use a unique Conventional Commit subject as the `Resolution reference` for `FIXED`.. agent-review-report-contract pins the placeholder. |
review-finding:pr-2313-f6 |
FIXED by a change outside the repository |
The skill says `FIXED` resolution references are unique Conventional Commit subjects. A fix made by editing a PR description, a label, or an issue therefore has no admissible value. This is the F76 case, which #2308 listed as reconciled. |
review-finding:pr-2313-f7 |
Policy text inside a copied-verbatim section | ## Status Values is marked "Copied verbatim into each audit record", yet its last bullet is a policy sentence (A post-merge `NO_ACTION` requires maintainer approval to decline the follow-up work.). This is the F63 anti-pattern. Records from pr-2320 onward copy the sentence; pr-2313 does not. |
review-finding:pr-2313-f9 |
A consolidated reply covering one review's several findings | Step 8 and the checklist govern only responses that cover multiple review rounds. A single-round response covering several findings, as on #2272, is governed by no rule. |
The F6 gap already constrained #2347: it declined a PR-description fix (review-finding:pr-2290-f7) partly because no FIXED resolution reference could cite it.
Scope
In Scope
- F4: state which rule governs a duplicate thread whose concern a change fixed, in both the skill and the template.
- F5: state the
Resolution referencerule once, and make the placeholder and the Completion Rules bullet agree with it. Update the pinned placeholder inagent-review-report-contract. This is a one-string Rust pin change, coordinated with Makeagent-review-report-contractstate what it reads #2349. - F6: define the admissible
Resolution referencefor aFIXEDfinding whose fix is not a repository change, for example the durable reply URL that records the edit. - F7: move the policy sentence out of the copied-verbatim
## Status Valuessection into guidance, or reclassify the section's mark. Coordinate with Strengthen PR review author self-audit and evidence generation #2278 order 8, which byte-diffs the copied sections (F63). - F9: state whether and how a consolidated response may cover several findings of one review.
- Bump the
process-pr-reviewskill version, and record focused manual verification. - Update the Strengthen PR review author self-audit and evidence generation #2278 EPIC subissue row.
Out of Scope
- Changing the 19-field roster (Single-source the audit field roster and mark copied template sections #2295).
- Validator changes, including the byte-diff of copied sections (Strengthen PR review author self-audit and evidence generation #2278 orders 7 and 8).
- Pin granularity beyond the one placeholder F5 touches (Make
agent-review-report-contractstate what it reads #2349). - Rewriting historical audit records under
docs/pr-reviews/. The records frompr-2320onward keep the sentence they copied.
Architectural Decisions
- Related ADRs:
docs/adrs/20260821172000_establish_ai_agent_context_capability_and_portability_governance.md - ADRs to create:
None known. The task clarifies the existing review-workflow contract.
Design and Ownership Review
Not applicable. This task changes documentation workflow rules and one pinned string; it adds no process, I/O, or fixture code.
Bug-Fix Process
Not applicable. The findings are contradictory or missing documentation rules, not broken runtime behaviour.
Regression Test Strategy
Not applicable. The existing agent-review-report-contract check guards the pinned text. Focused manual verification checks each rule.
Implementation Plan
Status values: TODO, IN_PROGRESS, BLOCKED, DONE.
| ID | Status | Task | Notes / Expected Output |
|---|---|---|---|
| T1 | TODO | Propose the five rules | One proposed wording per finding, approved by the maintainer before editing; recorded in the progress log. |
| T2 | TODO | Resolution-reference rules (F5, F6) | Skill and template state one rule, with a non-repository FIXED case; placeholder and pin updated; contract check passes. |
| T3 | TODO | Disposition and response rules (F4, F9) | Skill and template give one answer for a fixed duplicate and for a single-round consolidated response. |
| T4 | TODO | Copied-section content (F7) | ## Status Values holds only what records copy, or its mark says otherwise. |
| T5 | TODO | Evidence and tracking | manual-verification-evidence.md V1-V3 recorded; skill version bumped; #2278 EPIC row updated. |
Commit Points
| Task | Coherent change set | Commit policy |
|---|---|---|
| T2 | Resolution-reference rules and pin | One signed docs(pr-reviews) commit, or one for F5 and one for F6 if they touch different sentences. |
| T3 | F4 and F9 rules | One signed docs(pr-reviews) commit per finding. |
| T4 | Status Values content | One signed docs(pr-reviews) commit. |
| T5 | Evidence and tracking | One signed docs(issues) commit. |
One finding per commit keeps each finding's FIXED resolution reference precise (review-finding:pr-2300-f12 describes the failure mode).
Progress Tracking
Workflow Checkpoints
- Folder-style spec drafted in
docs/issues/drafts/2278-reconcile-residual-audit-contract-rules/ISSUE.md - Spec reviewed and approved by user/maintainer
- GitHub issue created, linked as a sub-issue of Strengthen PR review author self-audit and evidence generation #2278, and issue number added to this spec
- Implementation completed
- Automatic verification completed (
linter all, relevant tests, and any pre-push checks) - Manual verification scenarios executed and recorded in issue-local
manual-verification-evidence.md - Acceptance criteria reviewed after implementation and updated with evidence
- Evidence-based implementation completion review recorded: issue-local retrospective created for material discoveries, or progress log states why none was needed
- Reviewer validated acceptance criteria and updated checkboxes
- Independent reviewer reports recorded in issue-local
agent-review-reports.mdwhen reviewers received this folder-style specification - Committer verified spec progress is up to date before commit
- Issue closed and spec moved from
docs/issues/open/todocs/issues/closed/
Progress Log
- 2026-09-28 10:04 UTC - GitHub Copilot - Drafted as follow-up FU-D of Triage post-merge review findings on PRs #2290, #2293, #2300, #2313, and #2320 #2347 for
review-finding:pr-2313-f4,-f5,-f6,-f7, and-f9, routed here by the Triage post-merge review findings on PRs #2290, #2293, #2300, #2313, and #2320 #2347 T3 approval (Triage post-merge review findings on PRs #2290, #2293, #2300, #2313, and #2320 #2347 (comment)). The Strengthen PR review author self-audit and evidence generation #2278 register has no existing owner for these cases. Current-state quotes were re-checked ondevelopat478516cf. - 2026-09-28 10:08 UTC - GitHub Copilot - Maintainer approved the specification as Strengthen PR review author self-audit and evidence generation #2278 order 11. Created GitHub issue Reconcile the residual audit-contract rules from the PR #2313 post-merge review #2362, linked it as a sub-issue of Strengthen PR review author self-audit and evidence generation #2278 (
parent_issue_urlverified), registered it in the Strengthen PR review author self-audit and evidence generation #2278 EPIC, and moved this specification todocs/issues/open/.
Acceptance Criteria
- AC1: For a duplicate thread whose concern a change fixed, the skill and the template give the same single disposition and thread state (F4).
- AC2: The
Resolution referencerule is stated once. The template placeholder and the Completion Rules bullet agree with it, and the contract check pins the new placeholder (F5). - AC3: A
FIXEDfinding whose fix is not a repository change has a stated admissibleResolution reference(F6). - AC4: Every line in a section marked copied verbatim is content that records copy, or the mark names the exception (F7).
- AC5: The skill and the template state whether and how one response may cover several findings of a single review (F9).
- AC6:
cargo run --package agent-review-report-contractpasses, andvalidate-audit-record.pystill passes for the three most recent audit records. -
linter allexits with code0 - Relevant tests pass
- Manual verification scenarios are executed and documented in issue-local
manual-verification-evidence.md - Acceptance criteria are re-reviewed after implementation and reflect actual behavior
- Documentation is updated when behavior/workflow changes
Verification Plan
Automatic Checks
linter allcargo run --package agent-review-report-contract(stable Rust toolchain)python3 .github/skills/dev/pr-reviews/process-pr-review/scripts/validate-audit-record.py --pr-number <N>for the three most recent audits- Pre-push checks
Manual Verification Scenarios
Status values: TODO, IN_PROGRESS, DONE, FAILED, BLOCKED.
| ID | Scenario | Human-oriented command/steps | Expected Result | Status | Evidence |
|---|---|---|---|---|---|
| M1 | One answer per case | For each of F4, F5, F6, and F9, search the skill and the template for the rule with a recorded rg pattern that matches every statement of it. |
Each case has one rule, stated consistently in both documents. | TODO | manual-verification-evidence.md section V1 |
| M2 | Worked cases | Apply the new rules to the PR #2313 F2 thread (a fixed duplicate) and to review-finding:pr-2290-f7 (a fix outside the repository). |
Each gets one unambiguous row shape. | TODO | manual-verification-evidence.md section V2 |
| M3 | Copied sections | Compare ## Status Values in the template with the same section in the newest audit record. |
Only copied content remains in the section, or the mark names the exception. | TODO | manual-verification-evidence.md section V3 |
No disposable verification script is planned.
Acceptance Verification
| AC ID | Status (TODO/DONE) |
Evidence |
|---|---|---|
| AC1 | TODO | M1, M2 |
| AC2 | TODO | M1; contract check |
| AC3 | TODO | M1, M2 |
| AC4 | TODO | M3 |
| AC5 | TODO | M1 |
| AC6 | TODO | Automatic checks |
Risks and Trade-offs
- F5 changes a pinned placeholder while Make
agent-review-report-contractstate what it reads #2349 changes pin granularity. Mitigation: whichever lands second rebases, and the pin change here is one string. - Moving the policy sentence (F7) makes the template's
## Status Valuesdiffer from the section that records frompr-2320onward copied. Mitigation: historical records stay valid; order 8's byte-diff applies to records created after the change.
Implementation Completion Review
- Retrospective:
Not yet assessed. Createimplementation-retrospective.mdif the work shows why
Reconcile audit skill and template rule contradictions #2308's reconciliation left these gaps; otherwise record why none was needed.
References
- Source review: docs(pr-reviews): [#2308] reconcile audit contract rules #2313 (review).
- Findings:
review-finding:pr-2313-f4,-f5,-f6,-f7, and-f9(auditdocs/pr-reviews/pr-2313-review/PR-REVIEW.md, rows added by Triage post-merge review findings on PRs #2290, #2293, #2300, #2313, and #2320 #2347). - Precedent: Reconcile audit skill and template rule contradictions #2308 (PR docs(pr-reviews): [#2308] reconcile audit contract rules #2313).
- Routing: Triage post-merge review findings on PRs #2290, #2293, #2300, #2313, and #2320 #2347.
Activity
docs(issues): add issue specification for torrust#2362
docs(issues): add issue specification for torrust#2362
Merge #2363: docs(pr-reviews): [#2347] triage post-merge review findi…
da2ce7 commentedon Oct 3, 2026
This is T1 of issue #2362: one proposed rule for each of
review-finding:pr-2313-f4,-f5,-f6,-f7and-f9, giving the exact sentencesprocess-pr-reviewandPR-REVIEW-TEMPLATE.mdwill carry after T2–T4. Approval of these wordings is requested before either document is edited. Line numbers are at the head ofdevelop(Merge torrust/torrust-tracker#2419: ci(workflows): [#2402] cancel superseded PR runs);SKILL.mdis.github/skills/dev/pr-reviews/process-pr-review/SKILL.mdandPR-REVIEW-TEMPLATE.mdisdocs/templates/PR-REVIEW-TEMPLATE.md. Proposed sentences are shown unwrapped; each edit wraps them like the surrounding lines.docs/templates/REVIEW-FINDINGS.mdand thereview-pr,fetch-review-threadsandresolve-review-threadsskills state none of the five rules.F4: a duplicate thread whose concern a change fixed
Current: each document gives two answers,
FIXED/RESOLVEDandNO_ACTION/SUPERSEDED, and nothing orders them.SKILL.md:87-89: “If a code or documentation change fixed the concern, recordDisposition=FIXEDandThread state=RESOLVEDeven when GitHub marks the original thread outdated after the push.”SKILL.md:89-92: “For a duplicate, superseded, or no-change thread, reply exactlySuperseded by <FindingId>: <reason>., recordDisposition=NO_ACTIONandThread state=SUPERSEDED, then resolve it.”PR-REVIEW-TEMPLATE.md:40-41: “An outdated thread whose concern was fixed isFIXED/RESOLVED, even when GitHub marks the original thread outdated after the push.”PR-REVIEW-TEMPLATE.md:41-42: “For in-PR feedback, useNO_ACTION/SUPERSEDEDonly for a duplicate, superseded, or no-change concern.”PR-REVIEW-TEMPLATE.md:119-120: “For an outdated thread whose concern was fixed, recordDisposition=FIXEDandThread state=RESOLVED, even if GitHub marks the thread outdated after the push.”PR-REVIEW-TEMPLATE.md:120-123: “For a duplicate, superseded, or no-change in-PR thread, reply exactlySuperseded by <FindingId>: <reason>., recordDisposition=NO_ACTIONandThread state=SUPERSEDED, then resolve it.”Skill: these two sentences replace the two quoted at
SKILL.md:87-92.Template: these two sentences replace the two quoted at
PR-REVIEW-TEMPLATE.md:119-123.Rationale: when a change fixed the concern,
FIXEDlets theResolution referencebe the commit subject that proves it.NO_ACTION/SUPERSEDEDwould cite a reply URL in its place, which the EPIC's Decision Record excludes (EPIC.md:92-93: “reply URLs alone are not a substitute for a repository change”). The duplicate is already recorded in its own row asRE_RAISE_OF:<FindingId>(step 3), so the worked case, PR #2313 F2 (RE_RAISE_OF:F1,FIXED,RESOLVED), stays valid.Carried by T3, in one
docs(pr-reviews)commit. Co-changing: the## Status Valuesbullet atPR-REVIEW-TEMPLATE.md:40-42repeats this pair, and F7 deletes that bullet. If T3 lands before T4, T3 puts the two template sentences there too. Neitheragent-review-report-contractnorvalidate-audit-record.pyreads a disposition.F5:
Resolution referencestated three waysCurrent: the skill states the rule once. In the template the rule binds
FIXEDto a commit subject, while the placeholder and the Completion Rules bullet allow subject-or-URL for any fix.SKILL.md:197-199: “FIXEDresolution references are unique Conventional Commit subjects;NO_ACTION,SUPERSEDED, andFOLLOW_UPresolution references are durable reply URLs.”PR-REVIEW-TEMPLATE.md:96: “- Resolution reference: <UNIQUE_COMMIT_SUBJECT_OR_REPLY_URL>”PR-REVIEW-TEMPLATE.md:100: “Use a unique Conventional Commit subject as theResolution referenceforFIXED.”PR-REVIEW-TEMPLATE.md:100-102: “Use a durable reply URL forNO_ACTION,SUPERSEDED, orFOLLOW_UP; record a follow-up pull request only in the separate Follow-up PR URL field.”PR-REVIEW-TEMPLATE.md:128-129: “Cite a fix by its unique Conventional Commit subject or durable reply URL, never by a branch SHA that can change after a rebase.”Skill: no change.
SKILL.md:197-199stays its one statement, amended by F6. Template:PR-REVIEW-TEMPLATE.md:100-102stays its one statement. The first line below replacesPR-REVIEW-TEMPLATE.md:96, and the second replaces the bullet atPR-REVIEW-TEMPLATE.md:128-129.Rationale: AC2 fixes the shape: one statement of the rule, which the placeholder and the Completion Rules bullet agree with. The placeholder names the field's two forms in the rule's own words, and the sentence below it says which form applies. The bullet keeps only its branch-SHA ban, so the copied section stops restating the rule in a looser form.
Carried by T2, in its own
docs(pr-reviews)commit, because F5 and F6 touch different sentences. Co-changing: the placeholder pins atcontrib/dev-tools/checks/agent-review-report-contract/src/main.rs:50and:599.SKILL.md:83-84governs repository fixes and stays.validate-audit-record.py:162-168checks only commit-subject references and does not change.F6:
FIXEDby a change outside the repositoryCurrent: both documents bind
FIXEDto a commit subject (SKILL.md:197-199andPR-REVIEW-TEMPLATE.md:100, quoted under F5). In neither does a fix that changes no repository file have an admissibleResolution reference.Skill: this sentence replaces the one quoted at
SKILL.md:197-199.Template: this sentence replaces the one quoted at
PR-REVIEW-TEMPLATE.md:100.Rationale: the EPIC keeps the commit-subject or durable-URL form and adds no field. A fix outside the repository therefore takes the durable-URL form, and the reply that records the edit is the one durable URL every such fix has. The clause applies only where no repository change exists, so a fix that changes a file still cites its commit, and the
N/A-with-reason option F76 also offered is not taken becauseN/Ais neither form.Carried by T2, in its own
docs(pr-reviews)commit. Co-changing: none.validate-audit-record.py:165already passes every reference that starts withhttp, and F5's placeholder already admits the URL form.F7: policy text inside a copied-verbatim section
Current: the template marks
## Status Valuesas copied verbatim, yet its last bullet holds three disposition rules. The skill has no copied sections.PR-REVIEW-TEMPLATE.md:26: “<!-- Copied verbatim into each audit record. -->”PR-REVIEW-TEMPLATE.md:42-43: “A post-mergeNO_ACTIONrequires maintainer approval to decline the follow-up work.” (with:40-41and:41-42, quoted under F4)Template: delete the bullet at
PR-REVIEW-TEMPLATE.md:40-43and insert nothing.PR-REVIEW-TEMPLATE.md:119-124keeps the same rules, in F4's wording, and the identical post-merge sentence at:123-124. Skill: no change; step 7 (SKILL.md:87-93) states these rules.Rationale: AC4 allows either moving the text or naming the exception in the mark. Every rule in the bullet already lives in
## Completion Rules, a section records copy, so deleting the bullet loses no rule from a new record and leaves## Status Valuesas vocabulary only, with no exception for order 8's byte-diff to carry. TheOPENclause atPR-REVIEW-TEMPLATE.md:32-34qualifies a status value rather than stating a disposition rule, so it stays.Carried by T4, in one
docs(pr-reviews)commit. Co-changing: none.agent-review-report-contractpins only theAuthor classand category lines of this section (main.rs:136,:140and:144), andvalidate-audit-record.pydoes not read the section.F9: a consolidated reply covering one review's several findings
Current: all three statements allow a consolidated response only across multiple review rounds. A response covering several findings of one review is governed by no rule.
SKILL.md:94-96: “A PR conversation response may cover multiple review rounds only when it names every review ID and every finding ID with its disposition and resolution reference.”SKILL.md:289-291: “Consolidated responses that cover multiple review rounds name every covered review and finding ID with its disposition and resolution reference, with the durable response URL in each related row”PR-REVIEW-TEMPLATE.md:125-126: “A consolidated PR conversation response may cover multiple review rounds only when it names every review ID and every finding ID with its disposition and resolution reference.”Skill: the first line below replaces the sentence quoted at
SKILL.md:94-96, and the second replaces the checklist item atSKILL.md:289-291.Template: this sentence replaces the one quoted at
PR-REVIEW-TEMPLATE.md:125-126.Rationale: naming each covered review and finding with its disposition is what makes one shared URL traceable to every row, and that need does not depend on the number of rounds. The #2272 response covered one review's two findings and named neither. Allowing such a response under this condition, rather than forbidding it, leaves step 7's per-thread replies untouched. It therefore does not decide the matrix row that defers batching (
retrospective-improvement-matrix.md:66: “Batching may reduce fixed overhead, but must retain a finding-specific reply URL or explicitly define an equivalent durable relationship.”).Carried by T3, in its own
docs(pr-reviews)commit. Co-changing: the checklist item above; the durable-URL sentences atSKILL.md:96-97andPR-REVIEW-TEMPLATE.md:126-127stay.validate-audit-record.py:147-149reads only thread replies and does not change.Approval
Are the five wordings approved as written, or which case should change, and how? Once they are approved, T2–T4 apply them as written and the spec's progress log links this comment.
Merge #2367: docs(pr-reviews): [#2347] close out the post-merge triag…
docs(issues): [torrust#2278] restate the torrust#2362 overlap on curr…
docs(issues): [torrust#2278] restate the torrust#2362 overlap on curr…
docs(issues): [torrust#2278] restate the torrust#2362 overlap on curr…
Merge #2431: docs(issues): [#2278] draft the order 5 self-audit gate …