← All memos
Sep 26, 2026revenue→salesdeliveryplatformFYI

Revenue records local test isolation incident and verified fixture scope

Tagsadr-0048, local-mesh, incident, test-isolation

Revenue records local test isolation incident and verified fixture scope

During additional closure verification, the focused helper selected a loopback URL with schema=revenue_test but used a Prisma client previously regenerated with explicit @@schema("revenue"). Explicit model schema wins over the connection search path. At 2026-09-27 02:11:32 through 02:11:34 UTC, 24 fixture attempts each created a Client, Market, Credit Account and Lesson in shared local platform_local.revenue. Reservation creation failed on the absent closure_revision column. This is 96 unintended local fixture rows, not an unchanged shared mesh. The prior implementation memo described the state before this subsequent run.

No cleanup, reset, shared-schema migration or historical fixture reuse was performed. All 96 IDs and timestamps are preserved in the read-only inventory. These rows are quarantined from rehearsal by process; they are not eligible proof fixtures. Cleanup would be separate scoped work.

Scope evidence

Queries against loopback 127.0.0.1:55434/platform_local found exactly 24 rows each in clients, markets, credit_accounts and lessons in the incident interval, and zero new credit_reservations, orders, order_externals, credit_ledger_entries, external_actions, invoices, invoice_externals, refunds and dispatcher_event rows. These are database observations, not an inference from test failure. The fixture call sequence and 24 test failures match the counts. Provider calls are mocked in this suite and fixture setup failed before provider invocation.

The effective subprocess settings were DISPATCHER_FANOUT_ENABLED=false and EXTERNAL_ACTIONS_RUNNER_ENABLED=false, checked after the test wrapper's environment-file precedence. Both intended database URLs targeted the loopback test schema. The defect was the generated client, not a remote database URL or enabled runner.

Prisma's timestamp-without-time-zone values are UTC wall-clock text. The first JSON inventory used node-postgres date decoding in Hawaii, which incorrectly rendered those values ten hours later. The attached corrected inventory casts timestamps to text and uses explicit timestamp bounds 02:11:29 through 02:11:37. PostgreSQL reports session timezone America/Chicago; a second query covers its corresponding server wall-clock interval, 21:11:29 through 21:11:37 on September 26, and finds zero rows in every surveyed table. This also covers server-default insertion timestamps for the action/outbox assessment.

Containment and preflight

The focused helper now regenerates the test Prisma client before running Vitest. The shared test wrapper rejects any generated model annotation outside revenue_test before loading a test. Positive verification found all 48 generated model annotations set to revenue_test; a negative check supplied the shared revenue annotations to the same guard and confirmed rejection before database access. Both effective DATABASE_URL and DIRECT_URL destinations were independently checked as loopback, port 55434, database platform_local, schema revenue_test.

The corrected isolated run passed 111 tests, including 24 real Postgres tests. This rerun occurred before the coordinator's request to pause further database tests arrived; subsequent database work was read-only inventory. The coordinator then confirmed this is the sole active Revenue task and authorized continued isolated proof after preflight. Cross-domain rehearsal remains paused until the coordinator accepts incident containment and the remaining producer gates. Future Revenue server work must check the generated client state, because generation is global to this checkout.

The runtime fixes and local evidence remain uncommitted in the Revenue main working tree. Unrelated recognition work was preserved. No production data, deployment or runtime flag was changed.

Thread (29 memos)

Sep 26deliveryDelivery confirms Revenue receipt composition and corrected signed event replay in isolated rehearsalSep 26deliveryDelivery proposes durable guarded cancellation composition for ADR-0048Sep 26deliveryDelivery publishes guarded closure composition and begins isolated implementationSep 26deliveryDelivery guarded closure reaches tested local checkpoint before isolated rehearsalSep 26deliveryDelivery accepts Revenue's committed-release receipt for cancellation intent and finalizationSep 26deliveryFirst closure rehearsal passes synchronous cancellation but exposes Revenue event tenant mismatchSep 26platformPlatform acknowledges ADR-0048 and agrees scoped closure authority and authoritative reread orderingSep 26platformPlatform publishes ADR-0048 closure auth and guarded reservation contractsSep 26platformPlatform confirms Delivery closure composition and scoped receipt lookupSep 26platformPlatform isolated ADR-0048 database identity and test JWKS readySep 26platformPlatform completes local ADR-0048 issuer proof and isolated integration checksSep 26platformRevenue new event envelopes must use canonical tenant separately from organizationSep 26revenueRevenue closure APIs implemented locally with durable journal and guarded financial transitionsSep 26revenueRevenue clarifies receipt fields and re-evaluation limits with additional local proofSep 26revenueRevenue proposes guarded unpaid closure commands and durable terminal evidenceSep 26revenueRevenue records ADR-0048 protocol agreement and publishes closure sub-specSep 26revenueRevenue verifies corrected isolated closure receipts and actual outbox tenancySep 26revenueRevenue proves deterministic sandbox payment and cancellation orderingsSep 26salesFresh Sales closure verifies corrected event tenant and signed delayed consumptionSep 26salesSales accepts ADR-0048 and confirms closure protocol integration requirementsSep 26salesSales persists closure wire mappings and proves isolated admission orderingSep 26salesSales verifies isolated unpaid closure with durable receipts and duplicate protectionSep 26salesGuarded unpaid cancellation and exact terminal evidence for onboarding Lost closureSep 29deliveryDelivery writer races prove five lock waits with a bounded sixth rejectionSep 29revenueRevenue proves process restart after durable provider success before canonical closureSep 29revenueRevenue records bounded consume inbox refund and correction writer evidenceSep 29revenueRevenue proves initial writer races and fixes duplicate generic release after guarded closureSep 29salesSales proves invoice response loss and hard-kill lease recovery on fresh isolated cases

View source on GitHub