Commit afe0195
fix(devx): the objectui pin guard tests walk completeness, not object presence (#9448)
`bump-objectui.sh` decided whether the pin range could be walked with
`git cat-file -e OLD_SHA` — "is the OLD endpoint present as an object". That
is a different question from "is the walk between the endpoints complete", and
the gap is measured rather than theoretical: on the bump that landed
`.changeset/console-82a94170c405.md` the test PASSED against a history
truncated at commit 110 of 191, so the degraded path never fired and the digest
exited 0 having credited 36 of its 119 entries to one commit that adds exactly
one changeset.
A truncated history is worse than an absent endpoint precisely because it
ANSWERS: git presents its oldest visible commit as parentless, diffs it against
the empty tree, and reports every `.changeset/*.md` in that commit's tree as
added by it. The dedup in `collectAddedChangesets` then hands it whatever no
newer commit claimed, so one commit absorbs a batch.
`findRangeTruncation` tests the harm directly — a parentless commit INSIDE the
range — which catches a `--depth` clone, a hand-written `.git/shallow`, a
graft, a `git replace` and unrelated histories without naming any of them, and
which does not fire on a shallow clone whose boundary sits at or before `from`
(that range walks completely, and refusing it would be a false positive). It
lives in `classifyRange`, the single shared implementation, so
`objectui-range.mjs` cannot derive from a truncated walk either.
`bump-objectui.sh` now repairs the input before labelling a derivation of it:
`git fetch --unshallow` costs ~6s and ~4MB on objectui and takes the walk from
110 commits to the true 191, while a degraded console changeset becomes
permanent published CHANGELOG text. The fetch is additive, announced,
opt-out-able with OBJECTUI_NO_DEEPEN=1, and — measured — can exit 0 without
repairing anything, so the range is re-checked instead of the status trusted.
The arithmetic check the card sketched is NOT implemented, because it was
measured not to work: `git show --name-only` on the sink runs the same
empty-tree diff, so the credited set is a subset of the attributed set by
construction. It fires on neither known-bad run (36 credited vs 72 attributed;
12 vs 47) and cannot fire on any history. Pinned as a tautology in the
self-test so it is not reintroduced as a cheap backstop.
Claude-Session: https://claude.ai/code/session_01XqDQYVU5smx29ts9pAErja
Co-authored-by: Claude <noreply@anthropic.com>1 parent a132e14 commit afe0195
2 files changed
Lines changed: 494 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
| |||
135 | 142 | | |
136 | 143 | | |
137 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
138 | 166 | | |
139 | | - | |
140 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
141 | 213 | | |
142 | 214 | | |
143 | 215 | | |
| |||
169 | 241 | | |
170 | 242 | | |
171 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
172 | 254 | | |
173 | 255 | | |
174 | 256 | | |
| |||
0 commit comments