Merge train: #9724, #9712, #9716 (#9254 phases 3-4) - #9734
Merged
Conversation
added 5 commits
September 4, 2026 14:28
…re owned growth history Closes #9706. The agent-local shape table kept a PtrHashMap<u32, Box<ShapeDescriptor>> beside two Vec<u32>-valued reverse maps (exact facts, keys address). On the compiled claude-code TUI at idle that cost ~330 bytes per live descriptor. Replace the by-id map with a chunked slab indexed by ShapeId (32-byte packed records, stable addresses, lazily allocated chunks released at major GC), and both reverse maps with one keys-address family index that exact-facts interning walks. Retire an OWNED keys array's same-address growth history behind the version its single owner carries, except for Array-subclass receivers whose tail-transition cache reinstalls it. Claude-Session: https://claude.ai/code/session_016TiA2Y98uX79JSsY3eV1DS
This was referenced Sep 4, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge train: #9724, #9712, #9716. Validated once as a tree, rebase-merged so each commit keeps its author.
Note on assembly: #9716 (Phase 4) carries its own rebased copy of #9712's commits, so picking both would duplicate Phase 3. #9716 was picked alone; #9712 lands with it.
#9724 — shape descriptors in an id-indexed slab. Retires the boxed by-id
PtrHashMap. The GC invariant is preserved and now pinned harder: since #8112 the collector enumerates each record'skeysword as an ordinary GC slot and a budgeted dirty scan can hold that address across mutator resumptions, so a record's address must never move for its lifetime — chunks are individually boxed and never reallocated, only the directory grows.shape_descriptor_census.pygoes from 13 to 17 pinned patterns and addsshapes_store.rsto the set read as one logical unit (citing #8918, where a census inspecting an empty body reported success). I sabotage-tested the gate by breakingtype Chunk = Box<…>: it fails with "shape descriptor authority surface missing: slab chunks individually boxed, never reallocated".#9712 / #9716 — #9254 Phases 3 and 4. One loop-invariant receiver validation is materialized in the preheader, the cached base handle is refreshed after every fired back-edge GC poll, and exact bounded reads take a raw load behind an invariant fast/fallback diamond. Phase 4 then moves the five remaining bespoke receiver mechanisms into
ReceiverDescriptorTable.Admission is default-deny: the shared receiver-region model answers an unmodelled statement with
RegionEnder::Unmodelledand an unrecognized relocation point withdeny("cached address does not survive this relocation point"). Phase 3's edits to that model are additive; the deny arms are untouched.Validation
64/64 lint gates; release build;
perry-codegen,perry-runtime,perry-hir(allRUST_TEST_THREADS=1), andissue_9254_receiver_descriptor_counted_loop— all green.Gap suite: 697 tests against the pinned node 26.5.1. These PRs promote previously-lint-only region formation to a production consumer and touch every counted loop over a numeric array, so a full sweep was run rather than relying on unit tests.
Zero regressions attributable to this train. The harness reported ten, all attributed:
node:httplink failure (js_bun_http_response_snapshot_jsonisweb-fetch-gated but referenced unconditionally). Pre-existing and filed; reproduces independently of this train.test_gap_9592_child_timeout_threads— the test spawns/bin/true, which does not exist on macOS (/usr/bin/truedoes). node fails withspawn /bin/true ENOENT; Perry prints the correcttimeout threads released: true/slow child killed on time: true. An oracle failure on this platform, not a Perry one.test_gap_9676_stdin_unref_ref_keeps_reader—node_fail; passes under node with</dev/null. A stdin-context artifact of the local sweep.Both non-http cases were re-run in isolation to rule out CPU contention from the concurrently running cargo suites, then diffed against node by hand.