docs(todo): 20 — reconcile the things index budget under MongoDB's 64 cap - #405
docs(todo): 20 — reconcile the things index budget under MongoDB's 64 cap#405lopugit wants to merge 4 commits into
Conversation
… cap Filed after PR #401/#402, where a local ensureIndexes run hit the cap and took registration down with it. Captures: the measured budget (49 code-defined indexes on things, ~14 slots of headroom); why a dev database reads high (every worktree ensures its own branch's indexes into one local mongod, and siblings resurrect retired ones); the failure mode (one Promise.all battery — any failed createIndex 500s register/login, and create-then-drop swaps need a free slot); and evidence-backed reclamation candidates, chiefly five legacy kind/ visibility indexes that match 0 of 6831 local docs and appear nowhere in the code outside their own definitions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Develop S3 preview ready
The alias passed the develop bucket CORS preflight and a final live PR/SHA fence. Generic Vercel Preview deployments use the shared development runtime; this controller adds the stable exact-SHA alias and marker-scoped cleanup. |
…et under MongoDB's 64 cap
Lopu repository reviewLopu reviewed this PR against develop as Thingtime's principal PR and repository manager. Using Claude Opus 5. Lopu found no justified local change to publish from this review pass. Lopu review — PR #405 · docs(todo): 20 — reconcile the things index budget under MongoDB's 64 capCompared: (The two-dot diffstat looks enormous — ~232k lines across 172 files — but that What I looked atThe doc itself, closely, because a planning doc that gets its numbers wrong is FindingsNo defects. This is unusually good technical writing and I want to say why. It is right about the things that are easy to get wrong:
That last point is now more than theoretical. While reviewing #373 in this I dumped the plan on that branch: 60 distinct indexes from The doc's framing ("Nothing here is urgent; production has headroom") is true of Changes madeNone. It is a docs-only PR, its numbers check out against the live code, and Validation run
CodeQL16 open alerts on this head — every one pre-existing on 5 deliberately left open — #18/#19 ( |
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
|
🤖 Lopu — I re-derived your numbers from Rather than review the prose, I measured. I lifted
The §3c family breakdown is exact too — I grouped all 47 key specs by leading field: And the §4.5 portability claim: Your warning that grepping Two live data points that strengthen §4 step 5Your "partly done elsewhere" note is accurate and current — I confirmed
Worth adding to §4, or to §5's definition of done: decouple One more worked example for the rulePR #382 (components runtime, also in this batch) adds a whole Content§3a's ordering argument is the reasoning I checked hardest, and it is right: for an Two optional nits: §1's "63 — what a long-lived local dev database showed" row invites a misread as a fourth measurement (worth marking "not a budget reading" in the cell, since it is the number someone will quote from memory); and §4 step 5 proposes a ceiling of 56 while No changes requested. |
…et under MongoDB's 64 cap
🦉 Lopu — the doc's numbers hold; the PR description contradicts them by oneI re-derived the census independently rather than re-reading my own earlier confirmation — bracket-matched the 36 Your methodology note is the reason it lands: rejecting The one correction — in the description, not the doc
The doc says 48 code-defined, Same paragraph, softer: " CodeQL — repo-wide adjudication recorded on this PRThis PR changes only Markdown, so it introduces none of the 16 open alerts on its head; the identical 16 sit on #382 and #135, which share no code with it or each other. Since alerts are repo-global I adjudicated the set once here rather than writing the same array into four files. Dispositioned — 12, each with file/line evidence: #7 ( Left open — 4, because I judge them potentially real and won't dismiss a finding to green a check:
Nothing changed in this worktree — the doc is accurate and editing it to restate numbers it already states correctly would be churn. — 🦉 Lopu, Thingtime's PR manager |
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
|
🤖 Lopu — numbers still hold at the current Re-ran the measurement against
Identical at the PR head and at the develop tip, so §1's 2026-08-25 measurement is still current. Your undercount warning holds up under a direct count too: only 14 of the 47 carry an explicit Also re-confirmed §4.5's portability claim against this exact base: The
|
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
|
🤖 Lopu — I re-derived this doc's numbers from The measurements reproduce exactly ✅Driving the real The §3a insight is the most valuable thing here and it's correct: dropping a
|
|
These examples are warning-only. They do not fail the build/API contexts or block this PR.
Sanitized tailnode:internal/modules/run_main:123
triggerUncaughtException(
^
AssertionError [ERR_ASSERTION]: all-branch.yml must stay retired; Lopu PR manager owns its former public triggers
true !== false
at file:///home/runner/work/thingtime/thingtime/remix/scripts/workflow-caller-contract.mjs:39:10
at ModuleJob.run (node:internal/modules/esm/module_job:343:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:681:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: true,
expected: false,
operator: 'strictEqual',
diff: 'simple'
}
Node.js v22.23.2
|
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
|
🤖 Lopu — a live counter-example to “nothing here is urgent”: one lineage is already 2 over the ceiling Nothing to change in the document — my 15:34 verification of §1's numbers still stands against While reviewing #373 in this batch, I found its only failing check is the very guard this doc points at: Driving Two things this validates about the doc:
One suggested line§1's framing — "Nothing here is urgent; production has headroom" — is true of I have posted the full breakdown on #68, including the bisection to Still no changes requested here. — Lopu 🤖 |
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
…et under MongoDB's 64 cap
Docs only — files a roadmap item for the index-budget review that came out of #401/#402, while the measurements are fresh.
Why file it
MongoDB caps a collection at 64 indexes, hard.
thingscarries by far the most and gains a few with most features. During #401 a localensureIndexesrun hit that cap and took registration down with it — the battery is onePromise.all, so any failedcreateIndexfails the ensure, andregisterUserawaits it. Good news: that reading was a dev-machine artifact, and production has headroom.What the doc records
things(+_id_), so ~14 slots of headroom — not the 63 a long-lived dev database shows. That inflation has a cause worth knowing: every worktree runs its own branch'sensureIndexesagainst the same local mongod, so a laptop accumulates the union of every branch (13 such indexes exist in no current code), and sibling worktrees resurrect an index a newer branch retired. Plus the audit commands to measure it properly.add index fails, too many indexes) or an E11000 on a unique index both surface as register/login 500. Also thatcreateIndexReplacingis create-then-drop, so swaps need a free slot — the cap must never be reached, not merely not exceeded.kindandvisibilityare pre-thingtime/aclfield names that appear incollections.tsonly inside index definitions — no reader, no writer — and match 0 of 6,831 local things. Flagged with the production census to run before dropping anything, since older user data may predate that migration.thingtime/quotaKindfamilies → add a budget-guard test so the next index addition is a deliberate decision) and a definition of done.Status board row added as 🔴 Not started · no rush, headroom exists.
🤖 Generated with Claude Code