fix(review): correlate screenshot-table presence-mode evidence to the PR head SHA - #6467
Merged
Merged
Conversation
… PR head SHA The screenshot-table gate's PRESENCE-mode check (evaluateScreenshotTableGate) was pure regex/string matching over the PR body with no tie to the PR's live head SHA, unlike the bot-capture evidence path in the same function. A before/after table pasted on an early push kept satisfying the gate forever, even after later commits shipped a real visual regression the table never pictured. Presence-mode now fingerprints the exact before/after evidence (the extracted image URLs) and correlates it to the head SHA it last satisfied the gate at. A later push carrying the identical, unedited evidence re-violates; genuinely new evidence (the contributor re-affirms after the push) or a successful bot capture on the new head clears it again. The checkpoint is persisted (mirrors visualCaptureSatisfiedSha's headSha-keyed write) via a new markPullRequestScreenshotTablePresenceSatisfied call in the maintenance planner, backed by a new pull_requests column/migration. Mirrored the same change into the loopover-engine twin copy of this file to keep engine-parity green, and added a regression test reproducing the audited two-push scenario (table passes on push #1, then silently stays stale through push #2 pre-fix).
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6467 +/- ##
==========================================
- Coverage 95.59% 95.59% -0.01%
==========================================
Files 589 589
Lines 47025 47038 +13
Branches 14951 14955 +4
==========================================
+ Hits 44952 44964 +12
- Misses 1291 1292 +1
Partials 782 782
Flags with carried forward coverage won't be shown. Click here to find out more.
|
2 tasks
glorydavid03023
pushed a commit
to glorydavid03023/gittensory
that referenced
this pull request
Jul 16, 2026
PR JSONbored#6454 (draft-pr-close-policy) and PR JSONbored#6467 (screenshot-table-gate-head-sha-correlation) both grabbed migration number 0156, merging 23 minutes apart without seeing each other's number. db:migrations:check now fails on main for every PR. Renumber the later-merged one (JSONbored#6467) to the next free number.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 1 confirmed adversarial-audit finding(s) in
src/review/screenshot-table-gate.ts:src/review/screenshot-table-gate.ts)Each fix follows the audit's own verified failure scenario and root-cause analysis (2-independent-skeptic adversarial verification pass, both had to vote "confirmed").
Closes #6417
Test plan
npm run test:ci) green