fix(tests): unbreak class-id audit (#11691) and sloppy-this gap oracle (#11693) - #11694
Conversation
…gap oracle) - static_shapes_tests.rs: rename the test-local CLASS_ID to LATE_POOL_CLASS_ID so the class-id audit no longer reads it as a drifted mirror of class_registry/state.rs's CLASS_ID. - test_gap_sloppy_this_bound_once: .ts -> .cts. Under the repo's "type": "module" node runs a .ts as strict ESM, so the oracle threw on mutate.call(1); a .cts is CommonJS (sloppy) in both runtimes.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe static shapes test renames its local class ID constant and reformats calls without changing test inputs or assertions. The changelog records this rename and a test-file extension change. ChangesStatic shapes test update
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to This change updates test fixtures and documentation without changing runtime behavior. The parity runner includes the renamed test, and no actionable merge-blocking risk is evident. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #11691
Closes #11693
Two test-only fixes for reds on
main. No compiler or runtime code changes, and the audit script is untouched.#11691, class-id audit. #11678's test declared a local
const CLASS_IDinobject/static_shapes_tests.rs, and the audit read it as a drifted mirror ofclass_registry/state.rs'sCLASS_ID. I renamed it toLATE_POOL_CLASS_ID. That follows the repo's existing convention: 20-odd test-local ids already carry unique*_CLASS_IDnames and stay inside the audit's scope, so a test id that lands on a real reserved value is still caught. I did not weaken the audit.python3 scripts/class_id_collisions.py: passes (42 ids).JSX_NODE_CLASS_ID = 0xFFFF_00A1, the same value asRAW_JSON_CLASS_ID): exit 1 withCOLLISION. I reverted it afterwards.CLASS_IDname back in the test: it reportsMIRROR DRIFTagain. I reverted that too.cargo test --release -p perry-runtime --lib a_class_registered_before_the_pools: 1 passed.#11693,
test_gap_sloppy_this_bound_once. Renamed.ts→.cts. The repo is"type": "module", so Node runs a.tsas strict ESM, and the oracle threw onmutate.call(1). A.ctsis CommonJS, so it is sloppy in both runtimes. The repo already uses this form for sloppy-mode gap tests (test_gap_9394_…,test_gap_10509_arguments_reads_sloppy.cts,test_gap_attrs_in_shape_sloppy.cts, …). The test content is unchanged, so it still checks what #11679 intended./opt/node-v26.5.1-linux-x64, matching.node-version): exits 0.run_parity_tests.sh --filter test_gap_sloppy_this_bound_once(PERRY_SKIP_BUILD=1 PERRY_NO_AUTO_OPTIMIZE=1, Linux x86_64, release build of this branch):.ts):PARITY_FAILPASScmp).Other checks:
cargo fmt --all -- --checkis clean andscripts/check_file_size.shpasses.SKIP_COMPILE_GATES=1 scripts/run_lint_gates.sh: 105 of 107 script gates pass. The 2 failures are known and not caused by this PR: "Public benchmark evidence freshness" (red on main) and "Type-check Windows runtime and stdlib" (cargo xwinis not installed on the host). I did not run the compile tier.git diff --statwas clean after the gates.Not run: the full gap sweep,
cargo test --workspace, and the compile tier ofrun_lint_gates.sh(known red on Linux;cargo xwinis missing on the host). I did no instruction-count A/B because no runtime or compiler code changed.Summary by CodeRabbit