Skip to content

fix: Revalidate stale Issue relationship blockers - #43

Merged
idy merged 1 commit into
mainfrom
fix/revalidate-issue-relationship-blockers
Sep 22, 2026
Merged

idy merged 1 commit into
mainfrom
fix/revalidate-issue-relationship-blockers

Conversation

@idy

@idy idy commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Closes #44.

Problem

For a resumable session, the Issue stage sent the model only snapshotDiff(previous, current) plus previous_result. A wrong blocker from the first full review about metadata that never changes could not clear. On GizClaw/gizclaw#1361, Issues #1359 and #1360 already had native parent #1358, but the review said "the supplied full Issue metadata has parent: null". Because parent_number never showed up in the delta, every incremental review raised that blocker again.

Change

  • pr-review/stages.mjs: added issueRelationships(), which returns the current issue_type, state, parent_number, sub_issue_numbers, sub_issues, blocked_by and blocking. Also added ISSUE_STAGE_INPUT_VERSION = 2.
  • pr-review/run.mjs: every Issue-stage input now includes current_relationships and relationship_checks. The prompt tells the reviewer to re-check each previous blocker against these values and drop any blocker they contradict. It also says not to report body-vs-native parent consistency itself. The input version is part of the Issue stage identity, so cached Issue evidence gets re-checked once in an incremental turn. PR and code evidence are unchanged.
  • issue-review/common.mjs: added issueRelationshipChecks(), which compares a body - Parent: #N line (or a same-repository owner/repo#N) with the native parent. Lines that name another repository or sit inside fenced code are ignored. analyzeIssue now adds a deterministic parent-relationship-missing or parent-relationship-mismatch blocker.
  • README: documented the new behavior.

Validation

node .github/scripts/issue-review/test.mjs
node .github/scripts/pr-review/test.mjs
node .github/scripts/pr-readiness/test.mjs
node .github/scripts/review-request/test.mjs

All pass. New coverage:

  • A previous result with a missing-parent blocker, a current snapshot with parent_number set, and only the body changed. The incremental input has a body-only delta, plus current_relationships.parent_number, a passing parent check, the previous blocker and the revalidation prompt. The blocker clears.
  • The deterministic parent check: match, missing, mismatch, same-repository qualified reference, another repository, and fenced code.

The latest tag was not moved.

🤖 Generated with Claude Code

Incremental Issue-stage input carried only changed fields, so a previous
blocker about unchanged native metadata (for example a wrong "parent: null"
claim) could never clear. Always supply the current relationship fields and
deterministic relationship checks, check a body `- Parent: #N` line against
the native parent deterministically, and instruct the reviewer to drop
previous blockers the current values contradict. Bump the Issue stage input
version so cached evidence is revalidated once.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ OpenAI PR Review: FAIL

Conclusion: Not ready. 1 readiness blocker must be resolved before merge.

Review checks

Check Result
PR format ❌ FAIL
Issue design ✅ PASS
Code & plan conformance ✅ PASS

Scope: 8d532cc4ef · 3e6e534dfa..8d532cc4ef · full · 1 diff chunk

Usage: 1m 11s · 263,432 tokens · 80.6% cache hit · 5.989 credits

Blockers

  • pr-linkage Pull request must natively close at least one same-repository Issue.

Summary

The complete diff's single chunk has no actionable findings or plan-conformance blockers.

Review metadata
  • Commit: 8d532cc4ef
  • Range: 3e6e534dfa..8d532cc4ef
  • Mode: full
  • Diff chunks: 1
  • Model: gpt-5.6-terra
  • Reasoning effort: medium
  • Session: repo-1309321116-pr-43-v2
  • Generation: c7fee32a3bbfabc0050656fbc53cd7238e10d3f4db35a48e102b66798348ba64
  • Evidence: 8180415dd464e1b0972811908938337987737dfc4d4f9608e7d890fd22e00e1d

Totals

  • Input: 259,326
  • Cached input: 209,045
  • Cache write: 50,248
  • Output: 4,106
  • Reasoning: 1,684
  • Total: 263,432
  • Estimated credits: 5.989
  • Credit rate per 1M tokens: 62.5 input / 6.25 cached / 375 output
Token and cache details
Stage Mode Target Time Input Cached Hit Output Total Credits
pr deterministic format rules 0s 0 0 0.0% 0 0 0.000
pr full pr 14s 34,826 20,340 58.4% 740 35,566 1.310
code full chunk 1/1 49s 153,937 120,146 78.0% 2,868 156,805 3.938
code full aggregate 8s 70,563 68,559 97.2% 498 71,061 0.740

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ OpenAI PR Review: PASS

Conclusion: Ready from the OpenAI review perspective. PR format, linked Issue design, and code/plan conformance passed with no actionable findings.

Review checks

Check Result
PR format ✅ PASS
Issue design ✅ PASS
Code & plan conformance ✅ PASS

Scope: 8d532cc4ef · 8d532cc4ef..8d532cc4ef · incremental · 1 diff chunk

Usage: 26s · 254,537 tokens · 83.1% cache hit · 4.576 credits

Summary

No code changes occurred in this generation; the prior complete code review remains applicable, and the linked Issue introduces no plan-conformance blocker.

Review metadata
  • Commit: 8d532cc4ef
  • Range: 8d532cc4ef..8d532cc4ef
  • Mode: incremental
  • Diff chunks: 1
  • Model: gpt-5.6-terra
  • Reasoning effort: medium
  • Session: repo-1309321116-pr-43-v2
  • Generation: 9fad17845c35b46593df712f88ee1c3c3298915f939092c5cff604293a4f7af8
  • Evidence: fda60ee57300e535984805950dad1d51317d763a4cb450d6f0f9e554a301eef5

Totals

  • Input: 252,979
  • Cached input: 210,132
  • Cache write: 42,829
  • Output: 1,558
  • Reasoning: 314
  • Total: 254,537
  • Estimated credits: 4.576
  • Credit rate per 1M tokens: 62.5 input / 6.25 cached / 375 output
Token and cache details
Stage Mode Target Time Input Cached Hit Output Total Credits
pr deterministic format rules 0s 0 0 0.0% 0 0 0.000
pr incremental pr 9s 74,798 50,718 67.8% 474 75,272 2.000
issue full Issue #44 8s 84,102 78,011 92.8% 533 84,635 1.068
code reused chunk 1 0s 0 0 0.0% 0 0 0.000
code incremental aggregate 9s 94,079 81,403 86.5% 551 94,630 1.508

@idy
idy merged commit cb6b80f into main Sep 22, 2026
19 checks passed
@idy
idy deleted the fix/revalidate-issue-relationship-blockers branch September 22, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Revalidate stale Issue relationship blockers

1 participant