Repository navigation
Commit b971924
docs(spec): the liveness README's authorWarn pointer names the lint's real home (#19659)
Fixes #19269
Clause-②: no
`packages/spec/liveness/README.md` told the reader that the lint which
emits author warnings lives at
`packages/cli/src/utils/lint-liveness-properties.ts`. That path does not
exist. One line, repointed at the module's real home.
## Measured in this worktree, not carried from the card
Base `5ce3705`. The card's line numbers were re-derived **by text**,
because the file was touched by #19594 after the card was written:
```
probe : packages/cli/src/utils/lint-liveness-properties.ts
ls: cannot access ...: No such file or directory
LIT CONTROL (same listing, same corpus):
packages/lint/src/lint-liveness-properties.ts 35926 bytes
packages/lint/src/lint-liveness-properties.test.ts 83518 bytes
```
Both pointers still sit where the card and the dispatch put them —
`:548` (the stale full path) and `:948` (a bare filename) — so #19594
moved neither.
## Why `packages/lint/src/lint-liveness-properties.ts` is the right
referent
A path that exists is not automatically the one the sentence means. Four
readings say this one is:
- The module's own header describes exactly what `:548` describes: it
reads the `liveness/*.json` ledgers, opts in per entry via `authorWarn`,
emits an advisory **warning** with a hint, and "NEVER fails the build".
- The sentence at `:948` names `TYPE_COLLECTIONS`; that constant is
declared in this module, at `:485`.
- The rule registration carries the answer **as data**:
`packages/lint/src/authoring-rules.ts` registers `{ name:
'lintLivenessProperties', tier: 'advisory', source:
'packages/lint/src/lint-liveness-properties.ts' }`. The repointed prose
now agrees with a machine-readable field rather than with a second piece
of prose.
- The adjacent words "The CLI `compile` lint" stay true after the
repoint: `packages/cli/src/commands/compile.ts` imports
`runAuthoringRules` / `authoringRulesFor` from `@objectstack/lint` and
the rule declares `commands: ALL`, so `os compile` is still a door this
lint runs behind.
Nothing else in the sentence changed, and no ledger entry, verdict,
schema, export or runtime behaviour moved.
## Why the second pointer is deliberately NOT changed
`:948` reads "see lint-liveness-properties.ts" — a bare filename with no
directory. Leaving it is a decision, not an oversight:
- **It is not stale.** The basename resolves uniquely in the tree today
(the module plus its `.test.ts`), so a reader who follows it lands on
the module.
- **A bare filename has no directory to rot.** Giving it one would
convert a rot-proof pointer into a rot-prone one — manufacturing the
exact defect class this card exists to close, for a cosmetic gain.
- **The cost is asymmetric.** A wrong full path actively misleads (the
reader lands on nothing and may conclude the lint does not exist); a
bare filename costs one `git grep`. The durable form wins where the
defect class is this one.
- The full path is stated once, at `:548`, which is where a reader who
needs the directory gets it.
## Changeset: `patch`, measured rather than assumed
`liveness/` is in `@objectstack/spec`'s `files[]`, and the package is
published (not `private`, currently `17.4.0`), so this README ships
inside the npm tarball. Measured with `npm pack --dry-run --json` in
`packages/spec`:
- 277 files in the tarball; `liveness/README.md` **present**; 42
`liveness/*` entries
- negative controls on the same listing: no `scripts/` entry, no
`*.test.ts` entry
So the edited bytes are published bytes. `skip-changeset` would be
false, and a `patch` changeset is owed. Precedent on the same file: the
`#14640` changeset states the same fact in the same words ("The ledgers
ship inside this package (`files[]` includes `liveness`)").
## Verification
Gate families derived in this worktree with `node
scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack
--commands` over the real changed paths, then reconciled with `--ran`
carrying each command's exit code captured before any pipe.
- **57 derived, 53 run green, 4 NOT MEASURED, 0 UNRUN** at `5ac6291`.
- The 4 NOT MEASURED all exit **3** with their own `PREREQUISITE NOT
MET` line, which is "nothing was swept", not a finding:
`check:dts-closure`, `check:dual-build-cjs-loads`,
`check:lean-entry-closure`, `check:sourcemap-no-sources-content`. Each
reads built `dist/` across the workspace and needs a full `pnpm build`
first. This diff contains no TypeScript and no published bytes outside
one Markdown file, so it cannot move any of them; CI runs them on a
built tree.
- `check:plugin-teardown-shape --self-test` first exited 3 on a shallow
checkout ("cannot read the positive control at 621a487"). After `git
fetch --unshallow` it passes, 48 cases. Its PR-verdict run (no
`--self-test`) was green both times.
- The five roster gates whose allowlists sit under a directory this diff
is in were run rather than read as silence: `check-changeset-fixed`,
`check:spec-changes`, `check:authz-resolver`, `check:error-code-casing`,
`check:filter-alias-parity` — all exit 0.
- The one test file that reads this README,
`packages/spec/scripts/liveness/check-liveness.test.ts`: 64 tests pass.
- Control-byte self-scan over both changed files: no match.
- `pnpm lint` was narrowed, and the narrowing is measured rather than
claimed: eslint's own declared population is source extensions only
(`files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}']` and four
TypeScript-only globs; no Markdown glob), `--format json` over both
changed paths returns 2 entries, each "File ignored because no matching
configuration was supplied" with `errorCount: 0`, and the config enables
no type-aware linting (no `parserOptions.project`), so this diff cannot
move the verdict on any file it does not touch. Count of changed files
inside eslint's population: **0**. The repo-wide sweep is CI's.
## Acceptance notes
Noted, not filed, and deliberately not fixed here — the file surface for
this card is `packages/spec/liveness/README.md` and this observation is
larger than the repoint:
- **`:548` calls this "The CLI `compile` lint", which is now narrower
than the truth.** The same rule is also dispatched at the **runtime
publish door**: `packages/lint/src/runtime-gate.ts` bridges
`email_template` and `mapping` (group C of the ADR-0049 ruling) and,
since #19568, `datasource` — the three `allowRuntimeCreate: true` types
whose only author-facing door had run no authoring rule at all. So an
`authorWarn` entry today reaches authors through Studio/REST/MCP writes
as well as through `os compile`, and this section still describes only
the compile door. The repoint does not make that sentence false, so
widening it is out of scope for this PR; the successor the card names —
the next author of an `authorWarn` entry — is the same reader who would
be under-informed by it. Carrier: whoever next edits this section or
adds a `runtime-gate.ts` bridge row.
---
_Generated by [Claude
Code](https://claude.ai/code/session_013RDBh5DqXd2xnLwvHLgLFr)_
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: os-support-ai <318092878+os-support-ai@users.noreply.github.com>1 parent 106d4c8 commit b971924
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
548 | | - | |
| 548 | + | |
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| |||
0 commit comments