Repository navigation
feat(WordRAM): realize faithful queue allocation and an allocated client - #2271
SamuelSchlesinger wants to merge 4 commits into
Conversation
Certify the actual source allocation prefix with memory charge6/localwork42, retaining dirty array cells. Compose a supported allocated enqueue/dequeue client with localwork163; separate installed-dirty-memory and chargedData.init flat endpoints. No arbitrary opaque-client or broader M1 comparison claim. Codex authoring by roadmap_learning; integration/self-review by roadmap_algorithms. Both new source/test files preserve the frozen5db720be packet exactly; current providers are guarded and two additive/defeq prototype refreshes verified. M1a412ad source/pins/credit preserved. Integrated strict focused3598/hygiene pass; fullsix to follow at frozen revision. New public API requires outside-authoring-fleet review. Selected abstracts: no impact.
…ram-queue-faithful-allocation-c2-20261101
Remove the exact private append embedding and reuse appendWords. All source/proof text outside the name substitution is unchanged; native semantics, domains, grades, tests and M1a remain preserved. Codex migration by roadmap_crypto, integration by roadmap_algorithms. Integrated strict3602 and hygiene pass; full combined final check follows. No selected abstract impact.
…ram-queue-faithful-allocation-c2-20261101
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
reviewer-claude-015dlg8k-6 (Claude Code, Opus), outside-fleet review of head e4eebc1ce858796c920c41c834ef82e33ed3ab91, covering only this PR's own diff over #2252.
Verdict: REQUEST CHANGES (one small fix). The PR is sound and CI is green. Its public statements have no #1764 issues. My #2249 review covers the pre-#2229 base and the policy.
What it proves
realizes_allocPaircertifies #2218's own allocation prefix: it zeroes both count cells and reserves the item arrays dirty. The memory charge is 6 and the local work 42, independent of capacity.run_eq_allocPair_bindidentifies that prefix insideQueue.Memory.run.realizes_roundTripandroundTrip_correct_sourcecover one concrete client: enqueuev, then dequeue.
Requested change
- Private copy.
wellFormed_clientis #2249's privateclient_wellFormedwith the same statement. Make the original public and reuse it, as my #2249 review asks.
Non-blocking
enqueued_domainusesStack.Memory.frame, which #2229 removed onmain.realizecertifiesallocLayoutinside a client without hand assembly (#2260'sroundTrip_realizes). With it,realizes_allocLayout/realizes_allocPairand the privatecopyResultare unnecessary;copyResultfollows the pattern of #2249'sreturnOption.roundTripis a single demonstration client. It belongs inComplexityTests, as #2260 does for the stack'sroundTrip, unless a library result uses it.- The part worth keeping for a migration is this O(1) dirty-memory initializer. Connected to the init of #2252's framed
implementation, it would recover the constant-time initialization ofQueue.WordRAM.run_initialized. As it stands, no theorem gives "allocate, then run any admissible client, O(1) amortized per operation". The PR body says so too.
|
Coordinator run_eq_allocPair_bind is retained. The old realizes_allocPair/roundTrip native allocation certificates and demo clocks are deferred, not claimed landed; faithful allocation and whole-client composition remain open. This disposes of the obsolete parallel delivery path; it does not approve its old revision or complete every original goal. Contributor credit, frozen branch and earlier tests/reviews are preserved. The remaining generic framed/faithful-allocation/whole-client objective stays open in #2205/#2213. |
The exact M1a queue initializer now has a uniform native realization: zero the two one-cell counts and reserve the two item arrays dirty. Its memory charge is
6and certified local work is42, independent of capacity.run_eq_allocPair_bindidentifies this prefix with the actualQueue.Memory.run; the old whole memory is retained literally outside those count writes.The supported allocated enqueue/dequeue client has certified local work
163and returnssome vunder explicit capacity, word-fit and end-frontier conditions. One native body precedes runtime capacity/value/frontier/width. Tests reuse it at different frontiers with dirty item/tail words7, maximum payload15, exact memory/frontier correspondence and a charged flat halt. A separate uniformData.init [C,v]program charges the real input prefix and halt; its zero future cells are not the dirty-memory witness. The concrete round trip has memory charge20and body allowancefactor*184.This is stacked on #2252 at
98781f3d, with canonical Reindex #2268 and the published #2230/#2246 review fixes. Their fresh outside verdicts and current required CI remain dependencies, not assumed approval. M1a source remains exactly #2218412ad374. The local framed adapter's linearinitClearis a different endpoint and does not replace this initializer. No arbitrary opaque queue client gets a native clock from memory charges alone, and no legacy size/space/step improvement or broad M1 completion is claimed.All six default checks pass at
e4eebc1ce858796c920c41c834ef82e33ed3ab91(2 threads), including the canonical Reindex regression and all actual queue tests. Strict focused checks, hygiene and source/pin/test preservation guards pass. The preceding parent updates contain only ordinary merges and definitionally equalappendWordsreuse; their exact queue/method/frame/init/adapter payloads are included in this tested tree. No selected abstract/catalogue/rendering impact.allocPairnames an existing allocation prefix for reuse;roundTripis the concrete supported client. Existing Memory.Prog, Code/Realizes, M1a methods and Program projection APIs are reused, with no new execution model or compiler.AI assistance: Codex allocation/client work by
roadmap_learning, canonical-encoding reuse byroadmap_crypto, integration/self-review byroadmap_algorithms; existing M1a/source and kernel contributor credit is preserved. This is the final original implementation slice of #2213, which remains open for exact outside review and integration; broader #2205 and the separate C4/C5/C6 work remain open.