Skip to content

Commit 1581ad3

Browse files
chore(spec): drop the stale "No backticks in surface" comments from semantic migration entries (#28350)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoDhJuq8ADMbr6jHaGGQCs9S)_ Fixes #27731 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:删掉 223 个语义迁移条目里那句过时的「`surface` 里不许写反引号」注释,并删掉 `compliance-families-retirement.test.ts` 里同一理由的那条断言。 - 为什么改:升级指南的渲染器已改为按 CommonMark 规则给 `surface` 加围栏,反引号能正确渲染;这些注释与断言描述的限制已不存在,会误导下一个作者。 - 风险与回滚:只动注释行和一条测试断言,任何条目数据(surface/replacement/reason/acceptanceCriteria)一字未动,已用脚本逐条比对证明;不发布任何字节;回滚即 revert 本 PR。 - 先看:`packages/spec/src/migrations/entries/semantic/18.filter-is-empty-lowers-to-empty-operator.ts`(唯一保留半句的文件)、`packages/spec/src/system/compliance-families-retirement.test.ts`、`packages/spec/src/migrations/entries/semantic/17.spec-type-alias-input-suffix-retired.ts`(这条过时说法的源头)。 - 两分钟验证:`git grep -c -i "No backticks" -- packages/spec/src/migrations/entries/semantic | wc -l`,预期输出 0。 - 需要你做的:无,席位落地。 ## What changes - **223 semantic migration entries** under `packages/spec/src/migrations/entries/semantic/` lose the workaround comment that said a `surface` must carry no backticks (and, in some spellings, no pipes) because the upgrade guide renders it inside a code span and a table cell. That is no longer true: `build-upgrade-guide.ts` fences every surface through `scripts/lib/markdown-code-span.ts` (CommonMark 6.1), and a semantic surface renders in a list item, not a table row (the conversion table escapes pipes per cell anyway). - 222 files carry the "No backticks" spelling (the card counted 219 at `ef359b95`; new entries landed since). The 223rd is `17.spec-type-alias-input-suffix-retired.ts`, whose "Plain text, no markdown … backticks here break both" note is the one the others point to ("see the note on `spec-type-alias-input-suffix-retired`"), so it goes too. - 216 files: the comment was its own paragraph, removed together with one adjacent blank `//` separator. 6 files: it was the trailing sentence of a longer paragraph, so only that sentence is cut. 1 file (`18.filter-is-empty-lowers-to-empty-operator.ts`): the comment also carried a still-true rule (no `' / '` in a surface, because the schema build splits clauses on it, see `minRegisteredMajorForLeaf`); that half is kept, reworded to stand alone. - **`packages/spec/src/system/compliance-families-retirement.test.ts`**: the remaining `expect(entry.surface).not.toMatch(...)` no-backtick assertion and its stated reason are dropped. The order said a grep for `BACKTICK` at `3d9175d0` found nothing; that is because the card spelled the regex out in words. The assertion itself (a literal backtick regex) was still there at `501c864d`, measured and removed. - **No generator or template emits the comment**: `git grep -i "no backticks"` outside the entries hits only unrelated text (`docker/Dockerfile`, `scripts/check-regen-pending.mjs`, `scripts/symbol-anchors.mjs`, an mcp test); no script under `scripts/` or `packages/spec/scripts/` and no skill writes an entry template carrying it. - No line-number anchor points into these files (`git grep` for `entries/semantic/...ts:N` finds none), so no ledger drifts. ## Tests - Proof that only comments moved (script kept out of the tree): for each of the 223 changed entry files, the TypeScript AST printed with `removeComments` at base `501c864d` equals the one at head: **223/223 identical**. Then each entry module was imported from both trees and the whole `entry` object compared as JSON (id, surface, replacement, reason, acceptanceCriteria and every other key; 1147 keys): **223/223 identical**. - Negative control: with one surface changed by one prefix in `18.page-slots-tabs-retired.ts` (committed, measured, reset), both comparisons report **222/223** and name that file; the tree was restored (`git status` clean). - `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/system/compliance-families-retirement.test.ts src/migrations` at `3737a157`: Test Files 6 passed (6), Tests 204 passed (204). - `pnpm --filter @objectstack/spec typecheck` at `3737a157`: exit 0. ## Acceptance notes - **No changeset** (`skip-changeset`): nothing published moves. `@objectstack/spec` `files[]` ships `dist`, `src/**/*.zod.ts` and generated artifacts; the entries are `*.ts` (not `.zod.ts`) and the test is `.test.ts`. After a full build at `3737a157`, `grep -rlF "No backticks"` and `grep -rlF "Plain text, no markdown"` over every `files[]` path hit 0 files, while the positive control (`SqlDriver.distinct() third argument`, an entry surface) hits 2 files in `dist`. - No governed path in the diff (all paths are under `packages/spec/src/`). - The order's 222-file measurement held; the 223rd file is the same workaround in different words, inside the order's file surface (comment lines in `entries/semantic/**`). ## Verification Head `3737a157`, base `501c864d`. Full workspace build first (`pnpm turbo run build --filter='!@objectstack/docs' --concurrency=2`, real `.d.ts`): 116/116 tasks. <details><summary>Derived gates: 77 derived, 77 run, all exit 0 (reconciled with dispatch-gates --ran: 0 NOT-MEASURED, 0 UNRUN)</summary> `check-plugin-teardown-shape --self-test` first exited 3 on the shallow clone (its pinned positive-control commit was missing); after `git fetch origin 621a487 --depth=1` it exits 0 (48 cases). Local-only `pnpm check:dev-prereqs`: exit 0. node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0 node scripts/check-adr-0087-registration.mjs --self-test :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-adoption.mjs :: exit 0 node scripts/check-comment-mask-adoption.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-dev-prereqs.mjs --self-test :: exit 0 node scripts/check-dts-emitted.mjs --self-test :: exit 0 node scripts/check-issue-citations.mjs :: exit 0 node scripts/check-plugin-teardown-shape.mjs :: exit 0 node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 0 node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0 node scripts/docs-audit/check-affected-docs.mjs :: exit 0 node scripts/docs-audit/check-drift-comment.mjs :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm --filter @objectstack/spec run check:api-surface :: exit 0 pnpm --filter @objectstack/spec run check:authorable-surface :: exit 0 pnpm --filter @objectstack/spec run check:browser-reachable-entries :: exit 0 pnpm --filter @objectstack/spec run check:docs :: exit 0 pnpm --filter @objectstack/spec run check:dual-source-exports :: exit 0 pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0 pnpm --filter @objectstack/spec run check:empty-state :: exit 0 pnpm --filter @objectstack/spec run check:entry-nameability :: exit 0 pnpm --filter @objectstack/spec run check:export-origins :: exit 0 pnpm --filter @objectstack/spec run check:exported-any :: exit 0 pnpm --filter @objectstack/spec run check:liveness :: exit 0 pnpm --filter @objectstack/spec run check:llms-txt :: exit 0 pnpm --filter @objectstack/spec run check:skill-refs :: exit 0 pnpm --filter @objectstack/spec run check:spec-changes :: exit 0 pnpm --filter @objectstack/spec run check:strictness-ledger :: exit 0 pnpm --filter @objectstack/spec run check:upgrade-guide :: exit 0 pnpm --filter @objectstack/spec run check:variant-docs :: exit 0 pnpm --filter @objectstack/spec run check:yaml-examples :: exit 0 pnpm check:changeset-gate-self-tests :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:dispatcher-error-vocabulary :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:dts-closure :: exit 0 pnpm check:dual-build-cjs-loads :: exit 0 pnpm check:engine-double-contract :: exit 0 pnpm check:future-spec-major :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:issue-citations :: exit 0 pnpm check:keyed-text-bounds :: exit 0 pnpm check:lean-entry-closure :: exit 0 pnpm check:logger-receiver-detach :: exit 0 pnpm check:merge-driver :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:objectql-double-limit :: exit 0 pnpm check:org-identifier :: exit 0 pnpm check:page-declaration-shape :: exit 0 pnpm check:platform-object-tenancy-census :: exit 0 pnpm check:pm-prior-rulings :: exit 0 pnpm check:published-files :: exit 0 pnpm check:query-options-erasure :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:registry-log-declared :: exit 0 pnpm check:rest-log-spy-declared :: exit 0 pnpm check:role-word :: exit 0 pnpm check:slot-lookup :: exit 0 pnpm check:sourcemap-no-sources-content :: exit 0 pnpm check:spec-docblock-symbol-anchors :: exit 0 pnpm check:spec-parsed-alias :: exit 0 pnpm check:system-context-census :: exit 0 pnpm check:test-source-alias :: exit 0 pnpm check:tier-file-adoption :: exit 0 pnpm check:type-check-coverage :: exit 0 pnpm check:type-check-debt :: exit 0 pnpm check:undeclared-dep-imports :: exit 0 pnpm check:watch-hint-literal :: exit 0 pnpm check:where-matcher :: exit 0 </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibwMinUv84kKooNoXvw)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0f29a88 commit 1581ad3

224 files changed

Lines changed: 7 additions & 464 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎packages/spec/src/migrations/entries/semantic/17.action-descriptor-resume-authority-default-flip.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import type { SemanticMigration } from '../../types.js';
44

55
export const entry: SemanticMigration = {
66
id: 'action-descriptor-resume-authority-default-flip',
7-
// No backticks in `surface` — build-upgrade-guide.ts renders it inside a code
8-
// span AND a table cell (see the note on `spec-type-alias-input-suffix-retired`).
97
surface:
108
'automation.ActionDescriptor.resumeAuthority — an OMITTED value on a pausing '
119
+ 'node descriptor (supportsPause: true, or any executor whose execute() returns '

‎packages/spec/src/migrations/entries/semantic/17.approval-escalation-enabled-default-flip.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import type { SemanticMigration } from '../../types.js';
44

55
export const entry: SemanticMigration = {
66
id: 'approval-escalation-enabled-default-flip',
7-
// No backticks in `surface` — build-upgrade-guide.ts renders it inside a code
8-
// span AND a table cell (see the note on `spec-type-alias-input-suffix-retired`).
97
surface:
108
'automation.ApprovalEscalation.enabled — an OMITTED value inside an approval '
119
+ "node's escalation block",

‎packages/spec/src/migrations/entries/semantic/17.audit-log-action-enum-retired.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import type { SemanticMigration } from '../../types.js';
44

55
export const entry: SemanticMigration = {
66
id: 'audit-log-action-enum-retired',
7-
// No backticks in `surface` — build-upgrade-guide.ts renders it inside a
8-
// code span AND a table cell.
97
surface:
108
"sys_audit_log.action — the values 'export' and 'permission_change' left the select "
119
+ 'enum declared by plugin-audit (packages/plugins/plugin-audit/src/objects/'

‎packages/spec/src/migrations/entries/semantic/17.audit-log-action-restore-retired.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import type { SemanticMigration } from '../../types.js';
99
// registry where a dropped entry produces no error anywhere.
1010
export const entry: SemanticMigration = {
1111
id: 'audit-log-action-restore-retired',
12-
// No backticks in `surface` — build-upgrade-guide.ts renders it inside a
13-
// code span AND a table cell.
1412
surface:
1513
"sys_audit_log.action — the value 'restore' left the select enum declared by "
1614
+ 'plugin-audit (packages/plugins/plugin-audit/src/objects/sys-audit-log.object.ts). '

‎packages/spec/src/migrations/entries/semantic/17.driver-aggregate-undeclared-key-aliases-removed.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import type { SemanticMigration } from '../../types.js';
44

55
export const entry: SemanticMigration = {
66
id: 'driver-aggregate-undeclared-key-aliases-removed',
7-
// No backticks in `surface`: the upgrade-guide renderer wraps this string
8-
// in a code span of its own, and a nested pair renders as literal ticks.
97
surface: "driver aggregate() call argument — query.aggregate and aggregations[].func",
108
replacement:
119
'query.aggregations and aggregations[].function — the spellings QueryASTSchema and '

‎packages/spec/src/migrations/entries/semantic/17.driver-sql-distinct-bare-filter-typed.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import type { SemanticMigration } from '../../types.js';
44

55
export const entry: SemanticMigration = {
66
id: 'driver-sql-distinct-bare-filter-typed',
7-
// No backticks in `surface` — build-upgrade-guide.ts renders it inside a
8-
// code span already, and a nested backtick would close it.
97
surface: 'SqlDriver.distinct() third argument — any value',
108
replacement:
119
'a bare FilterCondition (@objectstack/spec/data) — the same value find() carries '

‎packages/spec/src/migrations/entries/semantic/17.filter-regex-options-retired.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import type { SemanticMigration } from '../../types.js';
44

55
export const entry: SemanticMigration = {
66
id: 'filter-regex-options-retired',
7-
// No backticks in `surface` — build-upgrade-guide.ts renders it inside a
8-
// code span already, and a nested backtick would close it.
97
surface:
108
'data.filter $regex / $options — in a STORED filter (dashboard widget filter and '
119
+ 'globalFilters, report runtimeFilter, page and component filter, solution-blueprint '

‎packages/spec/src/migrations/entries/semantic/17.import-run-automations-declared-default-corrected.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import type { SemanticMigration } from '../../types.js';
44

55
export const entry: SemanticMigration = {
66
id: 'import-run-automations-declared-default-corrected',
7-
// No backticks in `surface` — build-upgrade-guide.ts renders it inside a
8-
// code span AND a table cell (see the note on `spec-type-alias-input-suffix-retired`).
97
surface:
108
'api.ImportRequest runAutomations — the declared default of the key on BOTH import '
119
+ 'bodies, POST /api/v1/data/:object/import (ImportRequest) and its async twin POST '

‎packages/spec/src/migrations/entries/semantic/17.notification-list-cursor-retired.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import type { SemanticMigration } from '../../types.js';
44

55
export const entry: SemanticMigration = {
66
id: 'notification-list-cursor-retired',
7-
// No backticks in `surface` — build-upgrade-guide.ts renders it inside a
8-
// code span AND a table cell (see the note on `spec-type-alias-input-suffix-retired`).
97
surface:
108
'api.listNotifications cursor — the key on BOTH halves of GET /api/v1/notifications '
119
+ '(ListNotificationsRequestSchema and ListNotificationsResponseSchema) and the cursor '

‎packages/spec/src/migrations/entries/semantic/17.position-permissions-column-retired.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import type { SemanticMigration } from '../../types.js';
44

55
export const entry: SemanticMigration = {
66
id: 'position-permissions-column-retired',
7-
// No backticks in `surface` — build-upgrade-guide.ts renders it inside a
8-
// code span AND a table cell.
97
surface:
108
'sys_position.permissions — the "JSON-serialized array of permission strings" '
119
+ 'textarea column left the platform position table declared by plugin-security '

0 commit comments

Comments
 (0)