Repository navigation
fix(service-datasource)!: reconnect requires previous, and the engine read-back answers the stored driver id - #27788
Conversation
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2fhwqSBmy1XBXfcoU1
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2fhwqSBmy1XBXfcoU1
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2fhwqSBmy1XBXfcoU1
📓 Docs Drift CheckThis PR changes 3 package(s): 14 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 169 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 358cc92507e5ef8f769a799bf611cc06a56626c8 && git checkout 358cc92507e5ef8f769a799bf611cc06a56626c8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 968cacfd10fdec64b6089d0da4f721f1a8a10925 a5f0c8b5dcab727e54d4728c6b3f921b0e0bc903 && git checkout -B drift-repro 968cacfd10fdec64b6089d0da4f721f1a8a10925 && git merge --no-ff a5f0c8b5dcab727e54d4728c6b3f921b0e0bc903
node scripts/docs-audit/affected-docs.mjs --json 968cacfd10fdec64b6089d0da4f721f1a8a10925
|
|
epic:#27261#1 · marchtian · session_017ihL2fhwqSBmy1XBXfcoU1 Body addendum from the card thread. The relay refuses a body patch here because the body's first line is the project attribution marker, not a signature line, so the third declaration line and the maintainer summary ride this comment instead of the body. Skills-docs: none — no page under 维护者速读
|
|
epic:#27261#1 · marchtian · session_017ihL2c5z3q4h8inrn5kwqV The seat's at-tier review call was refused by the model quota, and per contract-review.md the tier is not lowered. Owed on this head: one same-shape
|
|
triage#1 · os-sales · session_01L6bhgV4fMGJHSdSdx3u9mK Contract-review-claim: Generated by Claude Code |
|
triage#1 · os-sales · session_01L6bhgV4fMGJHSdSdx3u9mK Contract reviewServed-tier: Review at ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Narrowing face —
Findings: no must-fix. One should-fix (the refusal message on the no-live-pool branch), two nits (the Implemented-by: VERDICT: PASS Generated by Claude Code |
|
epic:#27261#1 · marchtian · session_017ihL2c5z3q4h8inrn5kwqV 维护者速读
席位意见:ACCEPT。契约复核 PASS 在案(分诊 6511604842, 席位核对
|
Requested by 田騏 · project thread
Fable review owed. This PR was built on Opus while the Fable quota was out (maintainer order: finish on Opus, then wait for the contract review). It touches
packages/spec/src/**, so it does not land until aCONTRACT_REVIEW_TIERcontract review record PASS is on its current head.Fixes #27727 (epic #27261). The four should-fixes and the prose note from the contract review of PR #27715 (6508089206, ④ and ③). Claim 6509213861.
What changes
IDataEngine.registerDatasourceDef?member doc (packages/spec/src/contracts/data-engine.ts): "last write wins, except an absentdriverkeeps the id stored before it", so the member doc and theEngineDatasourceDef.driverkey doc no longer disagree. The engine's ownregisterDatasourceDefdoc says the same. The key doc now also says the read-back answers the stored id.ObjectQL.listDatasourceDefsanswers each definition's storeddriverid when it has one (chosen over documenting the omission: the id is what decides the floor, so a sweep asking which datasources name a plugin driver can now be written against the contract). A definition that never named a driver is listed without the key, as before; the existingtoEqualpins carry no driver and are unchanged.DatasourceConnectionService.reconnect:opts.previousis required (type level), and a call withoutprevious.driver(absent or empty) is refused at runtime BEFORE anything is evicted or rebuilt, so the live pool keeps serving. Before this, a host callingreconnectwithoutpreviousgot a kept pool restored under a definition naming no driver, which serves a plugin driver unfloored, silently. Both in-repo callers (the admin plugin'sreregisterPooland two test seams) already pass it.external-driver-floor.test.ts: the objectql: virtual-object correctness floor —applyDriverQueryInMemoryhelper, per-datasource row cap with a loud refusal,supportshonoured for plugin drivers, refusal-envelope mapping for driver failures (epic #27261 P1) #27277 keep test now names the caller class it models (a registration of the write-gate facts only) and says the connection service is not that caller.content/docs/data-modeling/virtual-objects.mdx: the "ADR-0015 ... Tier A" line is gone (Tier A is epic [Decision] Ontology over external systems: virtual objects on ADR-0015 federation — two driver tiers (plugin code · declarative OpenAPI), pushdown/identity/catalog/cache rules, Studio and AI drafts (2026 ontology research + deep design) #27261's term, not ADR-0015's); the ADR-0015 reference stays, describing what the ADR does govern on that page.Why
Contract review 6508089206 ④ on #27666: no must-fix, and none of these opens a path today, but each leaves the next caller a way to write a datasource the floor does not protect, or a contract that says two things about one member.
Verification
Local, on
a5f0c8b5(branch merged withorigin/mainat34dc09b6):external-driver-floor.test.ts,[#27727]block:listDatasourceDefsanswers the named id, the kept id, and the manifest-declared id (2 of 3 red without the engine change; the third is the control that a def with no driver is listed without the key).datasource-connection-service.test.ts,[#27727]block: areconnectwithoutprevious(and with an emptydriver) rejects, the live driver and the def list are untouched, and the factory built nothing (red without the guard); a failed rebuild restores the kept pool under the OLD driver id. A@ts-expect-errorpinspreviousas required in a file the package'stsccompiles.pnpm --filter @objectstack/objectql test: 9247/9247.pnpm --filter @objectstack/service-datasource test: 1013/1013. clisecret-reference-unionandabsent-table-reads: 49/49.typecheckclean for objectql, service-datasource and spec;pnpm lintexit 0; speccheck:generatedexit 0 (all 14 artifacts current).dispatch-gates --ran: 109 derived families, 109 run, 0 not measured, all exit 0 (after a fullpnpm build).Clause-②: yes (narrowing)
Metadata-protocol: none
The claim declared
Clause-②: no (narrowing)for the requiredprevious; the diff also widenslistDatasourceDefs's answer by the storeddriverkey, so this PR and its changeset sayyes (narrowing), as the epic PM asked. The changeset carries the BREAKING banner (a host callingreconnectwithoutprevious; none in-repo) and the ADR-0087 markernot-required (no-migration-prescription).Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed (doc-only change to a contract interface;pnpm --filter @objectstack/spec check:generatedexits 0 against the freshly built dist, nothing to regenerate).content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_017ihL2fhwqSBmy1XBXfcoU1
Generated by Claude Code