Repository navigation
fix(spec): connector docs locate an undeclared key's refusal at the entry - #29306
Conversation
…ntry The connector entry and defineConnector() TSDoc said an undeclared top-level key is refused "located at the key". zod raises one unrecognized_keys issue at the entry itself (empty path alone, connectors.N inside a stack) and names every key in `keys`. Say that, and correct the same phrase in the protocol-18 upgrade note's reason and the test file header. Claude-Session: https://claude.ai/code/session_01ADHkmQnpb1NhsSxWTHrV3q Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check
What this run could not see
Coarse fallback — 168 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
domain:spec#1 · os-steve · session_01ADHkmPi25XXKx92Xmg4viS Head-sha: 维护者速读
席位意见:可落地,等契约复审。 席位核对 — ACCEPT ·
|
|
domain:spec#1 · os-steve · session_01ADHkmPi25XXKx92Xmg4viS Contract-review-claim: session_01ADHkmPi25XXKx92Xmg4viS · head cdbde72 · 2026-11-02T12:02Z |
|
domain:spec#1 · os-steve · session_01ADHkmPi25XXKx92Xmg4viS Contract reviewServed-tier: Inputs: card #28821 (body, triage 6564444438 and 6572205378, claim 6574951022, os-dev-report 6576053953, claim amendment 6576120502), PR #29306 (body, four-file list, net diff against ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentEach new sentence tried against the code, on the four doors named in the brief: the entry parsed alone (
Residue check: Findings: must-fix — none. should-fix — none. Implemented-by: VERDICT: PASS |
Requested by Steve · project thread
Fixes #28821
Clause-②: no
Metadata-protocol: none
维护者速读
unrecognized_keys,键名在keys里;现照实写。同句也改在尚未发布的 protocol-18 升级说明 reason 和测试文件头注释里。packages/spec/src/integration/connector.zod.ts(两段 docblock)、packages/spec/src/migrations/entries/semantic/18.connector-entry-undeclared-key-refused.ts(reason 一句)。pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/integration/connector-entry-undeclared-keys.test.ts,预期全绿,用例本身就钉着 path 为空、connectors.0、keys列出每个键。What changes
packages/spec/src/integration/connector.zod.ts, theDeclarativeConnectorEntryBaseSchemadocblock: "refuses it by name, located at the key" now says the refusal is ONE zodunrecognized_keysissue located at the entry, not at the key: its path is the entry's own (empty when the entry is parsed alone,connectors.Ninside a stack), and it names every undeclared key inkeysand in its message.defineConnector()docblock: "refused by name, located at the key" now says oneunrecognized_keysissue at the root (path[], not the key's) lists every such key inkeys. The prescription clause is kept.packages/spec/src/migrations/entries/semantic/18.connector-entry-undeclared-key-refused.ts,reason: "refused now, by name and located at the key" now says oneunrecognized_keysissue located at the entry lists every undeclared key. This entry is not released yet (its changesetsharden-connector-undeclared-keys.mdand28738-define-connector-closed.mdare still pending), so the false sentence would otherwise ship in the protocol-18 upgrade guide.packages/spec/src/integration/connector-entry-undeclared-keys.test.ts, the file-header comment only ("located at the key" → "in one issue located at the entry root"). No assertion changes; the cases already pin path'',connectors.0andkeys..changeset/28821-connector-refusal-location-prose.md:@objectstack/specpatch.No forced test edits. Nothing generated moved: both docblocks are JSDoc, not
.describe(), andcheck:generatedreports all 14 artifacts up to date.Why
The phrase came from #28688 and PR #28815 carried it into
defineConnector(). Measured on the built spec atcdbde723(DeclarativeConnectorEntrySchema/defineConnector/ObjectStackDefinitionSchema, issues as[code, path, keys]):No
.superRefineadds a located issue for an undeclared key: the refusal is terminal (strictObject), so the ADR-0097 refinements do not run. The only issue located at a key is a retired key's (triggers), which is declared as a tombstone and so is not an undeclared key.Tests
pnpm --filter @objectstack/spec test(under os-verify-lock, atcdbde723): Test Files 790 passed (790), Tests 23370 passed, 1 todo. VERDICT command-exit 0.pnpm --filter @objectstack/spec typecheck: VERDICT command-exit 0.pnpm --filter @objectstack/spec check:generatedafterpnpm --filter @objectstack/spec build: all 14 generated artifacts up to date, VERDICT command-exit 0.Acceptance notes
Verification
Local gate subset, derived by
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackatcdbde723(4 paths vs merge basef6a04e3af), each run with stdin closed and its exit captured before any pipe.82 derived, 82 run, 0 non-zero; --ran reconcile: 82 run, 0 NOT-MEASURED, 0 UNRUN (a DERIVED zero)
check-plugin-teardown-shape --self-test(pinned commit outside the shallow clone),@objectstack/lint check:doc-formula-expressions(formula dist),check:dual-build-cjs-loadsandcheck:lean-entry-closure(package dists).git fetch --depth=1 origin 621a4876…andpnpm turbo run build --concurrency=2 --filter='./packages/**'under os-verify-lock (78/78 tasks, VERDICT command-exit 0).check:published-filesthroughcheck:spec-parsed-alias), all 14 exit 0.node scripts/check-changeset-no-major.mjs --base origin/main --event FILEwith this body: exit 0,LEVEL AXIS: … clause-② no and metadata-protocol none … a non-protocol change at patch.CI families outside the derived total (lint, the type-check lanes, Test Core and the rest) are read from this PR's check-runs; none was re-run here.
Human Minimum
packages/specholds no runtime logic.pnpm lintis CI-owned and not run locally (comment and string-literal text only).main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmQnpb1NhsSxWTHrV3q
Generated by Claude Code