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:
Gergo Magyar 2026-06-15 18:15:59 +00:00
parent cd7dd7d32c
commit 11ae8cb713

View file

@ -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;