mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-05 02:43:32 +00:00
refactor(lbug): make the unknown-label node drop explicit (#2215 review)
With the U3 `let pending` switch idiom, a node whose label matches neither codeWriterMap nor multiLangWriters left `pending` undefined and was silently dropped — a footgun for a future node type. Add an explicit else with a comment documenting that unknown labels are intentionally not persisted and that a new type must be wired into a writer map. No behavior change (byte-identity + tests unchanged). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cd7dd7d32c
commit
11ae8cb713
1 changed files with 6 additions and 0 deletions
|
|
@ -572,6 +572,12 @@ export const streamAllCSVsToDisk = async (
|
|||
: []),
|
||||
].join(','),
|
||||
);
|
||||
} else {
|
||||
// Unknown label: not in codeWriterMap or multiLangWriters, so there
|
||||
// is no CSV table for it and it is intentionally NOT persisted —
|
||||
// `pending` stays undefined, so the loop awaits nothing. Made
|
||||
// explicit so a future node type isn't silently dropped here: wire
|
||||
// it into one of the writer maps above (or this branch).
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue