feat(spec): remove the dangling postgres and nats values from ClusterDriverSchema - #14128
Conversation
…hema Both values validated in ClusterDriverSchema while no package implemented them — the only non-test registerClusterDriver() caller is service-cluster-redis — so a schema-valid driver value reached defineCluster()'s unconditional "not registered" throw at runtime. Removes the two enum values, corrects the now-false postgres-only prose around useExistingPool/url (the ledgered field itself stays), replaces the postgres doc examples with redis, registers the semantic migration entry under protocol major 18, and pins the shipped roster plus the by-name rejection of the two removed spellings. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mciyv38maJ6HYVMiaM26T1
…uster-dangling-drivers
📓 Docs Drift CheckThis PR changes 2 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 130 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 2536090521c1992a84b473b9414d783a75dc29ad && git checkout 2536090521c1992a84b473b9414d783a75dc29ad
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ec0c6c20f9920223205ab0ddeed49b85b1b52b72 33d5649661e0f8cfbdd434c7f3d0b31da60bf902 && git checkout -B drift-repro ec0c6c20f9920223205ab0ddeed49b85b1b52b72 && git merge --no-ff 33d5649661e0f8cfbdd434c7f3d0b31da60bf902
node scripts/docs-audit/affected-docs.mjs --json ec0c6c20f9920223205ab0ddeed49b85b1b52b72
|
…uster-dangling-drivers
… registry pin The registry read-vs-throw agreement pin used postgres as its schema-valid but never-registered sample; with postgres removed from ClusterDriverSchema the config now fails parse before the registry is consulted, so the expected "not registered" throw is unreachable. redis keeps the pin's exact intent: in the enum, but this suite never imports the package whose load-time side effect registers it, so in this module instance it is the requested-but-not- registered case — the same shape as the EE boot the suite's header records. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mciyv38maJ6HYVMiaM26T1
|
Integration fix for the Test Core red (pushed as What conflicted: after this branch's previous merge point ( The fix (test sample value only): the sample is now Local readings on the patched merged head
Generated by Claude Code Generated by Claude Code |
Fixes #13393
Removes the two dangling values from
ClusterDriverSchema(packages/spec/src/kernel/cluster.zod.ts):postgresandnats. Both validated at parse time while no package implemented them — the only non-testregisterClusterDriver()caller is@objectstack/service-cluster-redis— so a schema-validcluster.driverpassed validation and then reached the unconditional runtime throw indefineCluster()(the error text names the driver and says it is not registered). Direction fixed by the maintainer ruling on objectstack-ai/cloud#1626 (2026-08-24, option B adopted; its principle rider: a schema-valid value must not be an unconditional runtime throw — 声明即强制). Scope per this card's triage ruling (comment 5478753337): both dangling values, one card, one PR.Clause-②: yes — this diff narrows the accept set of a contract schema under
packages/spec/src/**.Derived judgments — every accept/reject behaviour change, enumerated
ClusterDriverSchema.parse('postgres'): ACCEPTED before → REJECTED now (zod v4invalid_valueissue; the issue'svaluesroster ismemory,redis,custom). Pinned by name incluster.test.ts.ClusterDriverSchema.parse('nats'): same flip, same by-name pin.ClusterCapabilityConfigSchemawithdriver: 'postgres'ordriver: 'nats': rejected at parse time; previously parsed clean and threw atdefineCluster()boot. The rejection moves from an unconditional runtime throw to the schema, where it carries the accept set.memory,redis,customall still accept (the exact roster is pinned viaClusterDriverSchema.options), defaults unchanged, every otherClusterCapabilityConfigfield untouched.useExistingPoolis NOT removed (triage prohibition: ledgered authorable-surface field). Only its postgres-only prose was corrected — field, type, and defaulttrueare unchanged, so zero accept-set change. The field's own retirement, if ever, is a separate card with its own ruling.packages/spec/src/contracts/cluster-service.tsdriver doc line,@objectstack/service-clusterdoc comments (defineClusterexample now instructsredis, per the issue title's second half),content/docs/kernel/cluster.mdx§8.1 and Phase 5 (the claim that the schema acceptspostgres/natswas corrected; the deferred-driver design sketches stay recorded for whoever builds one under the ruling's reversal condition).cluster-driver-dangling-values-removedunder protocol major 18 (accept-set narrowing is major-gated; matches the existing18.*semantic-entry precedents), regenerated intoregistry.tsviagen:migration-registry.spec-changes.jsonand the upgrade guide show no delta — their gates pass green, and the pre-existing major-18 semantic entry is likewise unprojected, so the projections cover shipped majors only.content/docs/references/kernel/cluster.mdxregenerated viagen:docs(never hand-edited).api-surface/,declaration-map/,export-origins/,authorable-surface/: no delta, as predicted — the export set and the authorable key set are unchanged (enum values are not ledgered keys);check:authorable-surfaceandcheck:api-surfacepass green with nothing to commit.Semver
@objectstack/spec: minor with BREAKING banner — the repo's launch-window convention for breaking changes (same grade the maintainer set on 2026-09-01 for finding(spec): all six branded identifier schemas in branded-types.zod.ts are declared but unbound — no schema anywhere composes them #13612 and finding(spec): EventNameSchema's only three binding schemas have no runtime consumer — the live event vocabulary is a closed enum that never touches it #13613, which remain open and are not addressed here). The changeset names both removed spellings, carries the FROM → TO mapping and the one-line fix, and declares its ADR-0087 disposition asregistered cluster-driver-dangling-values-removed(verified bycheck:adr-0087-registration, green).@objectstack/service-cluster: patch — doc-comment corrections only, no runtime change.skip-changeset: not applicable — this diff publishes from packages and carries a changeset.Verification — all readings at merged HEAD
b34b9e48Merged
origin/main(clean merge, no conflicts, no generated-artifact drift:check:generatedreports every artifact current on the merged tree) before the final gate union.Tests (via the shared verify lock):
pnpm --filter @objectstack/spec test— 448 files / 12043 tests passed pre-merge; re-run on the merged head: 449 files / 12057 tests, all passed.pnpm --filter @objectstack/service-cluster test— 4 files, 66 tests, all passed (re-run on merged head).pnpm --filter @objectstack/service-cluster-redis test— 1 file, 28 tests, all passed (re-run on merged head).pnpm --filter @objectstack/spec typecheck— green (tsc, scripts, and the test layer undertsconfig.test.json;tsc --listFilesconfirmscluster.test.tsis inside the test program andcluster.zod.tsplus the new migration entry are inside the source program, so neither reading is a phantom).Gates: the full dispatched list plus the families
scripts/pm/dispatch-gates.mjsderives from the actual diff (derivation re-run on the merged head; command set identical) — all green, includingcheck:adr-0087-registration,check:authorable-surface,check:docs,check:spec-changes,check:upgrade-guide,check:merge-driver,check:dual-build-cjs-loads(full 71-task workspace build performed locally),check:dev-prereqs,check:changeset-no-major,check:empty-changeset, and the changeset gate self-tests. Two readings are NOT MEASURED locally by the gates' own design, left to CI:check-test-completeness.mjs(grades a saved CI turbo test log; exit 3 with its own "record as NOT MEASURED" text) andpr-labels.mjs(needs PR context).Fixture census (authored
driver: 'postgres'/driver: 'nats')cluster.test.ts(the postgres-driver fixture pinned exactly the deleted branch; replaced with acustomparse fixture plus by-name rejection pins for both removed spellings and a roster pin),cluster.zod.tsexample,service-clusterdoc comments,content/docs/kernel/cluster.mdx, regeneratedreferences/kernel/cluster.mdx.driver: 'postgres'(DatasourceSchema— a real shipped datasource driver, unrelated enum), plus one opaqueServiceMetadataSchema.metadatarecord inservice-registry.test.tsand the datasource example inskills/objectstack-api/SKILL.md. Deliberately untouched.driver: 'nats'fixture existed anywhere in the repo.Boundary flags / open questions
18.*precedent inentries/; flagging here so review can confirm.Session: https://claude.ai/code/session_01Mciyv38maJ6HYVMiaM26T1
Generated by Claude Code
Generated by Claude Code