Skip to content

Commit b971924

Browse files
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

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@objectstack/spec": patch
3+
---
4+
5+
`liveness/README.md` — the `authorWarn` section's pointer to the lint that emits author warnings named a path that does not exist; it now names the module's real home, `packages/lint/src/lint-liveness-properties.ts` (#19269).
6+
7+
The ledgers and this README ship inside this package (`files[]` includes `liveness`), so the pointer an upgrading reader follows is this one. It read `packages/cli/src/utils/lint-liveness-properties.ts`, measured at zero in a full tree listing, while the module it describes — the one that reads these ledgers, emits the advisory warning and never fails the build — sits in `packages/lint/src/`. Nothing else moves: no schema, no export, no verdict, no ledger entry, no runtime behaviour.
8+
9+
- **This grid has no mechanical reader, which is why it rotted quietly.** `check:liveness` resolves the `evidence` paths inside ledger *entries*; a path written in README prose is checked by nobody, so the pointer stayed wrong through the move with every gate green. The lit control is the rule registration itself: `packages/lint/src/authoring-rules.ts` carries `source: 'packages/lint/src/lint-liveness-properties.ts'` as data, and that is the path this sentence now agrees with.
10+
- **The second pointer in this file is deliberately left alone.** The closing paragraph of the type table says "see lint-liveness-properties.ts" — a bare filename with no directory. It is not stale (the basename resolves uniquely in the tree), and a bare filename carries no directory to rot; giving it one would newly expose it to exactly the failure this change repairs. The full path is stated once, here, where a reader who needs the directory gets it.

‎packages/spec/liveness/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ deleting or renaming a proof re-runs this check and the dangling reference is ca
545545
## Author warnings — closing the loop (`authorWarn`)
546546

547547
Classification is also fed back to the *author* at build time. The CLI `compile`
548-
lint (`packages/cli/src/utils/lint-liveness-properties.ts`) reads these ledgers and
548+
lint (`packages/lint/src/lint-liveness-properties.ts`) reads these ledgers and
549549
emits an advisory **warning** when an authored object/field sets a property that is
550550
misleading — "you set this expecting it to do something; at runtime it does nothing /
551551
isn't enforced" — with a corrective hint. Never fails the build.

0 commit comments

Comments
 (0)