PR #1's F2 question surfaced a String.prototype.replace call building a stable record id from a repo field (scripts/promote-to-dataset.ts:120) — replace only swaps the first occurrence, so a repo value with more than one slash would silently collide ids across different repos sharing the same owner prefix.
The fix in PR #1 was straightforward (use replaceAll), but any future stable-id construction in this repo will face the same trap.
CLAUDE.md should carry a one- or two-sentence reminder under a "Stable IDs / record keys" subsection: prefer replaceAll (or a regex with global flag), or validate the input shape before the replace. The inline comment now living at scripts/promote-to-dataset.ts:119-120 is the precedent worth pointing at.
Context: Origin in docs/build-logs/panel-review-pr-1.md (Retro #2).
🤖 Filed by Claude Code from the panel-review PR #1 retro.
PR #1's F2 question surfaced a
String.prototype.replacecall building a stable record id from arepofield (scripts/promote-to-dataset.ts:120) —replaceonly swaps the first occurrence, so arepovalue with more than one slash would silently collide ids across different repos sharing the same owner prefix.The fix in PR #1 was straightforward (use
replaceAll), but any future stable-id construction in this repo will face the same trap.CLAUDE.mdshould carry a one- or two-sentence reminder under a "Stable IDs / record keys" subsection: preferreplaceAll(or a regex with global flag), or validate the input shape before the replace. The inline comment now living atscripts/promote-to-dataset.ts:119-120is the precedent worth pointing at.Context: Origin in
docs/build-logs/panel-review-pr-1.md(Retro #2).🤖 Filed by Claude Code from the
panel-reviewPR #1 retro.