---
id: JNY-ACC-PRD-006
title: Membership keeps its shared product within domain ownership
feature: FEAT-ACC-PRD-01
product_area: accounting
module: products
revision: 3
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes:
  - ACT-ACC-0125
  - ACT-ACC-0147
  - ACT-ACC-0148
  - ACT-ACC-0138
source_sha:
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
actor: ACT-ACC-010
goal: Save the common product with its Membership extension while preventing another application’s writes.
capabilities:
  - CAP-ACC-PRD-007
  - CAP-ACC-PRD-001
  - CAP-ACC-PRD-005
screens: []
steps:
  - 'n': 1
    surface: listProductTypes
    action: Inspect the registry entry for Membership packages.
    capability: CAP-ACC-PRD-001
    expected: The entry identifies Membership and its extension record.
    provenance: test
    source: >-
      services-accounting:modules/products/tests/e2e/products.e2e.spec.js#answers the domains’ types after
      them, each with its owning service and extension table, the Events ones inactive
  - 'n': 2
    surface: accounting.save_product (database function)
    action: 'Within Membership’s transaction, save the common product and then its extension.'
    capability: CAP-ACC-PRD-007
    expected: >-
      The documented workflow places both records within one commit boundary and attributes the product to the
      acting person.
    provenance: documented
    source: 'services-accounting:docs/migrations/accounting-modernization/products-shared/README.md#The write path'
  - 'n': 3
    surface: createProduct
    action: Attempt Membership package creation or correction as Commerce.
    capability: CAP-ACC-PRD-007
    expected: Ownership refusals identify Membership.
    provenance: test
    source: >-
      services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#refuses
      another service replacing, retiring, reactivating or deleting the package, and lets its owner
  - 'n': 4
    surface: accounting.retire_product (database function)
    action: Retire the common product at Membership’s read version.
    capability: CAP-ACC-PRD-005
    expected: The product becomes retired at the next version.
    provenance: test
    source: >-
      services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#retires
      the product at the version read, raising the version
alternates:
  - from_step: 2
    condition: A person edits the package through a console host.
    path: 'Run product, setup and domain stages in sequence.'
    outcome: Successful stages remain committed when a later stage fails.
    provenance: observed
    source: 'react-console:components/accounting-config/products/product-editor.tsx:useProductEditorState'
failures:
  - from_step: 2
    condition: Membership’s extension write fails after saving the product.
    path: The documented transaction rolls back.
    outcome: No common product should remain; executable cross-domain proof is open.
    provenance: documented
    source: 'react-console:acceptance/accounting/journeys/products/ACT-ACC-0147.json'
  - from_step: 2
    condition: Product configuration violates a saving rule.
    path: Return the matching function validation sentence.
    outcome: No product write survives.
    provenance: test
    source: >-
      services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#refuses
      a fixed-priced product without a standard price in the base currency with one sentence
rules_in_play:
  - BR-CAP-ACC-PRD-001-03
  - BR-CAP-ACC-PRD-007-01
  - BR-CAP-ACC-PRD-007-03
  - BR-CAP-ACC-PRD-007-04
  - BR-CAP-ACC-PRD-007-05
  - BR-CAP-ACC-PRD-007-06
  - BR-CAP-ACC-PRD-005-02
assertions:
  - id: AS-JNY-ACC-PRD-006-01
    statement: Function-saved product information agrees with Accounting retrieval.
    provenance: test
    source: >-
      services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#is
      the same product Accounting’s own persistence service reads
  - id: AS-JNY-ACC-PRD-006-02
    statement: Unauthorized Commerce attempts leave Membership product data unchanged.
    provenance: test
    source: >-
      services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#refuses
      another service replacing, retiring, reactivating or deleting the package, and lets its owner
e2e_policy: none
e2e_reason: The domain transaction requires database execution rather than a browser.
evidence:
  - 'react-console:acceptance/accounting/journeys/products/ACT-ACC-0125.json'
  - 'react-console:acceptance/accounting/journeys/products/ACT-ACC-0147.json'
  - 'react-console:components/accounting-config/products/product-editor.tsx'
  - 'services-accounting:docs/migrations/accounting-modernization/products-shared/README.md'
  - 'services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md'
  - 'services-accounting:modules/products/tests/e2e/products.e2e.spec.js'
  - 'services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js'
  - >-
    services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js
proved_by: []
---

# Membership keeps its shared product within domain ownership

## Story

Membership uses the common product within its domain transaction and tests that Commerce cannot mutate it. Retirement follows the domain’s read version. The shared-product tests establish ownership and saving behavior; extension rollback remains a documented workflow requiring a dedicated cross-domain execution test.
