Skip to content

test(store): measure the plumbing declared intervals and transfers remove (#902 item 6) - #965

Merged
jimhoyd merged 3 commits into
mainfrom
claude/plumbing-measure-902
Sep 29, 2026
Merged

jimhoyd merged 3 commits into
mainfrom
claude/plumbing-measure-902

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Part of #902 (item 6: the plumbing removed by declared intervals and transfers).

What

  • Counterexamples (packages/store/test/plumbing/, test fixtures, not recipes): the store-booking and store-credits APIs served by trusted operator extensions through StoreExports.transaction. They cover the overlap check, transfers with floors, the issuer membership gate, Idempotency-Key retries, the owner and its authorization (401, cross-origin 403, another owner's record as 404), the per-owner quota, balance_not_zero, If-Match and PUT/PATCH.
  • Equivalence test (packages/store/test/plumbing.test.ts): each recipe's own tests/requests.json (and seed) runs against the counterexample through the CLI, twice, and the audit reports it ready. A 10-request retry fixture (credits-retries.json) runs against both the recipe and the counterexample, because the recipe fixtures send no Idempotency-Key. Deliberately breaking the overlap check or balance_not_zero fails the recipe fixtures.
  • Count: npm run measure:plumbing (scripts/docs/measure-plumbing.ts) counts non-blank, non-comment lines per file kind, plus physical lines (what [Request]: Prove an embedded upstream auth provider in one local URLCode application #843's "127 lines" counted).
  • Docs: the numbers, method and caveats are in docs/FRAMEWORK.md "Plumbing removed by intervals and transfers". The docs/STORE.md pointers are updated.
Contract Declared: YAML / code Host transaction: YAML / code Code removed Physical lines, declared / host
Scheduling (store-booking) 38 / 0 39 / 137 137 43 / 201
Credits (store-credits) 42 / 0 43 / 170 170 50 / 246

Caveats

Full list in FRAMEWORK.md.

  • Route functions cannot reach StoreExports.transaction, so the counterexamples are operator extensions, not function routes.
  • A host transaction on an owned collection sees only the caller's records. So each counterexample uses a shared collection with an owner property the code enforces, and a disabled store route, because every collection needs a mount.
  • The fixtures check statuses and headers, not bodies.
  • Known differences: lists come as one page with no cursors, sort or filter; a retry replays a snapshot; there is no OpenAPI describe; the checks scan the collection instead of using an index.
  • Line counts depend on style. The host version's edit effort is not comparable, because it was written with the store source at hand.

Also

Evidence

npm run verify passes locally (macOS, Node 26.10) after the merge.

🤖 Generated with Claude Code

jimhoyd and others added 2 commits September 29, 2026 15:00
…move (#902 item 6)

Host-transaction counterexamples of the store-booking and store-credits
recipes, as operator extensions over StoreExports.transaction, run against
each recipe's own fixtures (plus a retry fixture run against both).
scripts/docs/measure-plumbing.ts counts them; docs/FRAMEWORK.md records
137 and 170 lines of trusted code removed, with the method and caveats.
SQL ordering (#902 item 5) is split out as #951.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd merged commit a2d1254 into main Sep 29, 2026
26 checks passed
@jimhoyd
jimhoyd deleted the claude/plumbing-measure-902 branch September 29, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant