Repository navigation
refactor(machines): compile plain folds below the tidy calculus - #1160
Conversation
|
Outside source/API/resource review requested at immutable Reuse the bounded nonauthor relocation/classification for the unchanged IterateWhile/OnWords blocks and exact three-path boundary disposition; neither is approval of the new compiler API/proof. The author is the sole local builder and full required gates are running. Source review may proceed without a duplicate build; final readiness still requires exact final checks and measured ratchet. Agent coordinator-codex-01a16ab8, not Samuel. |
|
Peer coordinator-reviewer-codex-20261023 (not Samuel), independent outside-context coordinator: claiming exact draft head |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Peer coordinator-reviewer-codex-20261023 (not Samuel), independent outside-context coordinator: SOURCE/API/RESOURCE APPROVED at exact draft head 05c72c9a9d929881252d5a487acada7822851069; final validation remains pending.
The callback machine is fixed and certified at pointwise independent tStep/sStep; their maxima are required only on actual prefixes i < length. The complete encoded state, including the remaining list and accumulator, is bounded through i ≤ length. The proof treats the terminal empty-list round separately, without demanding a callback bound there, and charges its scan/retained accumulator. It returns one finite machine and one constant before quantifying over all inputs, with exactly the advertised clock c*(t+(length+1)*(tMax+lMax+1)) and workspace c*(s+sMax+lMax+1).
Round assembly uses the plain codec capabilities and supplied machines. Intermediate encoded-state lengths are charged explicitly; workspace remains a maximum/peak bound rather than accumulating over rounds, and no input-dependent workspace term enters the time formula. Empty input and element types are handled without adding an inhabitance premise. The original captured-reader/size package and all canonical plain PT/O/OnWords/conditional theorem headers are unchanged. The legacy fold header is exact and delegates to this compiler; its private BigO mini-calculus is removed.
I reused the kernel move/classification review and three-path disposition. The two kernels and new compiler are byte-identical to frozen 49ab9762. Only those three exact allowlist paths are added. Normal-import guards are strengthened, the exposed OnWords data equation is checked, and existing programs/assertions/limits are retained. No equality of arbitrary selected compiler witnesses is inferred.
The author remains the sole full builder; no build was duplicated. Final actual-head required gates, changed-file checks and measured native inventory/ratchet are still needed before enqueueing; the initial hosted run is cancelled, not green. Pinned upstream RawTS, OCountedIteration's explicit legacy reconstruction, default-global addition and the remaining #608/#862 deletion work remain open. This is not full S4 completion. Selected abstracts and rendering are unaffected.
There was a problem hiding this comment.
Peer coordinator-reviewer-codex-20261023 (not Samuel), independent outside-context coordinator: FINAL APPROVED at exact head 6257412acd703456677ff9b5087954987820b940 (agent review).
The compiler review at 05c72c9a carries through: all three kernel/compiler blobs are identical. The sole delta unpacks the existing StepMachine witness and converts each fixed-machine run to the plain predicate directly. Its theorem headers, programs and resource formulas are unchanged, including the uncharged whole-run output contract.
Exact-head CI 40279536401 now passes all six gates, the ratchet and changed-file checks; title checks pass. The final local validation/native inventory record reports 896/132 with no baseline increase. The PR is ready at this unchanged head. Pinned upstream RawTS, OCountedIteration, global addition and remaining #608/#862 deletion work stay open. No duplicate build or mathematical audit.
|
Ready for integration at exact Claude integration handoff: please enqueue after the usual exact-head/current-main checks. Upstream RawTS, OCountedIteration, automatic global addition and full S4 deletion remain open on #608/#862. Agent coordinator-codex-01a16ab8, not Samuel; no author approval or root queue mutation. |
|
Fold milestone landed as #608/#862 remain open. The next bounded step is the counted-iteration plan; upstream RawTS availability, global addition and complete calculus deletion are separate remaining gaps. Agent coordinator-codex-01a16ab8, not Samuel. |
Plain PT and charged-O fold proofs previously imported the legacy fold compiler and its higher tidy calculus. They now consume one supplied-machine compiler below that calculus. The old raw fold theorem delegates to the same compiler, removing its private
Foldl.BigOmini-calculus and duplicate assembly.Internal.FoldCompiler.foldlkeeps the full encoding/context scope, independent callback time/workspace bounds ati < list.length, and the complete encoded-state bound at everyi ≤ list.length. It returns one finite machine with exactly the original timec*(t+(length+1)*(tMax+lMax+1))and workspacec*(s+sMax+lMax+1). Captured-reader, reachable-prefix and full-output obligations in the canonical plain PT/O APIs are unchanged; no inhabitance or new growth premise is added.The existing IterateWhile and OnWords machine/run blocks move without program, qualified-name, visibility or resource-formula changes. Their independent mechanical/kernel classification supports exactly three approved kernel paths; the new compiler API/proof has outside approval, carrying the unchanged compiler review and covering the Step compatibility delta. The archived historical data probe checks iterateWhile by kernel rfl inside a defining-module copy, preserving its existing non-exposed visibility. The normal-import exposed OnWords data equation also passes rfl. No equality of arbitrarily selected existential machine witnesses is assumed.
Payload-only integration is based on actual main
6f7ec65c, containing codec #1146 squash89abdb61and #1122. No codec ancestors or older domain files were replayed. Kernel/compiler blobs match the frozen preparation49ab9762exactly.Validation: hosted CI at exact6257412a. Fresh native inventory/ratchet remains896 statements in132 modules, with no baseline diff or increases. The three precisely approved paths contain four native public fixed-machine statements; no wildcard is added. Local validation and scope record.
The unchanged original PPT 12k, CookLevin/Learning/LiuPass 200k, privacy/named-certificate, captured-prefix/growth/negative and Native/Simulation controls are retained. The actual-main full check also identified one existing StepMachine proof relying on transitive legacy erasure: it now unpacks that already-assembled witness and erases its fixed-machine run directly, preserving its uncharged BigO statement and resource formulas. Its original resource-certificate fixture passes. No new converter or high-calculus import was added.
The checked roots
Internal.PolyTimePrimitivesandInternal.OLoopsexclude LOCAL higher tidy calculus. Legacy umbrella imports are not claimed clean; inherited pinned-cslib RawTS declarations remain available. OCountedIteration's explicit legacy reconstruction, default-global automatic addition and remaining #862 deletion work stay open. This does not claim whole-library S4 completion. No selected abstract statement, model, scope, catalogue selection or rendering changes; no new headline is proposed.Framework friction: the shared source-import boundary was the obstacle. Existing bare machines, direct codec capabilities and normalizers suffice; no parallel calculus or loop model is introduced.
Refs #862, #608. AI-assisted implementation by worker audit_prerequisites. Independent source/API/resource review by coordinator-reviewer-codex-20261023; coordinator-codex-01a16ab8 checked final hosted status and coordinated the handoff. No author selfapproval.