Skip to content

[Docs] Work order 02: memory note recording the outcome, measured numbers, and vendoring pins - #294

Merged
vedanshujain merged 2 commits into
feat/in-process-commercefrom
docs/work-order-02-memory
Sep 20, 2026
Merged

vedanshujain merged 2 commits into
feat/in-process-commercefrom
docs/work-order-02-memory

Conversation

@vedanshujain

Copy link
Copy Markdown
Contributor

Summary

Adds plans/work-order-02-fold-service-into-plugin-memory.md, a durable historical record of this work order's outcome: one deployable, with the plugin owning commerce truth in-process.

The note records:

  • Measured numbers for the contention, row-size, and bundle-size risks tracked by this work order — including an honest flag where a number wasn't actually found in the work order's history, rather than inventing one.
  • The vendored-build pins: base SHA, upstream PR head SHA, merge commit, and migration number, plus what was deleted as part of the fold-in.
  • A placeholder section for the follow-on increment (D6) to fill in once it lands.

Verification

  • lint, typecheck, format-check, and changeset-status all pass locally on this single-file, docs-only diff.
  • Two independent reviews were completed on the note's content, with all findings resolved and re-verified against source before opening this PR.
  • No test suite is impacted (docs-only change).

Follow-ups surfaced by review, out of this PR's scope

  • Stale HttpCommerceClient references remain in CLAUDE.md and in the plugin's own README/contracts-README — needs a follow-up sweep.
  • A stale CAS_MAX_ATTEMPTS = 12 citation in packages/store-emdash/README.md needs a one-line fix.
  • The D1 write-throughput risk (R7) was never measured anywhere in this work order and is flagged as an open gap.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CQbJYWWm8tf8owshm7XRp8

vedanshujain and others added 2 commits September 20, 2026 15:37
…d the two that don't

Closes the plan's definition-of-done item 13 with a backward-looking record beside
the forward-looking plan it closes out: the outcome, the measured numbers behind
R2/R3/R6/R7, the pinned host SHAs and migration number, the conflict resolutions,
and what Phase D deleted.

Every figure is cited to the artefact it came from. R2 (CAS contention) and R3
(document size) have real, asserted, in-repo numbers, taken from the live tables in
packages/store-emdash/README.md rather than ADR-0019's, which predate the ceiling
raise from 12 to 24. R2's adversarial merchant shape is recorded as the documented
exception it is.

R6 and R7 are recorded as gaps rather than filled with estimates. R6 has one real
before/after from INC-A6 (+11.05 kB raw, +4.15 kB gzip for admitting the domain and
the store adapter) but no figure for the fully-folded Worker with the payment
gateways, and nothing at INC-B10a where the plan asked for it. R7's writes/second
was never measured anywhere -- the D1 tier explicitly proves primitive correctness
and disclaims performance. An invented number in a historical record is worse than
an acknowledged gap, so both say so plainly.

Section 6 is reserved, and left empty, for the vendor/README.md content INC-D6 will
move here when it deletes vendor/. Section 5 says INC-D6 has not run rather than
guessing at what it will find. No README pointer: README has no further-reading or
history section and links neither plans/ nor docs/, so adding one would have been
forcing a fit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQbJYWWm8tf8owshm7XRp8
…mbers two reviews caught

Revision round on INC-D5 against two independent REQUEST-CHANGES reviews whose
findings converged. Every fix was re-verified against the source rather than
against the reviews.

- HttpCommerceClient was NOT "verified absent". The class definition is gone,
  but live docs still describe it as current: CLAUDE.md lines 37/52/95 (the
  HTTP-task verification path, "need a backing service", "reaches the service
  only via ctx.http"), packages/plugin/README.md:15 ("Transitional") and
  packages/plugin/test/contracts/README.md:5. Named as an open follow-up, with
  the changeset/ADR-0002/ADR-0007/plans-archive hits called out as legitimately
  historical. The §4 INC-D3c row no longer claims CLAUDE.md was fully swept.
- R2 measured depths topped out at 9-11 and understated the worst case. Added
  the three deeper recorded shapes from store-emdash's per-shape table: restock
  +10 racing 40 reserves = 13, sequenced restock then 40 reserves = 12, and 20
  removals racing 20 reserves = 15.
- The adversarial-exception section mixed eras. The 11-29 typed contention
  failures are the PRE-raise 12-attempt measurement; split pre-raise from
  current and added the live figure that was missing entirely — 15 of 24
  attempts, 0 typed failures, asserted at <= 90.
- The equivalence proof was not INC-B10c's alone. INC-A7 found only 28 of 165
  HTTP assertions were transport-agnostic, so each increment added its own
  slice: B10a, B10b-i/ii, B10c-i (#272) and B10c-ii (#273). Also restored the
  truncated #293 title.
- INC-A6 is PR #252 alone; #251 is INC-A5 (boundary amend + ADR-0018).
- payments-stripe entered the perimeter at INC-C1b/#276; payments-x402 entered
  separately at INC-C5/#281 (commit 5f304d1), when the in-process settle path
  made x402-wiring a real runtime import. The R6 bundle caveat is unchanged.
- The summary blockquote said R6 "does not" have a real number while §R6 calls
  the +4.15 kB delta real; reworded to "neither has the figure the plan asked
  for" so the file stops contradicting itself.
- §1 recorded only wins. Added the accepted cost per ADR-0020 §2: the Stripe
  secret's trust surface widened into the plugin's kv, bounded but stored
  without a live consuming payment path (payments-stripe still defaults to
  globalThis.fetch, not ctx.http.fetch).

Verification: pnpm lint, typecheck, format:check and changeset status all clean.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQbJYWWm8tf8owshm7XRp8
@vedanshujain
vedanshujain merged commit 23e9544 into feat/in-process-commerce Sep 20, 2026
3 checks passed
@vedanshujain
vedanshujain deleted the docs/work-order-02-memory branch September 20, 2026 15:57
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