Repository navigation
Description
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
Filing gate: ① product defect · Source: fleet · out-of-scope finding of PR #35509 (card #35255), named in os-dev-report 7011226452; L1 REWORK record 7011371936 ruled a card owed (p2, area:build), with the generic-cascade wording nit folded in as a line item. ⛔ Not a claim.
Grade: area:build · Bug · Impeded · uncommon (an app that routes objects to a declared managed datasource bound to a real database) · read from the code, reach not measured → p2.
Business reason
A developer runs os verify expecting its test data to stay in verify's own in-memory store. If the app routes an object to a declared datasource with schemaMode: 'managed' (or none) and that datasource points at a real database, verify's CRUD, reference-shape, delete-behaviour and unique-scope rows are written into that database. Card #35255 asked that "the CRUD phase writes only to the ephemeral stack"; the shape ruled for it (PR #35509) covers objects on external datasources only, so this half remains.
What happens
bootStack connects every datasource the app declares (ADR-0062 D2 connects a datasource an object binds to). After PR #35509, deriveCrudCases (packages/verify/src/derive.ts) blocks an object on an external datasource (an external block, or a declared schemaMode other than managed), but an object bound to a declared managed datasource is not blocked, so every write family built from the CRUD case writes through that datasource, as under os dev.
Expected
During os verify, no write verify itself derives reaches a datasource the app declares: either such objects are redirected to the ephemeral store, or they are left out and named in the report the way PR #35509 names external ones. The verify README and the harness.ts header then say so.
Done when
- A verify test with a recording driver behind a declared managed secondary datasource runs the write families and records zero writes from verify, with a control showing a REST create still reaches the driver.
- Line item (wording): a managed object that requires a reference to a withheld object is reported with the generic cascade sentence "required relational target X is not synthesizable"; the report says the target was withheld on purpose and names why.
Who acts: the area that owns packages/verify (area:build, CLI/verify area).
Dedupe: repo:objectstack-ai/objectstack is:issue is:open verify managed datasource write → only #35255 (the parent card, shape ruled to external datasources); also tried the dev's words "os verify secondary datasource writes", "datasource D2 auto-connect verify": none covers it.
Activity
objectstack-fleet commentedon Nov 19, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:devx·pm:queue; rationale: area:build · Bug · Severe·data wrong (os verifywrites its CRUD, reference, delete and unique-scope test rows into a declared managed datasource, which can be a real database) · developers, uncommon (apps that route objects to such a datasource) · read from the code → p2 under the table (severe × rare). It goes to p1 if a measured run shows the rows survive verify (unrecoverable) or land in another tenant's data.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
Claim: PM loop · 2026-11-19 · p2, on the seat's 16:56Z order (CLI/verify cards for this area), with route A ruled by the seat at 16:57Z. Dispatched to an os-dev subagent of this area thread; the slot was freed when PR #35616 entered the merge queue.
Area: b1-B
Session:
session_01L6bhgTyMahdAdhXSzgy2ntAccount:
os-salesBranch:
claude/issue-35523-verify-managed-datasource-ephemeralWorktree:
objectstack-issue-35523Domain:
domain:devxSeat:
repo:objectstack#1(area b1-B)File surface:
packages/verify/src/harness.ts(theDatasourceAdminServicePluginwiring and its header), one new small module inpackages/verify/src/for verify's driver factory,packages/verify/src/derive.ts(the comment that attributes both external halves to the engine gate, and the generic cascade wording for a withheld target),packages/verify/README.md, theos verifysection ofcontent/docs/deployment/cli.mdx, their tests, and one changeset. Stop on breach.Container & model: S,
mode:subagent,model: default (opus) — dispatch-gates --tier: no path-derived mandate,effort: mediumClause-②: no
Metadata-protocol: none
Responsibility:
objectstack packages/verify/src/harness.ts:1167-1172 (read at origin/main d2bc1ffd) | PR #35509 (card #35255) | an app author running os verify on an app that routes objects to a declared managed datasource bound to a real database; read from the code, reach not measuredThread-read: 7011470565
Premise: holds. At
origin/maind2bc1ffd,bootStackwiresDatasourceAdminServicePlugin({ driverFactory: createDefaultDatasourceDriverFactory() })whenever the app declares datasources. A declared datasource that an object binds to is connected with its real driver (ADR-0062 D2). After #35509,deriveCrudCasesblocks only objects on an external datasource, so verify's write families still write through a declared managed datasource.Route (seat ruling 16:57Z; route B rejected because it would silently degrade verify for such apps): verify hands
DatasourceAdminServicePluginits own driver factory. A declared datasource whoseresolveDatasourceSchemaModeismanagedgets an ephemeral in-memory store of the same kind as verify's default store, not its real connection. External datasources keep their real driver: reads reach them, and #35509 keeps writes off them. No new flag or interface. If a managed datasource's engine cannot be stood in for faithfully, leave its objects out and name them, as #35509 does; never write through. Composition note: ruling A on #22301 (harness.ts:891, "what serve composes") already has verify swap its own default store for an ephemeral one. This extends the same swap to declared managed stores, and the harness header must say so.Pre-claim lane:
packages/verify/**is area b1-B of repo:objectstack#1.Pre-claim deps: none; no open PR references #35523; overlap-check runs before each push.
Prior rulings read: check-prior-rulings --paths packages/verify/src/harness.ts → ① 1
rulinghit (:891, #22301 ruling A, composition parity with serve; read above) and 10⛔lines (test seams and key handling, none on datasources); thread: triage 7011470565; repo: objectstack-ai/objectstackSerial constraints cleared: in-flight b1-B work is #35454 (
packages/cli/src/commands/doctor.ts), a different package; PR #35616 (packages/cli skills) is in the merge queueobjectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
os-dev-report
{ "issue": 35523, "status": "done", "branch": "claude/issue-35523-verify-managed-datasource-ephemeral", "pr": "https://github.com/objectstack-ai/objectstack/pull/35635", "session": "session_01L6bhgTyMahdAdhXSzgy2nt", "premise_still_valid": true, "summary": "Route A as ruled: bootStack now hands DatasourceAdminServicePlugin verify's own driver factory (new packages/verify/src/managed-datasource-stand-in.ts, not re-exported), wrapping createDefaultDatasourceDriverFactory. A declared datasource whose resolveDatasourceSchemaMode is managed (or absent) is built by the real factory from a spec of verify's own: SQL engines (sqlite, sqlite-wasm, postgres, mysql, turso) become the default store's engine in memory, memory becomes memory without persistence; external datasources and managed engines with no faithful stand-in (mongodb, plugin-supplied driver ids) keep the real driver, and deriveCrudCases now withholds the latter's objects from every write family with a named reason ('managed datasource NAME (driver DRIVER): not exercised ...'; a datasource named default is exempt as verify's own store). Line items: the cascade for a withheld target (direct or transitive) now reads 'required relational target X is withheld on purpose — REASON' instead of 'not synthesizable'; the derive.ts comment now attributes only the schemaMode half to the engine's write gate and the external block to verify; README, harness.ts header and the os verify section of content/docs/deployment/cli.mdx updated; patch changeset with Clause-② no / Metadata-protocol none. Measured at S. One defect in my own PR body: the shell ate the backticked tool names in the final Derived-gates details paragraph (it reads ': 104 derived famil(ies) accounted for' and ' and first answered exit 3'); per os-dev rule 3 I did not PATCH the body, so the seat may correct that one paragraph (intended text: dispatch-gates --ran: ...; check:skill-examples and check:dual-build-cjs-loads first answered exit 3 ...; the workspace build check:type-check-debt performs).", "tests": "Head 2de0d505. New src/verify.managed-datasource-stand-in.test.ts: boot pin with a managed secondary sqlite-wasm datasource on a real temp FILE (the recording medium); after CRUD, reference shapes, delete behaviours, unique scopes and a REST create the file was never created ({exists:false, rows:0}); vms_side CRUD case 'verified' on the stand-in; REST create 201 and read-back 200; CONTROL: createDefaultDatasourceDriverFactory (what os dev uses) given the same declaration opens that file and writes a row (exists true, 1 row in a control table); five factory unit pins against a recording real factory. derive.test.ts: +3 cases (withheld cascade wording direct and transitive, generic sentence kept for a field-shape block, managed postgres exercised vs mongodb and plugin driver withheld). RED ON origin/main: harness.ts+derive.ts restored from d2bc1ffd tree-only, '× nothing reached the real database' with '+ exists: true, + rows: 11', Tests 1 failed | 8 passed, lock VERDICT command-exit 1; restored via git checkout HEAD --, git diff HEAD empty. GREEN: vitest run on the two files, Test Files 2 passed, Tests 40 passed, VERDICT command-exit 0. ABLATION (scripts/ablation-replace.mjs): anchor 'driverFactory: createVerifyDatasourceDriverFactory({' x1 -> x0, blob fd6fa6de -> dfceaaa6, same pin red with rows 11, restored blob == HEAD fd6fa6de and git diff HEAD empty; no dist leg because the suite imports the harness from src. Full package: pnpm --filter @objectstack/verify exec vitest run --maxWorkers=2 -> Test Files 55 passed (55), Tests 475 passed (475), VERDICT command-exit 0; pnpm --filter @objectstack/verify typecheck exit 0 (tsc + check:test-typecheck OK, 0 debt).", "gates": "Closure build pnpm --workspace-concurrency=2 --filter '@objectstack/verify^...' build: VERDICT command-exit 0; verify itself built before dist-reading gates. dispatch-gates --commands --repo objectstack-ai/objectstack at 2de0d505: 104 families, all run locally, each exit 0 captured before any pipe; check:skill-examples and check:dual-build-cjs-loads first answered exit 3 (PREREQUISITE NOT MET, unbuilt dist, NOT MEASURED) and were re-run after the whole-workspace build check:type-check-debt performs: both exit 0; check:type-check-debt first hit lock exit 99 (queue-timeout behind another seat's stress.sh), re-run with OS_VERIFY_LOCK_SLOT: exit 0. dispatch-gates --ran: '104 derived famil(ies) accounted for — 104 run, 0 NOT-MEASURED (a DERIVED zero — all 104 recorded an exit code and none of them is 3)'. check:verify-stand-in, check:test-source-alias, check:nul-bytes, check:published-files, check:dts-closure exit 0 after the verify build. PR check-runs: in_progress at report time, not waited on (CI-only: dogfood shards, Dogfood Verify CLI, Build Core, type-check lanes). test:repo not run locally (diff touches no repo-project test).", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 — fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls, draft, + POST /issues/35635/assignees os-sales); post-stamped os-dev-report comment (POST /repos/objectstack-ai/objectstack/issues/35523/comments). git push not counted.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed — a managed mongodb or plugin-driver datasource keeps its real driver under os verify, so the app's own seed and hooks still write there (as for an external datasource); route A scopes the fix to verify's derived writes, and those objects are withheld and named. In PR Acceptance notes." ] }objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
os-dev-report
{ "issue": 35523, "status": "done", "branch": "claude/issue-35523-verify-managed-datasource-ephemeral", "pr": "https://github.com/objectstack-ai/objectstack/pull/35635", "session": "session_01L6bhgTyMahdAdhXSzgy2nt", "premise_still_valid": true, "summary": "L1-a REWORK M1 (comment 7020917973) is fixed at head bb1259fb. managed-datasource-stand-in.ts now exports isManagedDatasource(ds), which is resolveDatasourceSchemaMode (spec.schemaMode, then external.schemaMode, then config.schemaMode, with no mode read as managed) imported statically from @objectstack/service-datasource. It is the ONE reader. The factory decides stand-in or real driver with it, and deriveCrudCases uses it for its external test in place of the declared ds.schemaMode key, so any datasource the factory keeps real is withheld by derive. The module header names it authoritative and says why (two readers drifting puts verify's rows in the real database), and the derive comment points at it. The factory option resolveSchemaMode is removed, and harness.ts no longer passes it. A datasource that spells schemaMode only inside config or external is now withheld as 'external datasource NAME (read-only): not exercised', and the real driver still serves its reads. PR body delta: rule 3 bars me from editing the body after pr_create, so I ask the seat to apply it. Text to append under What changes: 'One reader for managed (L1-a M1): isManagedDatasource in managed-datasource-stand-in.ts (resolveDatasourceSchemaMode: spec.schemaMode, then external.schemaMode, then config.schemaMode; absent = managed) decides both the factory (stand-in or real driver) and deriveCrudCases (withhold as external or exercise), so a datasource spelling schemaMode only inside config or external gets its real driver for reads and its objects are withheld from every write family.' Text to append under Tests: 'derive.test.ts: config.schemaMode and external.schemaMode spellings withheld (it.each); stand-in test: a config.schemaMode external postgres declaration passes to the real factory unchanged and its derive case is withheld. Red on 2de0d505 (derive.ts restored): 3 failed / 40 passed; green on bb1259fb: 43 passed; ablation of the one-reader line: the same 3 red, restored blob == HEAD.' The earlier gates-paragraph repair from my first report is still owed.", "tests": "Head bb1259fb. New pins: derive.test.ts it.each for a datasource that spells schemaMode only in config ({driver: postgres, config: {host, schemaMode: external}}) and only in external ({external: {schemaMode: validate-only}}): each is blocked 'external datasource \"wh\" (read-only): not exercised' with no body. verify.managed-datasource-stand-in.test.ts factory pin: the config.schemaMode external postgres declaration reaches the recording real factory unchanged (real driver kept for reads), and deriveCrudCases withholds its object, so no derived write is built for it. RED ON PRIOR HEAD: derive.ts restored from 2de0d505 (working tree only) gave 3 failed (the two it.each cases and the factory/derive pin) | 40 passed, VERDICT command-exit 1. Restored with git checkout HEAD --; git diff HEAD empty. GREEN: derive.test.ts + verify.managed-datasource-stand-in.test.ts gave Test Files 2 passed, Tests 43 passed, VERDICT 0. ABLATION once, through scripts/ablation-replace.mjs: anchor 'if (obj.external || (ds && !isManagedDatasource(ds))) {' went x1 -> x0, replaced by the declared-key read, blob 17ddde7d -> 261e62e9. The same 3 went red (Tests 3 failed | 40 passed). Restored blob == HEAD (17ddde7d) and git diff HEAD is empty. No dist leg because the suite imports from src. Full package: vitest run --maxWorkers=2 gave Test Files 55 passed (55), Tests 478 passed (478). typecheck: tsc plus check:test-typecheck OK; combined VERDICT command-exit 0.", "gates": "New worktree. Closure build pnpm --workspace-concurrency=2 --filter '@objectstack/verify^...' build: VERDICT 0. verify build: VERDICT 0. dispatch-gates --commands at bb1259fb: the same 104-family list as at 2de0d505 (diff empty), all re-run, each exit 0 captured before any pipe. check:skill-examples and check:dual-build-cjs-loads first returned exit 3 (prerequisite, dist not built) and exited 0 after the workspace build check:type-check-debt performs. check:type-check-debt exited 0. dispatch-gates --ran: '104 derived famil(ies) accounted for — 104 run, 0 NOT-MEASURED (a DERIVED zero — all 104 recorded an exit code and none of them is 3)'. PR check-runs on bb1259fb: in_progress at report time, not waited on. No merge of main: no conflict, and nothing in verify or service-datasource moved.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "1 this round — post-stamped os-dev-report comment (POST /repos/objectstack-ai/objectstack/issues/35523/comments). git push not counted. No PR body write (the delta is in summary for the seat).", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: coordinator (the seat files the mongodb/plugin-driver seed and hook card) · noted, not filed by me." ] }objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
Delivered · 2026-11-19T21:40Z · PR #35635 merged as 1104ee5; this card closed by its
Fixesline. Underos verify, a declared managed datasource on sqlite, sqlite-wasm, postgres, mysql, turso or memory now runs on an in-memory stand-in built from verify's own spec. Nothing of the declared connection reaches it, and the bound objects are still exercised. One reader,isManagedDatasource(resolveDatasourceSchemaMode), decides both the factory andderiveCrudCases. A datasource whoseschemaModeis spelled only inconfigorexternalkeeps its real driver for reads and is withheld from every write family. A managed engine with no faithful stand-in (mongodb, or a plugin driver) keeps its real driver; verify's own derived writes to it are withheld and the report names why. The cascade line item now reads "withheld on purpose — REASON". L1-a ACCEPT 7021917719 (after REWORK 7020917973).State:
pm:dispatchedremoved. Left open: #35640 (p1): duringos verifythe app's own seed and hooks still write to a managed mongodb or plugin-driver datasource. It is being measured now (seat order 21:17Z), and the shape goes to the maintainer.