Skip to content

fix(review): require current-head CI for green chip - #1072

Closed
JSONbored wants to merge 1 commit into
mainfrom
codex/propose-fix-for-ci-green-vulnerability
Closed

fix(review): require current-head CI for green chip#1072
JSONbored wants to merge 1 commit into
mainfrom
codex/propose-fix-for-ci-green-vulnerability

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • Prevent the unified PR comment from displaying a misleading CI green chip when cached check summaries from old head SHAs or partial/pending checks exist.
  • Ensure public merge-readiness reflects only the current PR head so maintainers aren't misled about CI status.

Description

  • Add buildMergeReadinessFromChecks in src/review/unified-comment-bridge.ts to compute MergeReadiness by filtering cached CheckSummaryRecords to the PR headSha and requiring every current-head check be completed successfully before returning ciState: "passed".
  • Replace the ad-hoc any-success logic in src/queue/processors.ts with a call to buildMergeReadinessFromChecks({ checks, headSha: pr.headSha, mergeableState: pr.mergeableState }) so the unified comment uses current-head-only readiness.
  • Preserve failure reporting by including failing current-head check names in the failingChecks field when appropriate.
  • Add unit tests in test/unit/unified-comment-bridge.test.ts covering stale success + pending checks, all-current-head-success, and current-head failure cases, and export the new helper for testing.

Testing

  • Ran unit tests with npx vitest run test/unit/unified-comment-bridge.test.ts, and the suite passed.
  • Ran static type checks with npm run typecheck (tsc --noEmit), and type checking succeeded.

Codex Task

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@ghost

ghost commented Jun 22, 2026

Copy link
Copy Markdown

Note

🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦🟦

💡 Gittensory review — advisory only

0 files · no blockers · readiness 0/100

💡 Advisory only — PR closed before full evaluation. No late first comment was created.

Signal Result Evidence
Code review ✅ No blockers synthesized
Gate result ⚠️ Skipped #1072 is no longer open.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost 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.

Gittensory approves — the gate is satisfied and CI is green.

@ghost ghost added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 23, 2026
@JSONbored JSONbored self-assigned this Jun 23, 2026
@JSONbored

Copy link
Copy Markdown
Owner Author

Closing as obsolete: superseded on main by #1075/#1076/#1077, which replaced the cached-summary 'CI green' chip with a live current-head CI fetch (fetchLiveCiAggregate). The vulnerability this PR targeted (stale/partial cached checks shown as green) is already fixed by a stronger mechanism on main.

@JSONbored JSONbored closed this Jun 23, 2026
@JSONbored
JSONbored deleted the codex/propose-fix-for-ci-green-vulnerability branch June 23, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant