fix(review): add expression index for case-insensitive calibration login lookup#5324
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-12 21:36:15 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 5 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agent
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 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.
|
abebdc9 to
94c10f5
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5324 +/- ##
=======================================
Coverage 94.71% 94.71%
=======================================
Files 555 555
Lines 44526 44526
Branches 14664 14664
=======================================
Hits 42172 42172
Misses 1619 1619
Partials 735 735
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Motivation
lower(login) = ?which prevents SQLite/D1 from using the existing(login, created_at)index and makes contributor-triggerable reads scan the entire insert-only ledger, risking availability as the ledger grows.Description
0146_predicted_gate_calibration_ledger_login_lower_idx.sqlthat creates an expression index onlower(login), created_atfor thepredicted_gate_calibration_ledgertable to match theWHERE lower(login) = ?lookup.test/unit/predicted-gate-calibration-ledger.test.tsthat asserts the indexpredicted_gate_calibration_ledger_login_lower_idxexists and thatEXPLAIN QUERY PLANfor the canonicalized query uses that index rather than scanning the table.worker-configuration.d.ts) to satisfy the localcf-typegenchecks.Testing
npx vitest run test/unit/predicted-gate-calibration-ledger.test.ts, and the unit test file passed (25 tests).npm run db:migrations:check, which reported migrations are contiguous and the next free number is available (0147).git diff --check, which passed with no issues reported for the change set.npm run test:ci, which failed duringtsc --noEmiton unrelated, pre-existing type errors (missing@jsonbored/gittensory-enginemodule/types and implicit-any errors in miner tests), so the full CI gate could not be completed locally.npm audit --audit-level=moderate, which failed due to the npm registry audit endpoint returning403 Forbidden(external registry error).Codex Task