Repository navigation
Commit 39aa3f6
refactor(spec)!: retire the ragPipelines collection listings no stack can declare (#31456)
<!-- claude-projects-attribution: {"github_login":"marchtian"} -->
_Requested by **田騏** · [project
thread](https://claude.ai/code/project/chan_01VmuUhXU9SSUzqJYyXSmYSi?thread=cmsg_01VmuUhXU9SSUzqJYyXSmYSiQQmi2TjBrbnC33qdD1Dhr1)_
Fixes #31380
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — no skill or doc page names `ragPipelines` or
`rag_pipeline` (`git grep` over `skills/` and `content/docs/` at the
head: zero hits)
## 维护者速读
- **改了什么:** 把 `ragPipelines` 从四张登记表里撤掉(spec 的复数→单数映射、引擎的集合表、metadata
插件的产物映射、runtime 的应用载荷探针),连带撤掉门禁里给它开的四行豁免。`rag_pipeline` 因此退出 `/meta` 的
URL 拼写契约:会开新命名空间的写入改为被拒(400,和 theme 退役同形;部署的 sys_metadata 里已有
rag_pipeline 行时,写门的旧命名空间豁免仍接受写入,直到这些行删光),`/meta/types` 不再把它列为可创建。
- **为什么改:** `defineStack` 从来不接受
`ragPipelines`,任何作者都写不出这个集合,四张表却都把它当成一种元数据类型,读到这些表的人或 AI 会以为平台有「RAG
管道」集合。按分诊裁定「零拉动 ⇒ 退役」。
- **风险与回滚:** 唯一的外部可见变化是 `PUT /meta/rag_pipeline/...` 在没有旧行的部署上从「存任意
JSON」变成拒绝(已有旧行的部署按旧命名空间豁免继续接受,删光后才拒);objectstack、ui、hotcrm、gallery
里没有任何写入者,cloud 未测(座位落地前另核)。已存的旧行不改写,仍可读可删,但不再随包导出。回滚即 revert。
- **先看:**
`packages/spec/src/meta-spelling/manifest-collection-spelling.ts`(删行本身);`packages/spec/src/migrations/entries/semantic/18.meta-type-rag-pipeline-retired.ts`(给升级者的说明);`packages/qa/dogfood/test/package-export-type-read-failure.dogfood.test.ts`(样本改法)。
- **两分钟验证:** `node scripts/check-stack-collection-maps.mjs`,预期 `8
enumerations reconciled … (16 waiver rows …)`,豁免里不再有 `ragPipelines`。
- **需要你做的:** 无,席位落地。
## What changes
`ragPipelines` was listed as a metadata collection in four registries
while `ObjectStackDefinitionSchema` never declared the key, so
`defineStack` refused it and no stack could ever ship one. This retires
every listing (ADR-0049 enforce-or-remove, triage ruling 6717949516;
seat ruling in the card thread to retire the URL-contract entry with
it):
- **`@objectstack/spec`** — the `ragPipelines: 'rag_pipeline'` row
leaves `PLURAL_TO_SINGULAR` (so also `SINGULAR_TO_PLURAL` and the
regenerated `META_URL_TO_SINGULAR`). `rag_pipeline` leaves the `/meta`
URL-spelling contract exactly as `theme` did (commit 35ad101): `PUT
/meta/rag_pipeline/:name` now gets the unrecognised-type refusal (`400
INVALID_REQUEST`) instead of the no-schema branch that stored any JSON —
unless the deployment's `sys_metadata` already holds `rag_pipeline`
rows, in which case the write door's legacy-namespace exemption keeps
accepting writes until those rows are deleted — and `GET /meta/types`
stops advertising it as creatable. Upgraders get the D3 semantic entry
`meta-type-rag-pipeline-retired` plus a step-18 rationale fragment. No
`retiredKey()` tombstone (the key is on no schema) and no D2 conversion
(no stack source can hold it).
- **`@objectstack/objectql`** — out of `METADATA_ARRAY_KEYS`.
- **`@objectstack/metadata`** — out of `ARTIFACT_FIELD_TO_TYPE`.
- **`@objectstack/runtime`** — out of the `APP_CATEGORY_KEYS` probe.
- **`scripts/check-stack-collection-maps.mjs`** — the four
`ragPipelines` waiver rows and the header note go; the gate now holds
every map to the schema with no exception for it, which is the tree-wide
guard against the row coming back (reverse-verified below).
- **`ObjectStackDefinitionSchema`** — a `guidance` entry prescribes the
never-declared `ragPipelines` key.
- **Tests** — the specimens that used `rag_pipeline` move to a
still-present kind and keep their intent: the no-static-entry write
control in `objectql/protocol-meta.test.ts` is now `connector`;
`rag_pipeline` joins `theme` on the refused/withdrawn side in
`metadata-url-spelling.test.ts`,
`protocol.unrecognised-meta-type.test.ts`,
`protocol.meta-types-mint-door-agreement.test.ts` and a new `CHANGED
BEHAVIOUR` case in `protocol-meta.test.ts`.
- **Dogfood** — `package-export-type-read-failure` used `rag_pipeline`
as the showcase's one exportable type its live vocabulary does not list.
After this change no such type exists on the showcase (measured: every
exportable plural folds to a listed type), so case 4 now drops
`connector` from `getMetaTypes` for one leg beside the failed read, and
asserts the real vocabulary does list it.
## Acceptance notes
- **cloud producer census: NOT MEASURED** (repo not readable from this
session). objectstack, `ui/`, hotcrm and gallery have no writer of
`rag_pipeline`. The seat checks cloud before landing.
- **Export door:** `GET /packages/:id/export` and `GET /packages/export`
build their collections from `PLURAL_TO_SINGULAR`, so a legacy
`rag_pipeline` row a deployment wrote through the old `/meta` door is no
longer exported (it stays readable and deletable through `/meta`). A
customization-pair install refuses an older export carrying a non-empty
`ragPipelines` array, naming the key; an empty one is skipped.
- **Stack prescription:** `ObjectStackDefinitionSchema`'s `guidance` now
answers `ragPipelines` with a prescription instead of the generic
unrecognized-key fallback (pinned in `stack-top-level-strict.test.ts`).
- **Two edited metadata-protocol suites** gained the module-top `import
'@objectstack/lint'` that `check:test-source-alias` asks of an edited
test whose source reaches that dynamic import.
- Out of bounds and unchanged: `docs/adr/0048-…` still says
`rag_pipeline` "cannot be declared through `defineStack`", which stays
true; CHANGELOGs are history.
## Verification
All readings on head `0f4f7ccc` (the head after it only marks the
changeset summary breaking) (branch merged with `origin/main` at
`ae816c40b`; full `pnpm build` green after the merge).
- **Unit suites** (`pnpm --filter PKG test` / `typecheck`, all exit 0):
spec 822 files / 25980 tests; metadata-protocol 326 files / 22562 tests;
objectql 569 / 11547; metadata 70 / 972; runtime 555 / 8957. Touched
files: `eslint --no-inline-config` exit 0.
- **Full dogfood battery** (`pnpm --filter @objectstack/dogfood test`,
`(narrowing)` arm): exit 0 — Test Files 438 passed, 3 skipped (441);
Tests 3622 passed, 41 skipped.
- **Derived gates** (`node scripts/pm/dispatch-gates.mjs --commands`,
118 families, each `CMD :: exit N` recorded before any pipe): 117 exit
0; `node scripts/check-plugin-teardown-shape.mjs --self-test` exit 3 =
NOT MEASURED (its positive control is a pinned commit a shallow clone
cannot reach; CI runs it). `--ran` reconciliation: `118 derived
famil(ies) accounted for — 117 run, 1 NOT-MEASURED`.
- **The waiver-free gate**: `node
scripts/check-stack-collection-maps.mjs` → `8 enumerations reconciled
against 35 declared collections (16 waiver rows, each with a reason)`.
Reverse verification: putting `'ragPipelines'` back into
`APP_CATEGORY_KEYS` turns it red (`APP_CATEGORY_KEYS enumerates
ragPipelines, which ObjectStackDefinitionSchema does not declare`),
restored by byte copy.
- **Before/after census** (`git grep -n -i 'ragPipelines\|rag_pipeline'`
outside CHANGELOGs and `docs/adr`): before, live rows in four registries
plus four gate waivers; after, only code comments, the tests that pin
the refusal, the `LIVE_TYPES` fixture of the mint-door suite (a legacy
live set, like `theme`), the stack `guidance` prescription and the
migration entries.
- **Fable review** (spec diff, independent agent): PASS, no must-fix;
both should-fixes taken (the stack `guidance` prescription; the
export-door consequence stated in the changeset and the semantic entry);
incremental re-review PASS.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- signed: domain:spec#4 · marchtian ·
session_017ihL2eAG5J8aqAyPZif4BJ -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent c6c2426 commit 39aa3f6
26 files changed
Lines changed: 312 additions & 92 deletions
File tree
- .changeset
- packages
- cli/test
- metadata-protocol/src
- metadata/src
- objectql/src
- qa/dogfood/test
- runtime/src
- spec/src
- kernel
- meta-spelling
- migrations
- entries/semantic
- scripts
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
703 | 704 | | |
704 | 705 | | |
705 | 706 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
| |||
191 | 198 | | |
192 | 199 | | |
193 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
194 | 212 | | |
195 | 213 | | |
196 | 214 | | |
| |||
261 | 279 | | |
262 | 280 | | |
263 | 281 | | |
264 | | - | |
| 282 | + | |
265 | 283 | | |
266 | 284 | | |
267 | 285 | | |
268 | 286 | | |
269 | 287 | | |
270 | | - | |
| 288 | + | |
| 289 | + | |
271 | 290 | | |
272 | 291 | | |
273 | 292 | | |
274 | | - | |
| 293 | + | |
275 | 294 | | |
276 | 295 | | |
277 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
180 | 185 | | |
181 | 186 | | |
182 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
183 | 200 | | |
184 | 201 | | |
185 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
198 | 201 | | |
199 | 202 | | |
200 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | 177 | | |
179 | 178 | | |
180 | 179 | | |
| |||
224 | 223 | | |
225 | 224 | | |
226 | 225 | | |
| 226 | + | |
| 227 | + | |
227 | 228 | | |
228 | | - | |
| 229 | + | |
229 | 230 | | |
230 | 231 | | |
231 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4082 | 4082 | | |
4083 | 4083 | | |
4084 | 4084 | | |
4085 | | - | |
4086 | | - | |
| 4085 | + | |
| 4086 | + | |
| 4087 | + | |
4087 | 4088 | | |
4088 | 4089 | | |
4089 | 4090 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
0 commit comments