Repository navigation
refactor(runtime): read StringHeader payloads through string_data at the eight new open-coded sites - #14751
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…the eight new open-coded sites The string payload-access ratchet fails on main (perry-runtime inline-offset: baseline 327, found 335). The eight new sites add size_of::<StringHeader>() to a header pointer by hand instead of calling crate::string::string_data, which computes exactly that address: - object/http_handle_prototype.rs (3, from e1fbae4) - object/field_get_set/buffer_own_prop.rs (1, from b96fcce) - tests: array/from_primitive_tests.rs (892ad29), buffer/error_object_tests.rs (86dc5e9), object/global_this/declaration_keys_tests.rs (e5e99ef), thread/error_stack_clone_tests.rs (841006a) No behaviour change: string_data(s) is (s as *const u8).add(size_of::<StringHeader>()). The count returns to the baseline, which is not changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
59da237 to
b7ebbad
Compare
Summary
String payload-access inventory(python3 scripts/string_payload_access_inventory.py) fails onmain(CI run 43639432681,lint): perry-runtimeinline-offsetbaseline 327, found 335. The eight new sites addsize_of::<StringHeader>()to a header pointer by hand; this PR routes them throughcrate::string::string_data, which computes exactly that address. The count returns to 327; the baseline is not touched.Changes
Sites found by comparing per-file
--listcounts betweenb42fb4361e(the last baseline write, where the gate passes) andupstream/main; the adding commit of each is fromgit log -S:object/http_handle_prototype.rs— 3 sites (e1fbae4, fix(http, http2): give a live server's req/res node's prototype #14002)object/field_get_set/buffer_own_prop.rs— 1 site (b96fcce)array/from_primitive_tests.rs(892ad29),buffer/error_object_tests.rs(86dc5e9),object/global_this/declaration_keys_tests.rs(e5e99ef, runtime: builtin prototypes own exactly node's keys (no copies of Object.prototype members) #14375),thread/error_stack_clone_tests.rs(841006a)No behaviour change:
string_data(s)is(s as *const u8).add(size_of::<StringHeader>()).Related issue
Refs #14595. Main's CI run: https://github.com/PerryTS/perry/actions/runs/43639432681
Test plan
Measured on macOS arm64:
b42fb4361e: gate passes;upstream/main:baseline 327, found 335; this branch: passes (357 inline offsets and 11 reader helpers held by the ratchet, all crates).buffer/error_object_tests.rsfails the gate again (baseline 327, found 328, that line listed)../scripts/test_affected_crates.sh --base upstream/main --dry-run→ ran each crate's tests (CARGO_BUILD_JOBS=4 RUST_TEST_THREADS=1):--lib: 6808 passed, 5 failed — all 5 also fail onupstream/main(rerun there by name:handle_storage_teardown_clears_cache_before_late_scope_drop, threelazy_intrinsic_towers::*_tower_runs_in_a_no_move_window,program_cell_bytes_do_not_carry_the_previous_occupant); none is in a touched module.--bins: 1609 passed, 3 failed — the same 3 fail on main.sqlite::bind::tests::typed_arrays_are_not_named_parameter_objects, a main failure addressed by test: sqlite's typed-array bind test installs the typed-array family #14736).upstream/main.BASE_SHA=upstream/main scripts/run_lint_gates.sh(full run): FAIL set = main's minusString payload-access inventory; no new FAIL.Checklist
feat:/fix:/docs:/chore:prefix convention used in the log🤖 Generated with Claude Code
https://claude.ai/code/session_01CUQanVsnitcrmYLAWWPc3p
Summary by CodeRabbit