Repository navigation
Commit 6156951
fix(docs-audit): a PARTIAL ledger read is a verdict, not a smaller number (#10501)
`parseLedgerSource` recognizes a route-ledger row through a single-quote-only
regex. The pre-existing broken-scan guard is `rowsParsed === 0`, so it catches
only the all-or-nothing case; a ledger where SOME rows are spelled in a quote
the recognizer declines parsed fine and reported a smaller population with no
verdict and exit 0.
Measured on a718ee3, respelling one row of `i18n-route-ledger.ts`:
- backtick-quoted `route:` -> 221 -> 220 client-bound rows, no verdict, exit 0
- backtick-quoted `client:` -> 221 -> 220, `rowsParsed` still 3, exit 0
- backtick-quoted `route:` in `rest-route-ledger.ts` -> clientRows still 221,
but `meta.getTypes` moved onto the server-only `GET /api/v1/docs`: the row
window is delimited by the same single-quote-only lead, so a declined row
does not close the previous row's window
The last case is why the verdict keys on the DECLINED SPELLING rather than on a
count shortfall - the count is blind to it.
`parseLedgerSource` now returns what it declined beside what it read, and
`bridgeCoverageFrom` turns any declined declaration (or any declared row value
it did not read) into a `brokenScan` verdict naming the file, the line and the
literal. Both halves of the fraction print on every run. The recognizer is
untouched: today's seven ledgers are wholly single-quoted (259 route, 221
client, delta 0), so no verdict can fire on this tree, and `--self-test` pins
the population at its old value so a silent widening fails there.
Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 359f595 commit 6156951
3 files changed
Lines changed: 297 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
212 | 218 | | |
213 | | - | |
| 219 | + | |
214 | 220 | | |
215 | 221 | | |
216 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
119 | 156 | | |
120 | 157 | | |
121 | 158 | | |
| |||
0 commit comments