Wall #4 of the pi coding-agent bring-up (tracker #6564; prior walls: #6593, #6604, #6644 — all fixed). With all three fixes applied, pi-native --help now dies during bundle module init, before any output:
TypeError: Cannot mix BigInt and other types, use explicit conversions
at <anonymous> (no stack), rc=1
Node on the identical bundle prints pi's full usage, rc=0 — so under perry some init-path expression sees a BigInt operand where node sees none (or perry's mixed-operand gate fires where node's semantics allow the operation).
Throw site is the mixed-operand check in crates/perry-runtime/src/value/dynamic_arith.rs (or typedarray/bigint.rs). Already probed and node-identical (not the cause): BigInt("…") string parsing, bigint literals/equality, % with BigInt(0), relational bigint/number comparisons.
Candidate init-path sites in the bundle (pi-target/dist/pi-bundle.mjs):
- zod v4 int64/uint64 checks tables — ~line 108135 and ~118573-76
- json-bigint parser — ~70468
- photon-wasm glue
BigInt.asUintN(64, ret) — ~2683 (should be lazy, but verify)
Execution point is later than lru-cache init (~5520), where wall #3 threw.
Repro: HOME=$(mktemp -d) /Users/amlug/projects/perry/secret-tests/pi-target/dist/pi-native --help (binary includes the #6603+#6633+#6647 fixes; pi-native.pre6644 reproduces the previous wall for contrast). Suggested diagnosis: --debug-symbols build + lldb breakpoint on the dynamic_arith mixed-operand throw to capture the actual operands and JS provenance, as done for #6604.
Wall #4 of the pi coding-agent bring-up (tracker #6564; prior walls: #6593, #6604, #6644 — all fixed). With all three fixes applied,
pi-native --helpnow dies during bundle module init, before any output:Node on the identical bundle prints pi's full usage, rc=0 — so under perry some init-path expression sees a BigInt operand where node sees none (or perry's mixed-operand gate fires where node's semantics allow the operation).
Throw site is the mixed-operand check in
crates/perry-runtime/src/value/dynamic_arith.rs(ortypedarray/bigint.rs). Already probed and node-identical (not the cause):BigInt("…")string parsing, bigint literals/equality,%withBigInt(0), relational bigint/number comparisons.Candidate init-path sites in the bundle (pi-target/dist/pi-bundle.mjs):
BigInt.asUintN(64, ret)— ~2683 (should be lazy, but verify)Execution point is later than lru-cache init (~5520), where wall #3 threw.
Repro:
HOME=$(mktemp -d) /Users/amlug/projects/perry/secret-tests/pi-target/dist/pi-native --help(binary includes the #6603+#6633+#6647 fixes;pi-native.pre6644reproduces the previous wall for contrast). Suggested diagnosis:--debug-symbolsbuild + lldb breakpoint on the dynamic_arith mixed-operand throw to capture the actual operands and JS provenance, as done for #6604.