Repository navigation
Commit 327391c
fix(lint): a liveness finding's fix text never comes from the ledger note, for any row class (#21169)
Fixes #21096
Clause-②: no
## What
`checkItem` in `packages/lint/src/lint-liveness-properties.ts` now
builds the fix text as `entry.authorHint ?? defaultHint`. The row's
ledger `note` is never author-facing, for every row class (opted-in
`authorWarn`, `experimental`, `dead`, `live-elsewhere`, `planned`). The
now-unused `isVerdictTriggered` helper and the comments describing the
old split are removed. `describe()` already carries a default hint for
all four verdicts a finding can carry (`experimental`, `planned`,
`dead`, `live-elsewhere`), so no prose was invented. A `live` row with
`authorWarn` still throws the integrity sentinel, unchanged.
No ledger row under `packages/spec/liveness/**` is edited: this is the
structural direction from triage, not per-row `authorHint` discipline.
## Measured end to end
`os lint --json` on `examples/app-showcase` (built from this tree,
before and after rebuilding `@objectstack/lint`), the two
`liveness-planned-property` findings, `fix` field:
- Before, both findings: "[ADR-0090 D11] P1 lands the SPEC SHAPE only
(validated at authoring that the external dial is no wider than the
internal one; ...) ... tracked on #2696. `planned` + authorWarn per
enforce-or-mark ... Re-verified 2026-07-30: ..." (about 700 characters
of maintainer prose, one tracker id).
- After, both findings: "Keep it — a consumer is being built against
this property; it has no runtime effect yet."
The two `liveness-dead-property` findings on `showcase_contributor` are
unchanged ("Remove it — it is declared in the spec but not consumed at
runtime."). Exit code 0 before and after.
## Tests (`lint-liveness-properties.test.ts`)
- The real-ledger `object.externalSharingModel` pin now asserts the
planned default hint, no `#` followed by digits, and that the row's note
text is absent (with an anti-vacuity guard that the row is still
opted-in, has no `authorHint` and a note with a tracker id).
- New real-ledger pin over every shipped opted-in and `experimental`
row: a row with an `authorHint` prints it exactly (control); a row
without one prints neither its note nor a tracker id.
- New synthetic pin: authorHint wins, otherwise the verdict default,
never the note, for `dead`, `live-elsewhere`, `planned` and
`experimental`, with and without `authorWarn`.
- Two #21092 pins that encoded the old "opted-in rows show the note"
behavior are rewritten.
Results: `pnpm --filter @objectstack/lint test` 118 files / 5486 tests
pass; the liveness file alone 93 pass; `pnpm --filter @objectstack/lint
typecheck` green.
Ablation (one-line revert to `entry.authorHint ?? entry.note ??
defaultHint`, through `scripts/ablation-replace.mjs`, anchor hit 1 time,
blob moved, restore verified byte-identical to HEAD): 6 tests go red
(the two real-ledger pins, the two synthetic pins, the live-elsewhere
precedence pin, the dead RLS end-to-end pin); 87 stay green. Restored;
`git diff HEAD` empty.
## Other sites where a ledger note could reach an author
None found in `packages/lint/src` or `packages/cli/src` besides this
expression. The other `.note` reads in `validate-react-page-props.ts`
are deprecation records, not ledger rows. Nothing else reads the
ledger's `note` as author text.
## Gates
`node scripts/pm/dispatch-gates.mjs --commands` derived 60 families;
each was run and recorded with its exit code, then reconciled with
`--ran`: 59 exit 0, 1 NOT MEASURED (`check:dual-build-cjs-loads`, exit
3, PREREQUISITE NOT MET: eight unrelated packages have no `dist/` in
this worktree; nothing was measured, and the diff touches no `exports`
or build output). CI owns the rest.
## Coordination
#21135 (the liveness README) states the same model. It has no open PR
and no branch at this time; whichever lands second keeps the two
consistent. This PR does not touch the README.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent e35c40a commit 327391c
3 files changed
Lines changed: 73 additions & 54 deletions
File tree
- .changeset
- packages/lint/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1138 | 1138 | | |
1139 | 1139 | | |
1140 | 1140 | | |
1141 | | - | |
| 1141 | + | |
1142 | 1142 | | |
1143 | 1143 | | |
1144 | 1144 | | |
1145 | 1145 | | |
1146 | 1146 | | |
1147 | | - | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
1148 | 1158 | | |
1149 | 1159 | | |
1150 | 1160 | | |
| |||
1218 | 1228 | | |
1219 | 1229 | | |
1220 | 1230 | | |
1221 | | - | |
| 1231 | + | |
1222 | 1232 | | |
1223 | 1233 | | |
1224 | 1234 | | |
1225 | | - | |
| 1235 | + | |
1226 | 1236 | | |
1227 | 1237 | | |
1228 | 1238 | | |
| |||
1714 | 1724 | | |
1715 | 1725 | | |
1716 | 1726 | | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
1720 | 1731 | | |
1721 | 1732 | | |
1722 | 1733 | | |
| |||
1774 | 1785 | | |
1775 | 1786 | | |
1776 | 1787 | | |
1777 | | - | |
| 1788 | + | |
1778 | 1789 | | |
1779 | | - | |
1780 | | - | |
1781 | | - | |
| 1790 | + | |
| 1791 | + | |
1782 | 1792 | | |
1783 | 1793 | | |
1784 | | - | |
1785 | | - | |
1786 | | - | |
1787 | | - | |
1788 | | - | |
1789 | | - | |
1790 | | - | |
1791 | | - | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
1792 | 1810 | | |
1793 | 1811 | | |
1794 | 1812 | | |
1795 | | - | |
| 1813 | + | |
1796 | 1814 | | |
1797 | 1815 | | |
1798 | 1816 | | |
1799 | 1817 | | |
1800 | | - | |
1801 | | - | |
1802 | | - | |
1803 | | - | |
1804 | | - | |
1805 | | - | |
1806 | | - | |
1807 | | - | |
1808 | | - | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
1809 | 1838 | | |
1810 | 1839 | | |
1811 | 1840 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
176 | 175 | | |
177 | 176 | | |
178 | 177 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | 178 | | |
198 | 179 | | |
199 | 180 | | |
| |||
226 | 207 | | |
227 | 208 | | |
228 | 209 | | |
229 | | - | |
230 | | - | |
| 210 | + | |
| 211 | + | |
231 | 212 | | |
232 | 213 | | |
233 | 214 | | |
| |||
424 | 405 | | |
425 | 406 | | |
426 | 407 | | |
427 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
428 | 411 | | |
429 | 412 | | |
430 | 413 | | |
| |||
0 commit comments