Commit 17965df
feat(spec): publish the
Fixes #18500
Clause-②: no
PR #18486 landed the `dimensionless` schema marker with its **gate
reader** and no **docs half**. Ruling B on #14478 put both halves in the
mechanism, verbatim:
> declared ON THE SCHEMA, never in a gate ledger … marker the gate
honours **and the docs generator publishes**
The sibling marker `externalVocabulary` has had its renderer in
`packages/spec/scripts/lib/schema-section.ts` since #15626.
`dimensionless` had none, so a key marked `dimensionless` would carry an
in-schema declaration that the published reference page says nothing
about.
The gate's own header already asserts the half that did not exist.
`check-duration-unit-keys.ts`, exemption class 4: *"Same mechanism as
class 2, same literal-only validation, **same visibility**."* Class 2 is
`externalVocabulary`, and its visibility **is** that renderer. This PR
is what makes that sentence true.
## What landed
- `dimensionlessNote(prop)` in
`packages/spec/scripts/lib/schema-section.ts`, beside
`externalVocabularyNote(prop)`, appended to the same description cell
rather than given a column.
- Six pins in `packages/spec/scripts/schema-section.test.ts`, mirroring
the sibling's block one-for-one.
A key described `Failures seen in the last 5 minutes` and carrying
`.meta({ dimensionless: 'failed attempts' })` now publishes:
```
Failures seen in the last 5 minutes (dimensionless — counts failed attempts)
```
### Why that wording
The card suggested "counts `what`" and wrote "⛔ no ruling implied", so
the shape was read off the declaration instead of taken from the
suggestion. The marker's declared value is a **non-empty string literal
naming what the number counts** — `check-duration-unit-keys.ts` refuses
an empty string and a computed value, because an unverifiable claim
exempts nothing — so the declared value is printed verbatim, and the
same non-empty-string-literal test decides whether anything is printed
at all. The word `dimensionless` is kept in front of it for the one
thing the value alone does not state: the exemption's claim is that the
number has **no unit**, which is exactly the ambiguity a reader has when
the prose beside a naked number names a time unit. It also keeps one
vocabulary across the marker name, the census line the gate prints, and
the ruling.
## The three questions the dispatch asked
**1. Which gate can actually go red on this change?**
`packages/spec/scripts/schema-section.test.ts`, run by `pnpm --filter
@objectstack/spec test` (vitest project `local`; the file is not listed
in `vitest.repo-tests.json`) — in CI, `Test Core`. `check:docs` and
`check:generated` structurally cannot move: the live population is **0**
keys marked, so no reference page changes and `check:docs` is green both
before and after. Established by ablation, not assumed — below.
**2. Does the marker ride into the published JSON Schema via
`z.toJSONSchema`?** — **Yes.**
- Direct, on the zod this workspace installs (4.4.3): `z.number().meta({
dimensionless: 'failed attempts' })` emits `"dimensionless": "failed
attempts"` on the node, unchanged. A fabricated marker name rides
identically, so the channel is generic rather than per-key.
- On the real generated tree, after `pnpm --filter @objectstack/spec
gen:schema`: 18 files under `packages/spec/json-schema/` carry
`"externalVocabulary"` (LIT control), **0** carry `"dimensionless"`,
**0** carry the fabricated name (DARK controls).
`packages/spec/json-schema/` has 0 tracked files, so this cannot be read
from git — it was built and read.
⇒ **the docs generator is not the only publisher.** `json-schema` is in
`packages/spec/package.json` `files[]`, so a marked key would also ship
inside the npm tarball. Nothing is marked by this PR, so nothing moves
today — but the *second* publisher is a fact the first card to mark a
key inherits.
**3. What should it print?** — answered from the declared value shape,
above.
## Clause-② and the changeset
Declared `no`, unchanged — the dispatch reserved that line, and question
2's answer does not move it for **this** diff: no key is marked, so no
published byte changes.
`skip-changeset`, measured rather than assumed:
- `packages/spec/package.json` `files[]` = `dist`, `json-schema`,
`liveness`, `prompts`, `llms.txt`, `README.md`, `src/**/*.zod.ts`,
`CHANGELOG.md`, `api-surface`, `spec-changes.json`. `scripts/**` is not
among them.
- `dimensionlessNote` after the build: **0** hits in every one of those
paths. Positive control on the same greps, `ObjectSchema`: `api-surface`
2, `llms.txt` 1, `README.md` 1, `src/**/*.zod.ts` 14.
- `dist` cannot carry it either way: every `tsup` entry in
`packages/spec/tsup.config.ts` is under `src/`, so `scripts/**` is not
an entry.
- `check:docs` green ⇒ **0** reference pages move.
dimensionless marker on the reference page (#18684)1 parent 1bc22b3 commit 17965df
2 files changed
Lines changed: 154 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
262 | 298 | | |
263 | 299 | | |
264 | 300 | | |
| |||
465 | 501 | | |
466 | 502 | | |
467 | 503 | | |
468 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
469 | 507 | | |
470 | 508 | | |
471 | 509 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
0 commit comments