Uh oh!
There was an error while loading. Please reload this page.
feat(spec): adopt the five ruled engine members onto IDataEngine and type getObject (#12248) - #12483
Conversation
…ject (#12248) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5LFCYBJ3q2s6yW6oMLxwy
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5LFCYBJ3q2s6yW6oMLxwy
📓 Docs Drift CheckThis PR changes 1 package(s): 12 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 126 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 df37eb27de5c8de38dde00e14f0a2909ec650584 && git checkout df37eb27de5c8de38dde00e14f0a2909ec650584
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 27b69027279f6e8cb65a6602e67bdb47178b3dc5 9f3b282611461fcdcd0f30646b365880e3009306 && git checkout -B drift-repro 27b69027279f6e8cb65a6602e67bdb47178b3dc5 && git merge --no-ff 9f3b282611461fcdcd0f30646b365880e3009306
node scripts/docs-audit/affected-docs.mjs --json 27b69027279f6e8cb65a6602e67bdb47178b3dc5
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#12248
Spec-side contract adoption per the 2026-08-25 maintainer ruling on the #11833 sweep (verbatim source 「其他接受」): fork 1 as ruled option A, fork 3 as the spec seat's design call, and the #12010
ConnectionEngineLiketrio adjudicated under the ruling's item 4. Spec-only — nopackages/services/**orpackages/objectql/**edits, per the card's fence (the analytics half re-dispatches from the services seat once these members exist). The aggregate-enum question stays with #12209 and is not touched here.Per-member adjudication (evidence bar: implemented on
ObjectQL+ cross-package-consumed + currently recovered via consumer-local structural re-declaration)packages/objectql/src/engine.ts)bb920ee089)resolveEffectiveDatasource?:6620service-analytics/plugin.ts:87(local re-decl) +:642(live call)getDriverForObject?:12451service-analytics/plugin.ts:95,566,589;metadata-protocol/migrations/partial-index-probe.ts:81;plugins/plugin-audit/audit-plugin.ts:328— 3 packages, each via a local structural decl oranyregisterDatasourceDef?:5043service-datasource/datasource-connection-service.ts:91(ConnectionEngineLike) +:600(live call)markDatasourceUnavailable?:5059:122+:472clearDatasourceUnavailable?:5068:128+:469,667Control for the counting method:
triggerHooks— the memberobjectql-engine.ts's header names as staying OFF the contract for lack of a slot consumer — counts zero non-test cross-package call sites under the same grep (comments only). The method distinguishes.All five are optional, mirroring the
getDriverByName?/introspectDatasource?posture: only engines owning datasource routing answer; every graceful-degradation seam is preserved (the ruling's stated reason for A). Signatures are transcribed from the implementing class, not invented —markDatasourceUnavailable'skindis the class'sDatasourceUnavailableKindunion'blocked' | 'failed'spelled as literals (spec cannot import engine-local names).ObjectQL implements IObjectQLEnginecompiles green against all five (that check IS the signature-compatibility measurement;pnpm --filter @objectstack/objectql typecheckexit 0, script echo verified, reading the freshly rebuilt specdist— the new members grep-confirmed present indist/analytics.zod-*.d.tsbefore the run).Fork 3:
getObjectgets a typed return (option A — typed return over shared exported guard)IObjectQLEngine.getObjectandEngineSchemaRegistryView.getObjectnow returnServiceObject | undefinedinstead ofunknown.Why typed-return beat a shared guard, argued from the three consumer-local re-declarations the ruling's tables point at (
service-analytics/plugin.ts:58— structured{fields?, external?}read by ~10 call sites;service-storage'sFileReferenceEngine(file-reference-lifecycle.ts:130+ the verify/backfill twins) readingfields[k].typethroughany; the registry-view readersplugin-pinyin-search/companion-projection.ts:41andplugin-sharing/record-share-cascade.ts:201):ObjectQL.getObject(engine.ts:12382, alias ofgetSchema:6360) andSchemaRegistry.getObject(registry.ts:2421) have always returnedServiceObject | undefined, whereServiceObject = z.input<typeof ObjectSchemaBase>lives in spec (data/object.zod.ts:2705). The header's "engine-local type ⇒unknown" rationale is measured stale for this member; the header text is corrected in the same stroke.z.input, ADR-0122) because the registry stores what was registered.Substitutability is pinned, not assumed:
objectql-engine.test.tsproves the contract answer is assignable to the exact structural viewservice-analyticsdeclared locally — so the services-lane substitution this card unblocks needs no cast (the outcome the ruling forbids).Verification (all at final commit
9f3b282, basebb920ee089)pnpm --filter @objectstack/spec typecheckexit 0 (all three sub-programs; both new/edited test files proven IN thetsconfig.test.jsonprogram via--listFiles, not merely absent from the debt ledger). Targetedvitest run src/contracts/data-engine.test.ts src/contracts/objectql-engine.test.ts→Test Files 2 passed (2),Tests 30 passed (30).check:generated→ "All 14 generated artifacts are up to date."api-surface/measured UNCHANGED — refuting the dispatch's expectation that it would move:gen:api-surfacere-ran on the rebuilt dist and wrote a byte-identical tree ("17 entries, 5175 exports"); the snapshot records the export set, and this diff adds members to existing exported interfaces, no exports.check:entry-nameability: "422 call probes across 17 public entries, 0 new unnameable structural mentions"; baseline untouched (its 7 pre-existing rows unchanged).ServiceObjectis already nameable where mentioned.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack(stderr attested: tree of objectstack-ai/objectstack at9f3b282), not hand-enumerated: all 26 path-derived families + the 5 test-file convention families (check:query-options-erasure,check:type-check-coverage,check:type-check-debtafter the fullturbo run build --filter='./packages/*' --filter='./packages/*/*'it requires — 70/70 tasks green,check:engine-double-contract— no new doubles were added,check:where-matcher) +check:nul-bytes: 31/31 exit 0, each exit captured before any pipe.pnpm lint(eslint . --no-inline-config, NOT narrowed): exit 0.pnpm --filter <pkg> run typecheckfor the nine script-carrying packages whose sources name the changed members or hold typedIObjectQLEngine/registry-view handles — service-datasource, runtime, rest, mcp, plugin-audit, plugin-security, plugin-pinyin-search, plugin-sharing, trigger-record-change — all nine "typecheck: Done", per-package completion lines enumerated from the log.service-analytics,service-storage,metadata-protocol,cloud-connectiondeclare notypecheckscript; they are covered by the green 70-task DTS build and by CI's farm. This narrowing is declared: the full downstream farm is CI's run.IDataDriverdeclares nointrospectSchema, andIDataEngine.introspectDatasource()returnsPromise<unknown>#11493 pattern; predictions written before running, mutations proven ON DISK by anchored grep counts — injected/displaced, never baregit diff --stat; no rebuild needed on either leg because the checker (tsc -p tsconfig.test.json) and the subject share one source tree, no dist in the loop):getObjectreturns reverted tounknown(injected=2/displaced=0 confirmed): predicted the two mutual-extends pins resolve tonever, the consumer reads fail as property-access-on-unknown, the substitutability pin resolves tonever, plus one TS6133 unused-import. Observed exactly that family: 2× TS2322'"exact"' not assignable to 'never', 3× TS2339 at?.fields/?.external/.fields[field], TS2322 on the substitutability pin, TS6133 — exit 2.markDatasourceUnavailable?renamed off the contract, recreating the pre-change posture for one member (injected=1/displaced=0 confirmed): predicted TS2339 at the member type read; observedTS2339: Property 'markDatasourceUnavailable' does not exist on type 'IDataEngine'plus follow-on TS7006/TS2578 (unused@ts-expect-error) — exit 2. This leg doubles as the control: it isorigin/main's contract for this member, and the pins cannot even name it there — the The service-lookupanyrule missesgetService<any>(...)— 80 sites erase the slot contract, 3 of them inside the rule's own scope #4251 drift, demonstrated live.git checkout HEAD -- <abs path>inside atrap … EXIT INT TERMscript withREPO_ROOTresolved up front; each restore proven bygit hash-object== the HEAD blob (7e01bce0…,334d4923…) and an emptygit diff HEAD/git status --porcelain. Baseline for both legs: the same tsc program on the clean tree reports nothing in these files beyond the one pre-existing ledgered TS6133.Notes for review
@objectstack/specminor (surface widening), following PR feat(spec): declare introspectSchema on IDataDriver and type IDataEngine.introspectDatasource — the engine-registration seam meets the compiler #11834's precedent; no ADR-0087 marker — additive, not declared-breaking, exactly as the precedent carried none.skills/**untouched (the_index.mdregeneration the precedent PR carried did not fire here —check:skill-refsgreen with no diff).IObjectQLEngine.getSchemastill returnsunknown— the fork-3 defect class, one member over from the #12248getObjectfix #12481 (getSchemastillunknown— the fork-3 class one member over) and finding:syncObjectSchemais implemented, consumed by two service packages, and declared by no contract — the #12010 member its table marked "not verified" #12482 (syncObjectSchemaimplemented + twice-consumed + undeclared — the member finding: a THIRD consumer-local structural engine type (ConnectionEngineLike) carries five members no spec contract declares #12010's table left "not verified"). Both remain open; neither is addressed here.Generated by Claude Code
Generated by Claude Code