Skip to content

Preserve physical PCs with compact residual-block compilation - #4791

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
JoyboyBrian:brian/selected-itinerary-compression
Oct 23, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
JoyboyBrian:brian/selected-itinerary-compression

Conversation

@JoyboyBrian

Copy link
Copy Markdown
Contributor

The physical compiler currently materializes every residual block tuple before the caller can fetch by (mode, pc). This adds an opt-in, source-authenticated streaming sink that retains one descriptor per block run while preserving the original PC domain, operation fields and every original Residual identity. The frozen emitter and Machine sources remain unchanged.

The refinement addresses the explicit emitter/continuation follow-up from #4758, rather than extending its wrapper interning. The written simulation includes rank/select, finite header lengths, pc+1 parking, restored-mode fetch, immutable plans and stable-source observer boundaries. Mutable plans, unsupported emitter shape, wrong block identity/order and incomplete segments reject. Block fetch includes a full structural plan check, so its cost is O(log regions + log commands + plan size).

Evidence is scoped:

  • Independent original Cursor enumeration: 122 cases / 713 labels; complete two-replica GL2 words in both modes (963 / 123 instructions), with original-wrapper identity checks and a separate unchanged-emitter comparison.
  • Real two-level physical caller on the first two GL2 lows, four rows and all 256 addresses per row: 1,024 bits, four calls/returns, 20 residuals, 675 macros. Original and compact runs agree on the independent payload oracle, parking/codec counters, borrowed streams/counts, full cleanup and mode-1 return PCs 4/7/14/17. An actual restored-PC corruption is rejected by the added verification guard before dispatch.
  • Local CPython 3.12.2 / macOS arm64, mode 0, 64 source replicas: 30,723 instruction tuples become 3,843 retained entries, plus 12 plan indexes / 186 prefix entries. Measured compile peak, including new snapshot/index allocation, falls from 4,591,352 to 2,055,080 bytes, but compile time rises from 0.062 to 0.633 seconds. This is one local observation, not a speed improvement. Axis-only mode keeps its entry count and adds metadata.

Registered normal and -O replay, metadata/pins, exact committed-byte/source-history preflight and the 102-file committed export integrity check pass. Both normal and optimized direct replays of the extracted export also pass with fresh bytecode-cache namespaces and Git absent from PATH. The registered commands have 180 seconds each and use the standard library. No historical suite, old 9,216-bit replay, Lean, Docker, GL64 materialization, cold selected-loader admission, stock coefficient, tariff or kappa change is claimed. This remains a scoped Python refinement and finite execution, not a complete multiplication theorem or selected-frontier update.

Task selected-stock-envelope, revision 7, records the changed scope and why the #4758 handoff matters. Canonical claim: #2319 (comment) . Entry overlap covered 299 open PRs, 3,695 Discussion records and 6,319 tracked local notes; exact scoped search found the distinct wrapper-sharing and residual/CALL predecessors, not the same implementation. This coverage is not a novelty certificate. Source base is canonical main 624de9dc66858af0945e5f8a0942488d62280d43.

Credit Jose Manuel/jmbarrancoml for the physical compiler/caller/Cursor and fixtures; Kewin Talaga/PellaML for source authentication and visitation audits; Nick Petalas and residual/CALL contributors for the refinement lineage; David Arias, ywz65 and retained notices. Prepared by JoyboyBrian with substantial OpenAI Codex assistance. Open next questions cover enforced immutable ownership, avoiding block enumeration, and actual selected admission.

Submission refresh: canonical main was fetched again at 2026-10-22 19:57 UTC and remains 624de9dc66858af0945e5f8a0942488d62280d43, with governing guidance and source inputs unchanged. The completed 19:59 overlap snapshot covers 316 open PRs and 3,732 Discussion records; a scoped local search includes all 6,319 base notes plus this package. Matches identify this claim and established, distinct itinerary predecessors, not an overlapping compressed physical-PC implementation. This is bounded coverage, not a novelty certificate.

@Mister-Meeseeks
Mister-Meeseeks merged commit 8c05095 into CrocSwap:main Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants