Skip to content

docs: store and extension storage docs match the code (#993) - #1004

Merged
jimhoyd merged 2 commits into
mainfrom
claude/docs-store-993
Sep 29, 2026
Merged

jimhoyd merged 2 commits into
mainfrom
claude/docs-store-993

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes #993

Each finding was re-located and re-checked against current main (after #984, #986, #991 and #998).

  • Derived indexes (docs/STORE.md, storage bullets): the page said the interval index was the only derived object. packages/store/src/store.ts dropStaleIndexes builds and drops three families: store_intervals_*, store_unique_* ([Gap]: Store: a transfer recipient directory can't be unique across owners, so a lookup by name is spoofable #953) and store_list_* ([Request]: Store: order sorted and filtered lists in SQL near the 10,000-record maximum #951). The bullet now names all three and links the sections that describe them.
  • Sorted and filtered lists (docs/CAPACITY.md, extension storage bounds table): the row now says a page is one counted keyset query through an index, and ordering in memory only happens while the collection holds a row that index cannot order. It links to STORE.md#sorting-and-filtering. The "then read every record" sentence in the pre-[Request]: Store: order sorted and filtered lists in SQL near the 10,000-record maximum #951 measurement section is historical and stays.
  • Audit atomic capture (packages/audit/SECURITY.md): "atomic file replace" is replaced with the write's single BEGIN IMMEDIATE SQLite transaction, which inserts the event into store_audit_outbox.
  • Auth rate limit (packages/auth/SECURITY.md, packages/auth/README.md, docs/STORE.md, docs/CAPACITY.md): the shared limit in auth.sqlite is the default. I ran the point the issue left unverified by calling betterAuthOptions with an override. betterAuth.rateLimit replaces storage, window, max and customRules, and a customRules replaces the default sign-in and sign-up rules rather than merging with them. enabled: true, the client-address header and telemetry off are forced. The README had said "10 sign-in attempts a minute" as if the operator could not change it; that is now stated as the default.
  • Lease facts in one place: STORE.md#several-serving-processes-on-one-host is the home, with SERVER_LEASE in packages/core/src/host-lease.ts as the code source. The auth and audit READMEs, docs/EXTENSIONS.md (joinHostLease row), docs/OPERATIONS.md and docs/CAPACITY.md no longer repeat 5 s or 20 s. They link to it instead. The RIM-STORE-PERSIST-001 card in docs/RUNTIME-IMPLEMENTATION.md keeps the behavioral contract but names SERVER_LEASE.heartbeatMs, ttlMs and writeMs rather than copying the values. docs/FRAMEWORK.md already linked without numbers, so it is unchanged. The repeated mentions inside STORE.md itself (the disk-full section) are on the authoritative page and stay.

Edits to docs/EXTENSIONS.md and docs/RUNTIME-IMPLEMENTATION.md are limited to single phrases, to keep conflicts with #987 and #996 small. origin/main (#998) was merged in, not rebased.

Evidence: npm run verify passes locally after the merge, including check:docs link and anchor checks and the rebuilt llms-full.txt. This PR changes docs only; runtime behavior is unchanged.

🤖 Generated with Claude Code

jimhoyd and others added 2 commits September 29, 2026 18:32
- STORE.md: the derived objects are interval, unique and list indexes, not
  only the interval index.
- CAPACITY.md: a sorted or filtered list is a keyset query through an index
  since #951; the in-memory path runs only while an unorderable row exists.
- audit SECURITY.md: atomic capture is the write's SQLite transaction and
  outbox row, not an atomic file replace.
- auth SECURITY.md and README, STORE.md, CAPACITY.md: the shared sign-in
  limit is the default; betterAuth.rateLimit can replace storage, window,
  max and customRules (verified by calling betterAuthOptions).
- Lease timing lives in STORE.md's several-serving-processes section (and
  SERVER_LEASE); the auth and audit READMEs, EXTENSIONS, OPERATIONS and
  CAPACITY link to it, and the runtime card names the constants.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd enabled auto-merge (squash) September 29, 2026 23:41
@jimhoyd
jimhoyd merged commit 62d842d into main Sep 29, 2026
25 checks passed
@jimhoyd
jimhoyd deleted the claude/docs-store-993 branch September 29, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant