Repository navigation
Commit a1afbb9
feat(spec)!: retire five inert objectstack.manifest.json keys (name, specVersion, skills, scaffold, visibility) (#31064)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoVRhC8knfxw74e3SpmzvPw4)_
Clause-②: no (narrowing) — five authorable keys of
`TemplateManifestSchema` become tombstones, and `os package publish`
refuses the file's `visibility` by name
Metadata-protocol: narrowed
Skills-docs: none — no `skills/**` page teaches
`objectstack.manifest.json`; the docs pages that did are updated here
Part of #31035
## 维护者速读
- 改了什么:`objectstack.manifest.json`
里五个没人读的键(`name`、`specVersion`、`skills`、`scaffold`、`visibility`)改成
`retiredKey()` 墓碑:tsc 和 schema 解析都按键名拒绝并给出替代做法;`os package publish`
遇到文件里的 `visibility` 直接拒绝(指向 `--visibility`),其余四个只警告让作者删除;blank 模板、三个
connector 应用的清单和脚手架不再写这些键;版本同步脚本不再盖 `specVersion`。
- 为什么改:ADR-0049「要么执行要么删除」。逐键实测(见 #31035 的逐键表):这四个键在
CLI、create-objectstack、hotcrm 里都没有读者,`visibility`
只被读来警告「我忽略你」。`publisher` / `isStarter` 有 hotcrm 的服务模式发送链,不在本 PR,等单独的决策卡。
- 风险与回滚:收窄(BREAKING 横幅 + adr-0087 登记)。还写着这五个键的旧清单在 schema 解析时被拒;`os
package publish` 只对 `visibility` 拒绝,其他四个继续发布并警告,所以老脚手架项目还能发。hotcrm
的清单和版本测试在它下次升级平台时要删这几个键(与 `category` 同一载体)。回滚即 revert。
-
先看:`packages/spec/src/marketplace/template-manifest.zod.ts`(五个墓碑和提示语);`packages/cli/src/commands/package/publish.ts`(`visibility`
拒绝 + 四键警告);`scripts/sync-template-versions.mjs`(去掉 `specVersion`
盖章,自测基线重测)。
- 两分钟验证:`pnpm --filter @objectstack/spec exec vitest run --project repo
src/marketplace/template-manifest-inert-keys-retirement.test.ts`,预期 12
个用例全绿(逐键拒绝、两条替代指引、`publisher`/`isStarter` 对照、tsc 墓碑、登记、全树清单扫描)。
- 需要你做的:无,席位落地。
## What changes
- **Spec (`TemplateManifestSchema`).** `name`, `specVersion`, `skills`,
`scaffold` and `visibility` become `retiredKey()` tombstones. The schema
is non-strict, so a bare delete would strip silently; a tombstone
refuses each key at its own path with the prescription ``
`TemplateManifest.<key>` was removed in @objectstack/spec 18 (ADR-0049)
— … ``. `visibility` names `os package publish --visibility`;
`specVersion` names `manifest.engines.protocol`.
- **ADR-0087 bookkeeping.** Five `RETIRED_KEYS_BY_MAJOR[18]` rows
(`marketplace/TemplateManifest:<key>`), one D3 semantic entry
`marketplace-template-manifest-inert-keys-retired` naming all five, and
its STEP18_RATIONALE fragment. No D2 conversion: this file is not a
stack collection member (the `category` precedent on the same schema),
so `os migrate meta` has nothing to rewrite.
- **Liveness.** The five `template_manifest` rows stay `dead` with a
REMOVED note; the `scaffold.*` children are removed. `publisher` /
`isStarter` notes now say they are pending a maintainer decision (hotcrm
is a producer).
- **`os package publish`.** A manifest declaring `visibility` is refused
before any network call (`retiredVisibilityRefusal()`, the `category`
shape). `name`, `specVersion`, `skills` and `scaffold` get a non-fatal
warning naming them for deletion; the warning list no longer carries
`visibility`.
- **create-objectstack.** The blank template's manifest drops `name`,
`specVersion`, `skills` and `scaffold`; scaffolding strips every retired
key (`category` and these five) from the template's manifest via
`stripRetiredManifestKeys` instead of writing `name`; the key list
`RETIRED_TEMPLATE_MANIFEST_KEYS` is pinned to the spec's
`RETIRED_KEYS_BY_MAJOR` rows by
`scaffold-retired-manifest-keys.test.ts`.
- **Release tooling.** `scripts/sync-template-versions.mjs` no longer
stamps `specVersion`; its self-test battery floors are re-measured
(Control A 14, Control C 4, Control I now pins `engines.protocol` at 9),
and the create-objectstack version tests follow.
- **Shipped manifests.**
`packages/apps/connector-{docusign,github,stripe}/objectstack.manifest.json`
drop `name` and `specVersion`.
- **Pins.** `template-manifest-inert-keys-retirement.test.ts` (spec,
repo project): refusal per key at its own path with its prescription,
the `--visibility` and `engines.protocol` pointers, a `publisher` /
`isStarter` control, `@ts-expect-error` tsc pins, the ADR-0087
registration (five rows, one D3 entry, no D2 conversion), and a
tree-scoped walk of every `objectstack.manifest.json` under `packages/`
and `examples/` (at least 4 found, none declaring a retired key). It is
listed in `vitest.repo-tests.json` and is a `heldBy` witness in
`scripts/cross-package-test-inputs.mjs`. `check:template-manifests`'
self-test base drops the retired keys and gains a RED `specVersion`
fixture. Spec, CLI and create-objectstack fixtures that still wrote the
keys are trimmed.
- **Docs.** Getting-started tree, upgrading guide (step 3 is now
`engines.protocol` only), marketplace handbook and CLI reference. The
`content/docs/references/` page is regenerated, not hand-edited.
- **Changeset.** `@objectstack/spec` minor, `@objectstack/cli` minor,
`create-objectstack` patch, with both declaration lines, the BREAKING
banner, the FROM → TO list and the adr-0087 marker.
## Why
ADR-0049 enforce-or-remove. Measured on `origin/main` 115a43a (per-key
table on #31035): no reader of the file's `name`, `specVersion`,
`skills` or `scaffold` exists in the CLI, create-objectstack or hotcrm;
create-objectstack wrote `name` and never read it back, the protocol
check reads the artifact's `engines.protocol`, and the skills install is
the whole catalog. `os package publish` read `visibility` only to warn
that it ignores it.
## Verification
All runs on head `4f2f3c85` in a dedicated worktree, base `origin/main`
`115a43ad`, except where the rework block below says `5da9dd3c`.
**Rework on `5da9dd3c`** (contract-review should-fix, commits `073cd355`
+ `5da9dd3c`): create-objectstack `vitest run` Test Files 25 passed
(25), Tests 374 passed (374), `pnpm typecheck` :: exit 0;
`dispatch-gates --commands` 136 derived, 136 run, 0 NOT-MEASURED, all
exit 0 (record
`/mnt/project-files/spec-seat-1/r2026-11-06/out/31035-gates-ran-5da9dd3c.list`).
Ablations restored after each: the call site back to `delete m.name` → 1
red; dropping `category` from the list → 2 red; `specVersion` added to
connector-github's manifest → `check:template-manifests` exit 1.
<details><summary>Tests</summary>
- `pnpm --filter @objectstack/spec test` (local project): Test Files 820
passed (820), Tests 25908 passed, 1 todo
- `pnpm --filter @objectstack/spec test:repo` (repo project, which now
carries the new pin): Test Files 91 passed (91), Tests 1551 passed
(1551)
- `pnpm --filter @objectstack/spec check:test-typecheck` :: exit 0;
`check:generated` :: exit 0 after a declaration build
- create-objectstack `vitest run`: Test Files 24 passed (24), Tests 369
passed (369); `pnpm typecheck` :: exit 0
- `@objectstack/cli` unit project: Test Files 396 passed (5 of them
re-run after a declaration build; their first local run was red on a
dts-less build, not on the diff), `pnpm typecheck` :: exit 0
- `packages/apps/connector-{docusign,github,stripe}` `pnpm test`
(`objectstack validate && vitest run`): 28, 14 and 20 tests passed
- `node scripts/sync-template-versions.mjs --self-test` :: exit 0, 44
assertions
The CLI, create-objectstack and connector runs are on `58b292e7`;
`4f2f3c85` only adds the new test's path to
`packages/spec/vitest.repo-tests.json`.
</details>
<details><summary>Ablations</summary>
Through `scripts/ablation-replace.mjs`, each restored to the committed
blob afterwards:
- Visibility refusal guard in `publish.ts` disabled (`if (false && …)`):
1 test red (`the retired visibility › refuses …`); restored, green.
- `specVersion` tombstone swapped back to `z.string().optional()`: 2
tests red (refusal at its own path; the `engines.protocol`
prescription); restored, green.
</details>
<details><summary>Derived gates</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 134 families for the 41-path change
set; all 134 ran with exit 0. `--ran` reconciliation: 134 derived, 134
run, 0 NOT-MEASURED, 0 UNRUN. One finding on the first pass, fixed in
`4f2f3c85`: `check:cross-package-test-inputs` asked for the new
tree-walking test to be listed in `vitest.repo-tests.json`. Four first
runs answered exit 3 (prerequisite, nothing measured) and were re-run
green after the prerequisite: `check-plugin-teardown-shape --self-test`
(pinned fixture commit fetched), `check:skill-examples`,
`check:dual-build-cjs-loads` and `check:i18n-coverage` (declaration
build of `./packages/*` and `./packages/*/*`). `check-platform-checklist
--changed-from origin/main` :: exit 0 (no anchored file in the change
set). Record:
`/mnt/project-files/spec-seat-1/r2026-11-06/out/31035-gates-ran-4f2f3c85.list`.
</details>
Dogfood: full battery on `4f2f3c85` (`pnpm --filter @objectstack/dogfood
test`, no shard, closure built first, under the verify lock): Test Files
429 passed, 3 skipped (432); Tests 3569 passed, 41 skipped (3610); lock
VERDICT command-exit 0.
## Acceptance notes
- **`publisher` and `isStarter` are excluded**, pending their own
decision card: hotcrm's
`scripts/lib/marketplace-listing.mjs#packageUpsertBody` sends both from
its manifest in service mode, so their fate is a maintainer decision.
The control case in the new test holds that this PR did not take them.
- **Known downstream follow-up (hotcrm carrier, next platform bump, same
carrier as `category`).** hotcrm's `objectstack.manifest.json` still
writes `name`, `specVersion` and `skills`, and its
`test/docs-declared-versions.test.ts` and
`test/marketplace-listing.test.ts` parse or stamp them; both go red on
the first hotcrm bump to a spec carrying this change.
- **Design choice the seat may strike:** the four inert keys only warn
in `os package publish` (every project scaffolded from the blank
template before this release carries them); only `visibility` refuses.
- `check:template-manifests` now walks create-objectstack's templates
and `packages/apps/*` (a zero-file guard per root; 4 manifests parsed),
so the three connector manifests are gated by `check:generated` too. The
new test's tree-scoped walk also covers them and is registered as a
`heldBy` witness in `scripts/cross-package-test-inputs.mjs`.
- `.github/workflows/release.yml` still has a comment mentioning the
manifest stamp. It is a governed file, so it is left for a maintainer
edit; nothing executes it.
- The Claim said `Metadata-protocol: none`; a tombstone is `narrowed`,
declared here per the seat's ruling.
- The harness assignee / reviewer step is skipped: the PR is opened
through the relay as a draft, and the seat lands it.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes (CI-owned).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L9qibz5AiZzgut2WFyXVqW
<!-- signed: domain:spec#1 · os-tesla · session_01L9qibzzqHZdAVqgBAvxXKB
-->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 5210acf commit a1afbb9
44 files changed
Lines changed: 750 additions & 288 deletions
File tree
- .changeset
- content/docs
- deployment
- getting-started
- references/marketplace
- docs/audits/2026-07-unknown-key-strictness-ledger.counts
- packages
- apps
- connector-docusign
- connector-github
- connector-stripe
- cli
- src/commands/package
- test
- create-objectstack
- src
- templates/blank
- spec
- authorable-surface
- liveness
- state-counts
- scripts
- src
- marketplace
- migrations
- entries
- retired-keys
- semantic
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3307 | 3307 | | |
3308 | 3308 | | |
3309 | 3309 | | |
3310 | | - | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
3311 | 3313 | | |
3312 | 3314 | | |
3313 | 3315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| |||
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| |||
261 | 265 | | |
262 | 266 | | |
263 | 267 | | |
264 | | - | |
265 | | - | |
| 268 | + | |
| 269 | + | |
266 | 270 | | |
267 | 271 | | |
268 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
| |||
0 commit comments