Skip to content

fix(engine): screenshot-table matrix mode has no re-push staleness guard despite doc comment claiming otherwise #8866

Description

@JSONbored

⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.

Context

packages/loopover-engine/src/review/screenshot-table-gate.ts's doc comment (~379-383, near the headSha parameter) states "matrix mode and bot-capture already have their own head-SHA-correct evidence paths," but evaluateScreenshotTableGate's matrix branch (~395-400) only calls a pure regex re-scan (missingScreenshotMatrixPairs) with no headSha involved at all -- the staleness/evidence-fingerprint logic is wired only into presence-mode. A contributor satisfying the matrix table once gets an identical PASS on every subsequent push even after a real visual regression -- exactly the bug class the presence-mode staleness fix was built to close.

Requirements

Implement the same head-SHA/evidence-fingerprint staleness check for the matrix branch that presence-mode already has (reuse the existing mechanism rather than inventing a second one), so a re-push after the matrix table was originally satisfied re-validates freshness the same way presence-mode does.

Deliverables

  • The matrix branch of evaluateScreenshotTableGate performs the same head-SHA/evidence-fingerprint staleness check as presence-mode
  • A regression test mirroring the existing presence-mode staleness test in test/unit/queue-3.test.ts, but for matrix mode: a PR satisfies the matrix table, then pushes a new commit with a real visual regression, and the gate must not silently PASS on stale evidence

All of the above Deliverables are required in the same PR unless the deliverable text itself states otherwise.

Test Coverage Requirements

packages/loopover-engine/** -- 99%+ patch coverage, branch-counted, on the new matrix-mode staleness path.

Expected Outcome

Matrix-mode screenshot-table evaluation re-validates freshness on every push, matching presence-mode's existing behavior and the doc comment's claim.

Links & Resources

  • packages/loopover-engine/src/review/screenshot-table-gate.ts:379-400
  • test/unit/queue-3.test.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions