Files
orca/mobile/scripts
Jinwoo-H 0a8d071db4 test(mobile): read the bundle census and the artifact off one build
Round 1's finding: the input assertion built the bundle while the wrapper assertions read
the committed string, so under the presets-to-preferences control the rebuild red and
`__commonJS` passed against a stale artifact. And `inputs.length > 40` was a bound, not a
census.

`terminalDocumentBundle()` returns the text and the module list from one build, and
`buildTerminalDocumentScript` is that function's text — so the thing measured is the thing
written. The case asserts the exact input count, no node_modules input, neither wrapper, and
that the committed artifact equals what the sources build. A stale artifact now reds.

Controls: the presets pointed back at `storage/preferences` fails on the inputs and on
`__commonJS` in the same run; `MIN_FIT_COLS` changed to 21 without rebuilding fails the
equality. Worth knowing for the next reader: an unused export or a dropped comment does not
fail it, because esbuild does not emit either — the assertion is about what ships.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
2026-09-20 22:56:41 -04:00
..