Repository navigation
Commit daecb2d
fix(core): graceful collision fallback + body-scoped pin seed (R1 review)
Addresses review on #1269 (Miguel P3 + Rames):
- mintHfId no longer throws on the pathological collision cap; it widens the id
with the dup counter instead, so a degenerate document can never crash the
whole parse call.
- Seed the `assigned` set from `body.querySelectorAll("[data-hf-id]")` (was the
whole document) to match the mint walk's scope — a stray head id can't bump a
body element off its hash.
- Document the 4-char id-space rationale in toHfId.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>1 parent af243a6 commit daecb2d
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
58 | | - | |
59 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
60 | 71 | | |
61 | 72 | | |
62 | 73 | | |
| |||
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
79 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
80 | 93 | | |
81 | 94 | | |
82 | 95 | | |
| |||
0 commit comments