Skip to content

fix(store): owner ids only to members; transfers independent of the recipient; issuers need members (#972, #973, #974) - #998

Merged
jimhoyd merged 6 commits into
mainfrom
claude/store-review-fixes-972
Sep 29, 2026
Merged

jimhoyd merged 6 commits into
mainfrom
claude/store-review-fixes-972

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes #972
Fixes #973
Fixes #974

Builds on #984 (store editable/deletable states and unique), which merged into main before this branch was cut. Main was merged in (#986, #991); no rebase.

Design

#972: owner ids only to members. Activation refuses showOwner: true on any named readers mount that has no members, a projected directory included. A gated sibling mount does not count as a gate for it. SECURITY.md's "only members of the declared membership collection receive it" is now enforced rather than assumed.

#973: a transfer's answer no longer depends on the recipient. The review's oracle was a credit-side refusal. Under the declaration, a credit now cannot fail:

  • The amount property's schema may carry only type, minimum, exclusiveMinimum and annotations. Activation refuses maximum, exclusiveMaximum, multipleOf, enum, const and combinators. A credit only raises a balance, so a lower bound can never refuse it.
  • The lowest min times maxRecords must stay within 2^53 - 1. The sum is 0 and no record goes below the floor, so no balance can leave the safe integers.
  • Every create, update, transition and increment measures maxRecordBytes with each amount property at its widest value, -9007199254740991. A later credit therefore cannot push a record over the limit: the write that brings a record near the limit is refused, for its owner, instead.
  • What remains (only a row stored outside the declaration) answers one fixed 409 transfer_conflict with no detail. transfer_limit and 413 now describe the debited record only.

Conservation, the documented debit-side errors and the order of checks are otherwise unchanged. HTTP, StoreExports.transfer and a host transaction's tx.records(n).transfer all run Collection.transferIn, so all three are covered. These rules apply to shared collections as well, so the amount property has one declaration contract.

#974: issuers need members. On an owned collection, a negative min without members is refused at activation. The message names the issuer pattern. A shared collection keeps the route as its gate, because anyone who reaches a shared transfer mount can already move any record's balance.

No back-compat is kept (no external users). Writes stay in BEGIN IMMEDIATE, and the declaration fence is untouched.

Also

  • The config schema descriptions and regenerated artifacts (build:addons: store urlcode.json, artifacts/store-schema, README reference), the OpenAPI 409/413 texts, docs/STORE.md, SECURITY.md, the README, llms.txt and the CHANGELOG.
  • The maximum was dropped from the shared test balance schemas (test/disk-full*, test/multiprocess.integration.ts).
  • Package budgets: store unpacked (619315) passed its 616448 limit after [Request]: Store: order sorted and filtered lists in SQL near the 10,000-record maximum #951 and this change. Following the policy in scripts/package-audit.ts, every package was re-measured on Node 26 and the whole table reset.

Evidence

Limitations

  • A row stored outside the declaration (edited in the database, or from before the amount property was declared) can still be refused on the credit side. The refusal is one fixed answer, but it is observable.
  • A completed transfer still confirms that the recipient id exists (documented, unchanged).
  • This is not an independent security review.

🤖 Generated with Claude Code

jimhoyd and others added 4 commits September 29, 2026 17:35
…f the recipient; issuers need members (#972, #973, #974)

- #972: activation refuses showOwner on any named readers mount without
  members, so only members ever receive _owner (SECURITY.md stays true).
- #973: the amount property's schema bounds a balance from below only
  (type, minimum, exclusiveMinimum, annotations); the lowest min times
  maxRecords must stay within 2^53 - 1; every write measures
  maxRecordBytes with each amount at its widest. A credit can then never
  break the schema, overflow or cross the size limit; anything left about
  the credited record (a row stored outside the declaration) answers one
  fixed 409 transfer_conflict. transfer_limit and 413 describe the debited
  record only. HTTP, StoreExports and host transactions share the step.
- #974: an owned collection refuses a negative transfer min without
  members, naming the issuer pattern.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ixes-972

# Conflicts:
#	packages/store/CHANGELOG.md
Store unpacked 619315 exceeded 616448 after #951 and the #972-#974 fixes;
every package re-measured on Node 26 and reset by the policy comment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ixes-972

# Conflicts:
#	packages/store/CHANGELOG.md
@jimhoyd
jimhoyd enabled auto-merge (squash) September 29, 2026 22:58
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