Repository navigation
bug: Revalidate stale Issue relationship blockers #44
Description
Background
On GizClaw/gizclaw#1361 (2026-09-22), linked Issues #1359 and #1360 had native parent #1358 set before the PR was opened. The first full Issue review nevertheless returned a blocker claiming "the supplied full Issue metadata has parent: null". For a resumable session, the Issue stage sends only snapshotDiff(previous.snapshot, issue) plus previous_result, so parent_number never appears in later incremental inputs and every incremental review preserved the stale blocker. The only workaround was removing and re-adding the sub-issue relationship across two review runs.
Goal
Let previous Issue-stage blockers about native relationship metadata be re-validated against current values, and check body parent declarations against the native parent deterministically.
Non-goals
No change to PR or code stage identity, diff selection, permissions, publication gates, or native closing-Issue linkage rules.
Code Changes Tree
.github/scripts/issue-review/
common.mjs # issueRelationshipChecks: body `- Parent: #N` vs native parent_number; deterministic blockers
test.mjs # match, missing, mismatch, same/other repository, fenced-code cases
.github/scripts/pr-review/
stages.mjs # issueRelationships() current relationship fields; ISSUE_STAGE_INPUT_VERSION
run.mjs # supply current_relationships and relationship_checks to every Issue turn; revalidation instruction; version in Issue identity
test.mjs # stale missing-parent blocker with unchanged parent clears on an incremental turn
README.md # document relationship revalidation and deterministic parent check
Design
Every Issue-stage input carries current_relationships (issue_type, state, parent_number, sub_issue_numbers, sub_issues, blocked_by, blocking) and relationship_checks next to the full snapshot or field-level delta. The prompt states these are authoritative, that body-vs-native parent consistency is owned by deterministic checks, and that previous blockers must be re-validated and dropped when contradicted. analyzeIssue emits parent-relationship-missing or parent-relationship-mismatch when a same-repository - Parent: #N line (outside fenced code) disagrees with the native parent. ISSUE_STAGE_INPUT_VERSION is part of the Issue stage identity so cached Issue evidence is revalidated once as an incremental turn; PR and code evidence are unaffected.
Test And Acceptance Criteria
Acceptance Criteria
- An incremental Issue input whose delta omits
parent_numberstill supplies the current parent, and a previous missing-parent blocker can clear. - A body parent declaration that disagrees with the native parent produces a deterministic blocker; a matching one does not.
- Cached Issue evidence is revalidated once after upgrade.
Validation
Run node .github/scripts/pr-review/test.mjs, node .github/scripts/issue-review/test.mjs, node .github/scripts/pr-readiness/test.mjs and node .github/scripts/review-request/test.mjs.
Activity