Repository navigation
docs(spec): knowledge-source-id-to-name names the underscore-led id as the one source its rename rebuilds - #38248
Conversation
…xception The conversion's summary and comment said the rename rebuilds no index for every knowledge source. A source whose id begins with an underscore cannot keep it as name: it takes a new name, is built again under it, and the author drops its old index with dropSource. Say so, in the words the id tombstone and the knowledge-source-registration-governed entry use, and pin the case: the fixture carries an underscore-led id, a spec test reads the chain's rewrite and the parse's refusal and holds the three texts to one remedy, and a report pin shows os migrate meta printing the edit, its judge and the refusal. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTJs4WrxwVhFtrMRYq
…e fixture The report-order harness's PAIR pin replays every linked conversion's own fixture, which now carries the underscore-led id, and checks the knowledge-source-registration-governed review line beside its edits. The separate describe added nothing to that and, by editing the file, put the file's thirteen dynamic-import reaches under check:test-source-alias. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTJs4WrxwVhFtrMRYq
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: PR #38248 for card #38217. Read: the card body and its three comments (triage 7236479180, unlock 7236758780, claim 7237127602; no ruling, no earlier record), the PR body, its three files, the net diff against Check-runs on this head at the read: 58 ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
The jsdoc, sentence by sentence:
The three texts say the same thing. The new Tried to break it:
No must-fix, no should-fix.
Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 8de7f0f · card #38217 · area s2-ai · 2026-11-28T10:24ZL1 checklist
Tier: XS. Landing: ready and auto-merge in this stroke. |
Requested by Sales · project thread
Fixes #38217
Clause-②: no
Metadata-protocol: none
维护者速读
dropSource删掉,不会自动删。name不允许下划线开头。PR docs(knowledge): the 18 to 19 id row names the underscore exception and the dropSource cleanup #38050 已经在id的拒收提示和升级条目knowledge-source-registration-governed里讲了这个例外,只有转换本身的说明没讲。_faq原样搬成name: '_faq',随后解析拒收并提示“去掉下划线改名”;只改了说明文字和注释,加了夹具和测试把这一例钉住。What changes
packages/spec/src/conversions/entries/19/knowledge-source-id-to-name.ts:summarykeeps "the value is unchanged, so no index is rebuilt" and adds the exception: an id that begins with an underscore, whichnamerefuses, so that source takes a new name, is built again under it, and its old index is dropped withdropSource, which the author runs; it names the upgrade entryknowledge-source-registration-governedfor how. The summary reaches the upgrade guide's conversion table andos migrate meta --json'sspecChanges.converted[].to.renameKeycopies the value as it is (id: '_faq'→name: '_faq'), the parse then refuses thatnamewith the router-addressable prescription (rename it without the underscore), and the conversion does not invent a new name, because only the author knows it._legacy_faq→name: '_legacy_faq');expectedNotices1 → 2.The conversion's behaviour is unchanged.
New
packages/spec/src/conversions/entries/19/knowledge-source-id-to-name.test.ts:nameis refused byKnowledgeSourceSchemawith exactlyROUTER_ADDRESSABLE_NAME_MESSAGEatname, and the plain one parses;conversionIdsand is listed (not proven absent) for such a stack;dropSource;idtombstone (read off the live parse) and the D3 entry'sreplacementeach name the underscore, "takes a new name" and`dropSource`, and the tombstone and summary name the same D3 entry.What
os migrate meta --from 18prints for such a source is pinned by the report's existing PAIR pin (packages/cli/src/commands/migrate/meta.report-order.test.ts, "pairs every link the registry declares, replayed over the linked conversion's own fixture"), which replays this conversion's fixture, now carrying the underscore-led id, and checks that the D3 entry's review line (itsreplacementnames the new name anddropSource({ source })) is printed beside the edits. That file is not edited here.One
patchchangeset for@objectstack/spec.Why
#38217: the notice was true for every source but one class. PR #38050 taught that class on the tombstone and the upgrade entry; the conversion's own summary and comment did not.
Verification
Ablation: with the conversion file restored to
origin/mainand the new test kept, the two wording pins fail (the summary keeps "no index is rebuilt"…andthe summary, the id tombstone and the D3 entry…); the rewrite and refusal pins pass, as they should, since the behaviour did not change. Restored: green.runs
Head 8de7f0f.
pnpm --filter @objectstack/spec build, thenpnpm turbo run build --filter='@objectstack/cli^...': exit 0.packages/spec:npx vitest run --project local(whole package): 912 files, 28855 tests passed (1 todo).packages/spec:tsc --noEmitexit 0;pnpm check:test-typecheckOK;pnpm check:generated: every artifact up to date.packages/cli:npx vitest run src/commands/migrate/meta.report-order.test.ts: 21/21 passed (the PAIR pin included) on the spec dist built from this branch.node scripts/pm/dispatch-gates.mjs --commands --changed: 81 derived at this head, all run (on the first head, whose diff was a superset): 79 exit 0 (pnpm check:test-source-aliasre-run at this head); 2 exit 3 (PREREQUISITE NOT MET), so NOT MEASURED locally and left to CI:node scripts/check-plugin-teardown-shape.mjs --self-test(its fixture commit is out of this shallow clone),pnpm check:dual-build-cjs-loads(reads every package'sdist/; only the CLI closure is built here).check:test-source-aliaswas red on the first head, over the dropped CLI pin.node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD: OK, both commits.npx eslinton the changed files: exit 0.Acceptance notes
meta.report-order.test.tswas written and dropped in the second commit: it duplicated the PAIR pin above, and editing that file puts its thirteen pre-existing dynamic-import reaches undercheck:test-source-alias. The diff stays inside the claim's file surface.Human Minimum
packages/specholds no runtime logic. (prose, fixture and tests only)pnpm lintwas not run locally; CI runs it).main, one pull request. (branchclaude/project-thread-r6cjhfis the harness-assigned name)packages/spectouched:check:generatedreports every artifact up to date (no export or schema changed).content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgTJs4WrxwVhFtrMRYq