Repository navigation
Commit 51297e9
spec/kernel: carve the package-registry persistence out of
Fixes #18053
Clause-②: yes
Director ruling `5650202813` on #17676 (decision batch #125 item 2,
maintainer verbatim 「同意」), **item 1 — the spec-constant half**. The
runtime half (items 2, 3, 5) stays on #17676 with the `domain:engine`
lane. ⛔ The ruling's direction is not re-opened here; the one judgment
this card carries is the NAME, which the ruling deliberately declines to
give.
## What changed
Three edits in `packages/spec/src/kernel/platform-capabilities.ts`, plus
the pins that read it.
| constant | before | after |
|---|---|---|
| `PLATFORM_CAPABILITY_TOKENS` | 28 tokens | **29** — `package-registry`
added after `marketplace`; none removed; the relative order of all 28
unchanged |
| `PLATFORM_ALWAYS_ON_CAPABILITIES` | 10 entries | **11** —
`package-registry` appended at the tail; none removed; the relative
order of all 10 unchanged |
| `PLATFORM_CAPABILITY_PROVIDERS` | 1:1 with the vocabulary | 1:1 still
— one row added: `package-registry` = `@objectstack/service-package`,
`open` edition |
The full before/after item lists are in the report comment on #18053.
## The name — and the candidates it beat
The comparison set, every token in the vocabulary today: `ai`,
`ai-studio`, `i18n`, `ui`, `auth`, `automation`, `analytics`, `audit`,
`cache`, `storage`, `queue`, `job`, `messaging`, `triggers`, `realtime`,
`mcp`, `marketplace`, `email`, `sms`, `sharing`, `pinyin-search`,
`reports`, `approvals`, `settings`, `webhooks`, `hierarchy-security`,
`ai-seat`, `governance`.
**Chosen: `package-registry`.** Four reasons, in order of weight:
1. ⭐ **It is not a new word in this tree — the spec kernel already
spells it.** `packages/spec/src/kernel/package-registry.zod.ts` sits in
the same directory and opens "# Package Registry Protocol — Defines the
runtime state and lifecycle operations for installed packages"; it
exports `InstalledPackageSchema` and the installed-package lifecycle
types, and its own prose calls a package row "the 'row' in the
installed-packages table". The token now names the capability that
PERSISTS exactly the protocol that module DEFINES, at the same spelling,
in the same kernel. Nothing has to be learned to read it.
2. **Same naming grammar as the set.** Every token is lower-case
kebab-case, and every compound one is `QUALIFIER-NOUN` where the noun is
the thing and the qualifier narrows it: `ai-studio`, `ai-seat`,
`pinyin-search`, `hierarchy-security`. `package-registry` is that shape
exactly.
3. **It says what the thing IS** — the registry of installed packages:
the `sys_packages` container and the boot hydration that replays it —
rather than what a deployment might additionally sell on top of it.
4. **It is not repo-private.** "Package registry" is the industry term
for this exact object; ADR-0016's own Architecture Alignment list cites
"npm: Package registry with install/uninstall/version management", and
`@objectstack/service-package` already says it in caller-visible prose
("The package registry could not store this package").
Rejected, and why:
- **`marketplace`** — forbidden by the ruling, and the reason the ruling
exists: a token advertising a store that is not there.
- **`packages`** — grammatical (the set has plural tokens: `reports`,
`approvals`, `webhooks`, `triggers`), but in this tree "package" means
both an npm workspace package and a metadata package, and a `requires:
['packages']` line inside a monorepo is exactly the ambiguity the
vocabulary header exists to prevent. It also names the noun, not the
service.
- **`package-store`** — "store" is the connotation the ruling is
REMOVING; re-importing it under a fresh spelling defeats the split.
- **`package-state`** — collides head-on with
`packages/runtime/src/package-state-store.ts`, which is the OTHER medium
(the operator's disabled-id set under the ObjectStack home directory).
Item 4 is about those two media not being confused; a token named
`package-state` would make that confusion permanent.
- **`package-persistence`** — names a mechanism, not a service domain.
No token in the set names an implementation property; `storage` is the
service, not "file-persistence".
- **`sys-packages`** — the table name. A repo-private abbreviation,
which the card forbids by name.
- **`registry`** alone — this tree already has three (the npm registry,
ObjectQL's `SchemaRegistry`, the metadata type registry).
- **`package-catalog` / `catalog`** — that IS the half `marketplace`
keeps.
## Question 1 — does the split move the length, or the always-on
boundary derivation?
Measured before and after, not assumed.
- **Length: +1 on both constants** (28 to 29 tokens, 10 to 11 slate
entries). Nothing is removed, so `requires: ['marketplace']` keeps
meaning today what it meant yesterday; this widens the accept set and
narrows nothing.
- **The boundary derivation does NOT move.** Since `68e8b4b53c` the
boundary is the rule "every entry that is not a bind target is mounted
after ALL of them", with `BIND_TARGETS = queue / job / cache /
settings`. `package-registry` is not a bind target: nothing on the slate
binds into it during `kernel:ready`, and its one hard requirement is the
ObjectQL engine, which is not a capability token. So it joins the TAIL,
exactly as the declaration's own comment instructs, and the derived rule
covers it on arrival with no new target and no new prefix.
- **What DID move is the one assertion that enumerates the tail
literally** — the falsifiability control in
`platform-capabilities.test.ts`, which pins `orderingViolations(slate +
a new bind target)`. That assertion went red on the first edit and is
updated from the rule rather than around it. That is the "ordering
contract moves with it" half of the card, and it is this PR's first red
(Evidence below).
- **Media: unchanged at two.** See Item 4.
## Question 2 — what does the CLI's
`serve-capability-vocabulary.test.ts` actually follow?
Read, not copied from the card's sentence. That file reads the CONSTANTS
(`PLATFORM_CAPABILITY_TOKENS`, `PLATFORM_CAPABILITY_PROVIDERS`,
`PLATFORM_PLUGIN_WIRED_RUNTIMES`) together with
`Serve.CAPABILITY_PROVIDERS` / `Serve.CAPABILITY_TO_TIER` /
`Serve.ALWAYS_ON_CAPABILITIES`, and asserts **set relations and package
equality**. It enumerates no slate ORDER anywhere.
- So it follows **by derivation, not by literal**: the only case in it
that a carve-out could turn red is the 1:1 pin *"classifies every
vocabulary token, and adds none outside it"* — a token added without a
provider row fails there, in both directions. With the row present the
file was already green before I edited it (measured).
- Its case *"open-edition service tokens name the SAME package as serve
CAPABILITY_PROVIDERS"* iterates **serve's** keys, so it never asks the
reverse question. That asymmetry is precisely what leaves the gap in the
next section invisible to it.
- What this PR adds there is the ruling stated through the array `serve`
really appends: `Serve.ALWAYS_ON_CAPABILITIES` carries
`package-registry` and does **not** carry `marketplace`. Both halves are
asserted, because a one-sided pin would stay green on a slate that
force-mounted the catalogue half too — the outcome the ruling refused.
## marketplace into an always-on core capability (#18694)1 parent 72dd95f commit 51297e9
4 files changed
Lines changed: 142 additions & 1 deletion
File tree
- .changeset
- packages
- cli/test
- spec/src/kernel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
45 | 73 | | |
46 | 74 | | |
47 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
| 58 | + | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
| |||
155 | 163 | | |
156 | 164 | | |
157 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
158 | 180 | | |
159 | 181 | | |
160 | 182 | | |
| |||
313 | 335 | | |
314 | 336 | | |
315 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
316 | 356 | | |
317 | 357 | | |
318 | 358 | | |
| |||
0 commit comments