[Docs] Work order 02: fold the commerce service into the plugin - #245
Merged
Merged
Conversation
Plans the adoption of EmDash's conditional-write storage primitives (updateIf, compareAndSet) so the plugin owns commerce truth in-process on ctx.storage, and the removal of @otta-sh/service and @otta-sh/store-postgres. Resolved: no upstream engagement; the feature branch binds a vendored build of the two upstream PRs; work proceeds on feat/in-process-commerce and merges to main once an emdash release carrying both lands. The service is deleted at the end rather than kept as a mode (pre-launch, no users). Three decisions still need ratification before Phase B and are marked in the document. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019JhAGQnVa2G9PmsMDmswjy
…he three decisions, fix stale citations #2169 is merged upstream, so the binding becomes upstream main plus #2980 alone, with the migration-number collision as the only known conflict; the earlier build evidence is re-labelled pre-merge and INC-A0 must re-verify it. The merge-to-main gate narrows to a release carrying #2980. updateIf turns out to be wired through the sandbox bridge on main, closing that gap. All three remaining user decisions are ratified. Stale paths, line citations, counts, the depcruise clause reading, INC-A7's file list, the Phase-D CI/deploy scope and the changeset cleanup are corrected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011NjdC8awspUte5wML6eY2X
vedanshujain
deleted the
docs/work-order-02-fold-service-into-plugin
branch
September 13, 2026 10:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
plans/work-order-02-fold-service-into-plugin.md: the work order for adopting EmDash's plugin-storage conditional-write primitives (updateIffrom emdash-cms/emdash#2169, now merged upstream;compareAndSetfrom #2980, still open) so the plugin owns commerce truth in-process onctx.storage, and for removing@otta-sh/serviceand@otta-sh/store-postgresonce the cut-over is green.Shape
mainwith #2980 merged onto it), all-or-nothing semantics without a batch primitive (one storage document per aggregate + intent-claim/sweeper for cross-aggregate edges), thectx.storagecollection layout, the plugin boundary amendment (ADR-0018), what cannot fold in (raw-body Stripe webhook → site-owned endpoint), cut-over, and test tiers.feat/in-process-commerce; that branch merges tomainonly after an emdash release carrying #2980 exists (INC-D6).All three decisions ratified 2026-09-13
Ratified as recommended: D1 accepted (the design binds
compareAndSet's create-if-absent semantics, with noput()+ unique-index workaround), D3 no data migration (staging is re-seeded), and D3 the admin Orders search narrows to a prefix-onlysearchKey. Nothing in the document is open for decision.v6 amendments
main, only #2980 is merged on, and the migration-number collision is the one known conflict. The earlier build evidence was gathered pre-merge, so INC-A0 now re-verifies every claim and records the new numbers.updateIfturns out to be wired through the sandbox bridge on upstreammain, closing the gap v5 recorded; the merge-to-maingate narrows to a release carrying #2980..changeset/cleanup corrected.Not in this PR
No code. PR #102 collides with the boundary changes this plan makes and duplicates the accepted ADR-0012's number; it is being closed, which resolves both.
🤖 Generated with Claude Code
https://claude.ai/code/session_019JhAGQnVa2G9PmsMDmswjy