Follow-up to #66 and #506. Carrying real CLI configuration into native module/eval execution fixes the flag-related failures, but the unchanged packages/runtime/test/bun-corpus/cli/run/env.test.ts still has three independent parser failures:
.env value expansion:$FOO,${FOO}, and${NAME:-default}stay literal..env escaped dollar sign: the escaping backslash remains in the value..env special characters 1 (issue #2823): quoted dollar expansion/escaping stays literal.
The published pre-context binary 06a212514bfd7f8b5a17778543642f7aeb36598d reports 64 pass / 15 fail / 87 assertions. The context change reports 76 pass / 3 fail / 89 assertions, with 2 skips and 2 TODOs excluded in both. These same three failing names reproduce in the baseline; they were not introduced by #506.
In packages/runtime/src/dotenv/env_loader.zig, Parser._parse starts count at the existing map size but increments it for every new key. Its later expansion loop then skips the entire map. The selected Bun source at 4982b91e3702094330f3be3883354c52b8c01323 keeps the initial boundary fixed, expands newly added entries, and permits later definitions in the same file to replace earlier definitions while preserving inherited-environment precedence. Port the actual behavior and audit allocation ownership during replacements; do not simply expand all inherited environment values.
Verify the full unchanged env file plus native controls for same-file duplicates, inherited values, sequential expansion, escaping, repeated file loads and replacement lifetimes. Keep #506's module/eval flags and existing process-environment precedence checks green. No corpus expectations, workloads or deadlines have been changed.
Evidence: zig-out/cli-context-{baseline,build1}.json, cli-context-build1-env.stderr. This is an open parser parity gap, not a claim that the overall suite is complete.