Skip to content

fix(review): close 5 real pre-existing regressions on main#9276

Merged
JSONbored merged 1 commit into
mainfrom
fix/main-regressions-batch-2026-07-27
Jul 27, 2026
Merged

fix(review): close 5 real pre-existing regressions on main#9276
JSONbored merged 1 commit into
mainfrom
fix/main-regressions-batch-2026-07-27

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Confirmed via a clean origin/main checkout that 8 test files (12 test cases) were failing independently of any in-flight PR — a real, pre-existing regression, not caused by any branch. Root causes, all genuine bugs or stale test assertions from very recent merges in today's heavy churn:

  1. linked-issue-label-propagation-fetch.ts: a merge-conflict resolution's fix (the direct-ownership-match exemption from the reward-label satisfaction-verdict check, orb(rewards): a contributor who authored the linked issue inherits every label on it, bypassing the reward-label trust gate and its opt-in flag #9161/orb(rewards): the Gittensor reward multiplier is chosen by contributor-authored PR title text #9077) was verified locally but never actually committed before its branch was pushed — silently lost. Re-applied.
  2. config-lint.ts's mergeReadinessCompositeWarnings fired even when gate.mergeReadiness is explicitly "off", which is a genuine no-op and never worth warning about — only null/unset and "off" should both short-circuit.
  3. predicted-gate-engine.test.ts asserted gateMode(undefined) === "advisory", the pre-orb(config): mergeReadiness:advisory silently demotes three explicitly-blocking gates at once, and unknown gate modes coerce toward merge #9167 fallback; orb(config): mergeReadiness:advisory silently demotes three explicitly-blocking gates at once, and unknown gate modes coerce toward merge #9167 intentionally made this fail closed ("block") for a malformed value. Test updated to match.
  4. loopover-engine-scaffold.test.ts asserted a stale package.json "files" shape; orb(testing): engine package tests contribute zero coverage evidence, and two v8-ignore directives are malformed #9064's engine-coverage work legitimately changed it to source-map-friendly glob patterns. Test updated to match.
  5. The merge-readiness-composite-preserves-explicit-block engine-parity fixture encoded a "composite only fills in an unset sub-gate" semantic that was deliberately reverted (see applyMergeReadinessGate's own doc comment: unreachable in practice, since every sub-gate mode is already a concrete DB-defaulted value by the time it reaches GateCheckPolicy). Renamed and corrected to assert the actual (override) behavior, with a fresh golden recorded via scripts/record-engine-parity-goldens.ts. queue-5.test.ts's REGRESSION (#4528) test hit the same reward-label gate from a different angle and needed the same two assertions corrected.
  6. reputation-wiring.test.ts's seedReviewTarget helper still wrote into review_targets, frozen by the 2026-06-22 convergence cutover (orb(observability): the orphaned review_targets table silently disables the anomaly alerter, the reputation quality signal, and the AMS bridge — and the reputation half expires to empty around 2026-09-20 #9136 repointed getSubmitterReputation/getSubmitterReputationAcrossInstall onto the live review_audit ledger, but this test helper was never updated to match). Rewritten to seed review_audit + pull_requests directly, mirroring submitter-reputation.ts's own query shape; also registered the synthetic repos an install-wide test needs (the cross-repo query joins on repositories.installation_id), and repointed a stale review_targets backdating UPDATE at pull_requests (orb(security): reputation burst-downgrade fails OPEN — suspected abusers get LESS review (LIVE in prod) #9015 already repointed the cadence query itself).

Test plan

  • npx tsc --noEmit -p tsconfig.json --incremental false — clean
  • All 8 originally-failing files, 376 tests — now green (test/unit/reputation-wiring.test.ts, test/unit/queue-5.test.ts, test/unit/linked-issue-label-propagation-fetch.test.ts, test/unit/predicted-gate-engine.test.ts, test/unit/config-templates.test.ts, test/unit/loopover-engine-scaffold.test.ts, test/contract/engine-parity.test.ts, test/unit/engine-parity-fixtures.test.ts)
  • npm run db:migrations:check / npm run cf-typegen / npm run selfhost:env-reference — clean, no drift
  • Rebased onto latest origin/main, re-verified after rebase

Not run locally: the full npm run test:coverage/test:ci gate (this repo's other workspace packages — mcp/miner/ui-kit — weren't built in this worktree, which produces unrelated ENOENT/missing-dist noise on an unscoped vitest run; CI builds everything properly).

Confirmed via a clean origin/main checkout that 8 test files (12 test cases)
were failing independently of any in-flight PR. Root causes, all real bugs
or stale test assertions from recent merges:

1. linked-issue-label-propagation-fetch.ts: a merge-conflict resolution's
   fix (the direct-ownership-match exemption from the reward-label
   satisfaction-verdict check, #9161/#9077) was verified locally but never
   actually committed before its branch was pushed -- silently lost.
   Re-applied.

2. config-lint.ts's mergeReadinessCompositeWarnings fired even when
   gate.mergeReadiness is explicitly "off", which is a genuine no-op and
   never worth warning about -- only null/unset and off should both
   short-circuit.

3. predicted-gate-engine.test.ts asserted gateMode(undefined) === "advisory",
   the pre-#9167 fallback; #9167 intentionally made this fail closed
   ("block") for a malformed value. Test updated to match.

4. loopover-engine-scaffold.test.ts asserted a stale package.json "files"
   shape; #9064's engine-coverage work legitimately changed it to
   source-map-friendly glob patterns. Test updated to match.

5. The "merge-readiness-composite-preserves-explicit-block" engine-parity
   fixture encoded a "composite only fills in an unset sub-gate" semantic
   that was deliberately reverted (see applyMergeReadinessGate's own doc
   comment: unreachable in practice, since every sub-gate mode is already a
   concrete DB-defaulted value by the time it reaches GateCheckPolicy).
   Renamed and corrected to assert the actual (override) behavior, with a
   fresh golden recorded via scripts/record-engine-parity-goldens.ts.
   queue-5.test.ts's REGRESSION (#4528) test hit the same reward-label gate
   from a different angle and needed the same two assertions corrected.

6. reputation-wiring.test.ts's seedReviewTarget helper still wrote into
   review_targets, frozen by the 2026-06-22 convergence cutover (#9136
   repointed getSubmitterReputation/getSubmitterReputationAcrossInstall
   onto the live review_audit ledger, but this test helper was never
   updated to match). Rewritten to seed review_audit + pull_requests
   directly, mirroring submitter-reputation.ts's own query shape; also
   registered the synthetic repos an install-wide test needs (the
   cross-repo query joins on repositories.installation_id) and repointed
   a stale review_targets backdating UPDATE at pull_requests (#9015
   already repointed the cadence query itself).
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
loopover-ui bc9ed2a Commit Preview URL

Branch Preview URL
Jul 27 2026, 11:02 AM

@JSONbored JSONbored self-assigned this Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
23103 5 23098 21
View the top 3 failed test(s) by shortest run time
test/unit/selfhost-pg-retention.test.ts > runRetentionPrune + processJob on the Postgres backend (#977) > processJob prune-retention deletes eligible rows and records a success audit event on Postgres
Stack Traces | 0.00467s run time
AssertionError: expected 3 to be +0 // Object.is equality

- Expected
+ Received

- 0
+ 3

 ❯ test/unit/selfhost-pg-retention.test.ts:119:44
test/unit/selfhost-pg-retention.test.ts > pruneExpiredRecords on the Postgres backend (#977) > deletes across multiple bounded batches and stops at the per-table cap, same as the SQLite path
Stack Traces | 0.0114s run time
AssertionError: expected +0 to be 4 // Object.is equality

- Expected
+ Received

- 4
+ 0

 ❯ test/unit/selfhost-pg-retention.test.ts:76:33
test/unit/selfhost-metrics.test.ts > DEFAULT_METRIC_META completeness (drift guard, 2026-07 fix) > every literal metric name emitted anywhere in src/ has a registered DEFAULT_METRIC_META entry
Stack Traces | 0.192s run time
AssertionError: expected [ …(2) ] to deeply equal []

- Expected
+ Received

- []
+ [
+   "loopover_orb_relay_multiple_live_enrollments_total",
+   "loopover_private_manifest_warnings_total",
+ ]

 ❯ test/unit/selfhost-metrics.test.ts:498:21
test/unit/worker-entry-boundary.test.ts > worker entry boundary > does not reference pixelmatch, pngjs, visual-diff, gifenc, or sharp in worker-reachable source
Stack Traces | 0.503s run time
AssertionError: worker-reachable files must not mention Node-only visual diff/GIF/image deps: .../review/visual/visual-findings.ts: expected [ Array(1) ] to deeply equal []

- Expected
+ Received

- []
+ [
+   ".../review/visual/visual-findings.ts",
+ ]

 ❯ test/unit/worker-entry-boundary.test.ts:82:118
View the full list of 1 ❄️ flaky test(s)
test/unit/salvageability.test.ts > resolveAiReviewSalvageableHold > defaults: no configured floor uses the gate default, and a confidence-less blocker counts as certainty (at/above floor)

Flake rate in main: 100.00% (Passed 0 times, Failed 8 times)

Stack Traces | 0.00671s run time
AssertionError: expected undefined to be defined
 ❯ test/unit/salvageability.test.ts:88:18

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@JSONbored
JSONbored merged commit b7720b3 into main Jul 27, 2026
5 of 7 checks passed
@JSONbored
JSONbored deleted the fix/main-regressions-batch-2026-07-27 branch July 27, 2026 11:12
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.

1 participant