Skip to content

fix(db): index decision_ledger_anchors on (row_hash, status) - #9827

Closed
shin-core wants to merge 1 commit into
JSONbored:mainfrom
shin-core:fix/decision-anchor-rowhash-index-9652
Closed

fix(db): index decision_ledger_anchors on (row_hash, status)#9827
shin-core wants to merge 1 commit into
JSONbored:mainfrom
shin-core:fix/decision-anchor-rowhash-index-9652

Conversation

@shin-core

Copy link
Copy Markdown
Contributor

What & why

anchorBackendsMissingForRowHash (#9489, src/review/ledger-anchor-persistence.ts) runs

SELECT DISTINCT backend FROM decision_ledger_anchors WHERE row_hash = ? AND status = 'ok' AND backend IN (...)

once per row being re-anchored, but decision_ledger_anchors had no index on row_hash. So each call was a full table scan whose cost grows with the anchor ledger.

The fix

Add migration 0203 creating:

CREATE INDEX IF NOT EXISTS decision_ledger_anchors_row_hash_status ON decision_ledger_anchors (row_hash, status);

row_hash leads (the equality predicate); status is included so the status = 'ok' filter is served from the index rather than a row fetch. This mirrors the decision_ledger_record_id index added in migrations/0198. The migration contains nothing else — no schema or data change.

Note: the issue names migration 0202, but that number is now taken (0202_orb_signal_rollups.sql), so this uses the next contiguous free number, 0203.

Tests (test/unit/ledger-anchor-persistence.test.ts)

  • After replaying migrations/** (via createTestEnv), the index decision_ledger_anchors_row_hash_status exists, and EXPLAIN QUERY PLAN for the exact anchorBackendsMissingForRowHash predicate SEARCHes via it, not SCANs (fails without the migration).
  • The existing anchorBackendsMissingForRowHash behaviour cases (all-missing / some-present / all-present / different-rowHash) confirm results are unchanged after the migration.

Validation

  • npm run db:migrations:check green (contiguous 0001..0203); npm run db:schema-drift:check green (index on a raw-SQL table, no Drizzle change); npm run typecheck green.
  • migrations/** is outside Codecov's include, so the migration carries no coverage obligation; the test imports createTestEnv, so shards see real src/**.
  • git diff --check <base> HEAD clean; diff is the one migration + its test, no src/** source change.

Closes #9652

`anchorBackendsMissingForRowHash` (JSONbored#9489) runs
`SELECT DISTINCT backend FROM decision_ledger_anchors WHERE row_hash = ? AND status = 'ok' AND backend IN (...)`
once per row being re-anchored, but the table had no index on row_hash — so each
call was a full table scan that grows with the anchor ledger.

Add migration 0203 creating `decision_ledger_anchors_row_hash_status (row_hash, status)`
— row_hash first (the equality predicate), status included so the `status = 'ok'`
filter is served from the index rather than a row fetch. Mirrors the
decision_ledger_record_id index added in 0198. The migration contains nothing else.
(Issue named 0202; that number is now taken, so this is the next contiguous 0203.)

A new test asserts the index exists after replaying migrations and that the real
query SEARCHes via it (not SCAN); the existing anchorBackendsMissingForRowHash
behaviour cases confirm results are unchanged.

Closes JSONbored#9652
@shin-core
shin-core requested a review from JSONbored as a code owner July 29, 2026 11:49
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb

loopover-orb Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-29 12:13:08 UTC

2 files · 1 AI reviewer · no blockers · CI failing · unstable

🛑 Suggested Action - Fix Blockers

Review summary
This adds migration 0203 creating a composite index on decision_ledger_anchors(row_hash, status) to fix the full-table-scan cost of anchorBackendsMissingForRowHash, paired with a regression test that asserts the query plan SEARCHes the new index rather than SCANning the table. The migration is a pure CREATE INDEX IF NOT EXISTS with no schema/data change, is D1-remote-safe (no temp objects, ATTACH, PRAGMA, or transaction control), and numbering is contiguous per the PR description (0198 precedent, 0202 already taken). The test is well-targeted: it checks sqlite_master for the index and runs EXPLAIN QUERY PLAN against the exact predicate used in production code, so it genuinely fails without the migration rather than fabricating an unreachable scenario.

Nits — 4 non-blocking
  • The `validate` and `validate-tests` CI checks failed with no detail provided in this review's context — worth confirming the cause before merge since it isn't visible from the diff or CI summary here.
  • Consider adding a brief note in the migration file about why 0202 was skipped (already mentioned in the PR description but not in the SQL comments) so future readers scanning migrations/ don't wonder about the gap in referenced numbers.
  • If other hot-path ledger queries share a similar row_hash/status/backend filter shape, a quick audit for other missing composite indexes could preempt a similar fix later (not required for this PR).
  • Double check with `EXPLAIN QUERY PLAN` on production-scale data (not just the empty test DB) that the planner actually prefers the new index over any existing single-column index on row_hash, if one exists.

CI checks failing

  • validate
  • validate-tests

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #9652
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 63 registered-repo PR(s), 46 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor shin-core; Gittensor profile; 63 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR adds a new contiguous migration creating exactly the specified `(row_hash, status)` index with a header comment naming `anchorBackendsMissingForRowHash`, #9489, and the sibling precedent from migrations/0198, and adds tests confirming both the index's existence and unchanged query behavior, satisfying the issue's deliverables (using 0203 since 0202 was already taken, which is a reasonable a

Review context
  • Author: shin-core
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is registered but has no active allocation in the current snapshot.
  • Public profile languages: not available
  • Official Gittensor activity: 63 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Await review-lane availability.
  • Then work through the remaining 2 steps in the Signals table above.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

❌ 6 Tests Failed:

Tests completed Failed Passed Skipped
25207 6 25201 21
View the top 3 failed test(s) by shortest run time
test/unit/config-templates.test.ts > config/examples review templates (#1682) > loopover.full.yml body matches .loopover.yml.example from WHERE IT LIVES onward
Stack Traces | 0.028s run time
AssertionError: expected '# WHERE IT LIVES (first match wins):\…' to be '# WHERE IT LIVES (first match wins):\…' // Object.is equality

- Expected
+ Received

@@ -260,29 +260,10 @@
    # column or dashboard toggle.
    advisoryCheckRuns:
      - name: Contributor trust
        appSlug: example-security-app

-   # Check-runs to IGNORE ENTIRELY (#9810) — the stronger sibling of advisoryCheckRuns above. Same
-   # spoof-resistant { name, appSlug } matching, but a matched run is treated as if it did not exist: it never
-   # gates CI, never counts as "still running", and — unlike advisory — never routes the PR to a manual-review
-   # hold either. Its conclusion is surfaced informationally only.
-   #
-   # Use this when a check's verdict carries no signal for YOUR repo while OTHER checks from the same app stay
-   # meaningful. The motivating case: a vendor app publishes both a real security scan AND a heuristic
-   # contributor-trust score. The scan is worth gating on; the trust score fails for perfectly good
-   # contributors, and listing it under advisoryCheckRuns still converts every one of their otherwise-clean PRs
-   # into a manual review — automation replaced by a queue of human decisions, and contributors left wondering
-   # whether they are being judged fairly. Ignoring the trust check keeps the scan's protection and drops the
-   # noise. If BOTH lists name the same check, ignore wins (it is the stronger, more explicit intent).
-   #
-   # List of { name, appSlug }, or omit. Default: not configured (byte-identical behavior for every repo that
-   # doesn't opt in). Config-as-code only — no DB column or dashboard toggle.
-   ignoredCheckRuns:
-     - name: Contributor trust
-       appSlug: example-security-app
-
    # Promote a confident AI-judgment-only finding (one the reviewer itself placed under "Blockers", never
    # a "Nit") into a real, deterministic gate blocker instead of leaving it advisory (#3907). Only matters
    # for repos already running the registry content lane (see contentLane below) — content/registry repos
    # have no schema/lint/codecov net to catch a semantically-wrong-but-structurally-valid defect, so their
    # own AI reviewer's judgment is the only thing that ever catches it.

 ❯ test/unit/config-templates.test.ts:39:57
test/unit/agent-approval-queue.test.ts > agent approval queue (#779) > falls back to expectedCiContexts when the accept-time branch-protection read fails
Stack Traces | 0.0511s run time
AssertionError: expected "vi.fn()" to be called with arguments: [ { …(29) }, 'owner/repo', 'h7', …(4) ]

Received:

  1st vi.fn() call:

@@ -46,12 +46,13 @@
        "send": [Function send],
      },
    },
    "owner/repo",
    "h7",
-   Any<String>,
+   "test-installation-token",
    Set {
      "build",
    },
-   Any<String>,
+   "installation:5",
+   null,
    null,
  ]


Number of calls: 1

 ❯ test/unit/agent-approval-queue.test.ts:617:34
test/unit/agent-approval-queue.test.ts > agent approval queue (#779) > unions branch-protection contexts into the accept-time live CI re-check
Stack Traces | 0.0692s run time
AssertionError: expected "vi.fn()" to be called with arguments: [ { …(29) }, 'owner/repo', 'h7', …(4) ]

Received:

  1st vi.fn() call:

@@ -46,13 +46,14 @@
        "send": [Function send],
      },
    },
    "owner/repo",
    "h7",
-   Any<String>,
+   "test-installation-token",
    Set {
      "branch-required",
      "build",
    },
-   Any<String>,
+   "installation:5",
+   undefined,
    undefined,
  ]

  2nd vi.fn() call:

@@ -46,13 +46,14 @@
        "send": [Function send],
      },
    },
    "owner/repo",
    "h7",
-   Any<String>,
+   "test-installation-token",
    Set {
      "branch-required",
      "build",
    },
-   Any<String>,
-   undefined,
+   "installation:5",
+   null,
+   null,
  ]


Number of calls: 2

 ❯ test/unit/agent-approval-queue.test.ts:602:34
test/unit/agent-approval-queue.test.ts > agent approval queue (#779) > threads the repo's expectedCiContexts into the accept-time live CI re-check
Stack Traces | 0.0876s run time
AssertionError: expected "vi.fn()" to be called with arguments: [ { …(29) }, 'owner/repo', 'h7', …(4) ]

Received:

  1st vi.fn() call:

@@ -46,13 +46,14 @@
        "send": [Function send],
      },
    },
    "owner/repo",
    "h7",
-   Any<String>,
+   "test-installation-token",
    Set {
      "build",
      "test",
    },
-   Any<String>,
+   "installation:5",
+   undefined,
    undefined,
  ]

  2nd vi.fn() call:

@@ -46,13 +46,14 @@
        "send": [Function send],
      },
    },
    "owner/repo",
    "h7",
-   Any<String>,
+   "test-installation-token",
    Set {
      "build",
      "test",
    },
-   Any<String>,
-   undefined,
+   "installation:5",
+   null,
+   null,
  ]


Number of calls: 2

 ❯ test/unit/agent-approval-queue.test.ts:586:34
test/unit/queue.test.ts > queue processors > surfaces stale optional CI after the stale-CI cap
Stack Traces | 0.339s run time
AssertionError: expected "fetchLiveCiAggregatePreferGraphQl" to be called with arguments: [ Anything, 'owner/agent-repo', …(5) ]

Received:

  1st fetchLiveCiAggregatePreferGraphQl call:

  [
-   Anything,
+   {
+     "ADMIN_GITHUB_LOGINS": "jsonbored",
+     "AI_REVIEW_CLOSE_CONFIDENCE_AUTOTUNE_ENABLED": "false",
+     "AI_REVIEW_CLOSE_CONFIDENCE_TIGHTEN_ENABLED": "false",
+     "CONFIG_DRIFT_SENTINEL_ENABLED": "false",
+     "DB": TestD1Database {
+       "db": DatabaseSync {
+         "isOpen": true,
+         "isTransaction": false,
+         Symbol(sqlite-type): "node:sqlite",
+       },
+     },
+     "GITHUB_APP_ID": "3824093",
+     "GITHUB_APP_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----
+ MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDTVWGJF4mO7d6n
+ R2xFLtBhLCHURVvKLMfSoa9onfk6gjbkFf8IvAyhO3uLgcLWU03QZC5yW+AuXHyT
+ IqSB6MRrbpZRkZoJLvB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57ygSYv+xxkQgdP5J0gb/pVtp8P9/TiJuKnhfPnAid
+ yWEhU6xWlrV//zfBfHCDTiyeZzFpzt9dSP65zKhm8JATCztEwgSBxZgvPwKBgHUM
+ ANcf5eXJmguxWV51spMPGNeJ7dyys7HdEMTRwvEGPWTihmEJ7vleuRhEKzbuuQd6
+ NXOyMAhztxc8RJGFVQ7mze9NAx1/9/bWO6W2f0Xf9Vv0UJO4EKJnY8YcFMaSdKQO
+ hSDkto7AEjJe7ON3JvDHOkCmewLkHdx0BmYmBm1JAoGAHoVZ8EgQ8Iqp3xOrbXyr
+ EZwPIx9QOYNFc6PBM6CDDgNcgQXuZAEC+pyWLl0hbfiDsTA9gVQP5bvyuXXUy4Sj
+ IZiz5IPfuiLqnPNSeJBoJIktEEbYG+PN3WcppFJAreGpSMurA7S9BTD3I2favdV/
+ SrHvQ7rh467jU4U0lhgzYV0=
+ -----END PRIVATE KEY-----",
+     "GITHUB_APP_SLUG": "loopover-orb",
+     "GITHUB_WEBHOOK_SECRET": "test-webhook-secret",
+     "GITTENSOR_REGISTRY_URL": "https://raw.githubusercontent..../validator/weights/master_repositories.json",
+     "GITTENSOR_UPSTREAM_REF": "test",
+     "GITTENSOR_UPSTREAM_REPO": "entrius/gittensor",
+     "INTERNAL_JOB_TOKEN": "dev-internal-token",
+     "JOBS": {
+       "send": [Function send],
+     },
+     "LOOPOVER_API_TOKEN": "test-api-token",
+     "LOOPOVER_AUTO_FILE_DRIFT_ISSUES": "false",
+     "LOOPOVER_DRIFT_ISSUE_REPO": "test-harness/no-self-repo-match",
+     "LOOPOVER_EXPERIMENTAL_GITTENSOR": "false",
+     "LOOPOVER_FAIRNESS_ANALYTICS": "false",
+     "LOOPOVER_MCP_TOKEN": "test-mcp-token",
+     "LOOPOVER_REVIEW_REPOS": "JSONbored/gittensory,acme/widgets",
+     "LOOPOVER_SKIP_AUTOMATION_BOT_PRS": "true",
+     "MCP_ACTUATION_REPO_ALLOWLIST": "*",
+     "MCP_READ_REPO_ALLOWLIST": "*",
+     "PUBLIC_API_ORIGIN": "https://api.loopover.ai",
+     "PUBLIC_SITE_ORIGIN": "https://loopover.ai",
+     "SATISFACTION_FLOOR_AUTOTUNE_ENABLED": "false",
+     "SELFHOST_TRANSIENT_CACHE": {
+       "claim": [Function claim],
+       "del": [Function del],
+       "get": [Function get],
+       "releaseIfValue": [Function releaseIfValue],
+       "set": [Function set],
+     },
+     "WEBHOOKS": {
+       "send": [Function send],
+     },
+   },
    "owner/agent-repo",
    "a7",
-   Any<String>,
+   "installation-token",
    Set {
      "trusted-required-ci",
    },
    "installation:9001",
+   undefined,
    undefined,
  ]

  2nd fetchLiveCiAggregatePreferGraphQl call:

  [
-   Anything,
+   {
+     "ADMIN_GITHUB_LOGINS": "jsonbored",
+     "AI_REVIEW_CLOSE_CONFIDENCE_AUTOTUNE_ENABLED": "false",
+     "AI_REVIEW_CLOSE_CONFIDENCE_TIGHTEN_ENABLED": "false",
+     "CONFIG_DRIFT_SENTINEL_ENABLED": "false",
+     "DB": TestD1Database {
+       "db": DatabaseSync {
+         "isOpen": true,
+         "isTransaction": false,
+         Symbol(sqlite-type): "node:sqlite",
+       },
+     },
+     "GITHUB_APP_ID": "3824093",
+     "GITHUB_APP_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----
+ MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDTVWGJF4mO7d6n
+ R2xFLtBhLCHURVvKLMfSoa9onfk6gjbkFf8IvAyhO3uLgcLWU03QZC5yW+AuXHyT
+ IqSB6MRrbpZRkZoJLvBMAa/QnXD1PZZgD+lPORyME1q6FTlM3pc16wyqTSw+PNkU
+ VgWk0gtYB2fVCUgwBJMWct8ZjfkGhB7udJREcDVU1yIAYUYgLWkdDcJKAYPhaNhS
+ BNuywAAp+2w266RXtYuJyJyassMfdZABMtjtzlAWx7RZxR45cjHr3URqUp7QaQF6
+ JzwqptvxFz/2urRd+fRNnvttDx9TsiWbI0H/nX5WklCjO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Vv0UJO4EKJnY8YcFMaSdKQO
+ hSDkto7AEjJe7ON3JvDHOkCmewLkHdx0BmYmBm1JAoGAHoVZ8EgQ8Iqp3xOrbXyr
+ EZwPIx9QOYNFc6PBM6CDDgNcgQXuZAEC+pyWLl0hbfiDsTA9gVQP5bvyuXXUy4Sj
+ IZiz5IPfuiLqnPNSeJBoJIktEEbYG+PN3WcppFJAreGpSMurA7S9BTD3I2favdV/
+ SrHvQ7rh467jU4U0lhgzYV0=
+ -----END PRIVATE KEY-----",
+     "GITHUB_APP_SLUG": "loopover-orb",
+     "GITHUB_WEBHOOK_SECRET": "test-webhook-secret",
+     "GITTENSOR_REGISTRY_URL": "https://raw.githubusercontent..../validator/weights/master_repositories.json",
+     "GITTENSOR_UPSTREAM_REF": "test",
+     "GITTENSOR_UPSTREAM_REPO": "entrius/gittensor",
+     "INTERNAL_JOB_TOKEN": "dev-internal-token",
+     "JOBS": {
+       "send": [Function send],
+     },
+     "LOOPOVER_API_TOKEN": "test-api-token",
+     "LOOPOVER_AUTO_FILE_DRIFT_ISSUES": "false",
+     "LOOPOVER_DRIFT_ISSUE_REPO": "test-harness/no-self-repo-match",
+     "LOOPOVER_EXPERIMENTAL_GITTENSOR": "false",
+     "LOOPOVER_FAIRNESS_ANALYTICS": "false",
+     "LOOPOVER_MCP_TOKEN": "test-mcp-token",
+     "LOOPOVER_REVIEW_REPOS": "JSONbored/gittensory,acme/widgets",
+     "LOOPOVER_SKIP_AUTOMATION_BOT_PRS": "true",
+     "MCP_ACTUATION_REPO_ALLOWLIST": "*",
+     "MCP_READ_REPO_ALLOWLIST": "*",
+     "PUBLIC_API_ORIGIN": "https://api.loopover.ai",
+     "PUBLIC_SITE_ORIGIN": "https://loopover.ai",
+     "SATISFACTION_FLOOR_AUTOTUNE_ENABLED": "false",
+     "SELFHOST_TRANSIENT_CACHE": {
+       "claim": [Function claim],
+       "del": [Function del],
+       "get": [Function get],
+       "releaseIfValue": [Function releaseIfValue],
+       "set": [Function set],
+     },
+     "WEBHOOKS": {
+       "send": [Function send],
+     },
+   },
    "owner/agent-repo",
    "a7",
-   Any<String>,
+   "installation-token",
    Set {
      "trusted-required-ci",
    },
    "installation:9001",
+   undefined,
    undefined,
  ]


Number of calls: 2

 ❯ test/unit/queue.test.ts:1872:25
test/unit/queue.test.ts > queue processors > durable CI-state snapshot cache (#selfhost-ci-verification, cross-job) > REGRESSION (#selfhost-ci-verification gate review): a swallowed branch-protection read failure never writes the fail-open aggregate through to the durable cache
Stack Traces | 0.341s run time
AssertionError: expected { …(24) } to match object { ciState: 'passed', …(1) }
(22 matching properties omitted from actual)

- Expected
+ Received

  {
-   "ciRequiredContextsKey": "[\"trusted-required-ci\"]|adv:",
+   "ciRequiredContextsKey": "[\"trusted-required-ci\"]|adv:|ign:",
    "ciState": "passed",
  }

 ❯ test/unit/queue.test.ts:3172:81

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 29, 2026
@loopover-orb

loopover-orb Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 29, 2026
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.

db: decision_ledger_anchors has no index on `row_hash

1 participant