docs: session handoff — lowering-completeness session; alloc slice COMPLETE (Memory.ck DEAD, Alloc.ck is the memory model); cross-module generics landed; all traits + §1b design decisions RULED; 4 precisely-rooted reds for next session's opener; rat… #68

Manually merged
dferreira merged 7 commits from feat/068-docs-session-handoff-lowering-completeness-ses into master 2026-03-25 21:14:27 +01:00
Owner

docs: session handoff — lowering-completeness session; alloc slice COMPLETE (Memory.ck DEAD, Alloc.ck is the memory model); cross-module generics landed; all traits + §1b design decisions RULED; 4 precisely-rooted reds for next session's opener; ratchet 112→102; debt register at 30 entries (4 closed/ruled this session, 8 new — all owned)

Along the way:

  • feat(opener): S-0 — store/load width honesty; 2 of 4 reds greened
  • feat(opener): S-0b — synthetic actor/kernel bodies carry the real two-word Region; ALL test binaries green
  • feat(traits T-0): unified fn-body parsing — '= expr' legal in impl/actor/test; E0046/E0040 recovery resyncs
  • feat(traits T-1): coherence key widens to (TraitId, TypeArity[<=6]) — operand-pair dispatch; E0730 scoped to method-sugar traits
  • docs: session handoff — traits-substrate session; opener CLOSED (suite 156/156 green, first fully-green suite since alloc); T-0 + T-1 landed; T-1b (impl-body pipeline) discovered, scouted, runbook in slice_traits.md; 'not' keyword collision surfaced; debt register: #10/#26/#27 closed, #1 3->2, four new entries (31-34), all owned
  • feat(traits T-1b): impl-body pipeline — impl methods join the FnId spine

Touches 61 files: handoff.md, slice_traits.md, slice_turbofish.md, src/rust/crates/ck_cktest/src/pipeline.rs, src/rust/crates/ck_driver/src/compile/cross_module.rs, src/rust/crates/ck_driver/src/compile/fn_main.rs and 55 more.

docs: session handoff — lowering-completeness session; alloc slice COMPLETE (Memory.ck DEAD, Alloc.ck is the memory model); cross-module generics landed; all traits + §1b design decisions RULED; 4 precisely-rooted reds for next session's opener; ratchet 112→102; debt register at 30 entries (4 closed/ruled this session, 8 new — all owned) Along the way: - feat(opener): S-0 — store/load width honesty; 2 of 4 reds greened - feat(opener): S-0b — synthetic actor/kernel bodies carry the real two-word Region; ALL test binaries green - feat(traits T-0): unified fn-body parsing — '= expr' legal in impl/actor/test; E0046/E0040 recovery resyncs - feat(traits T-1): coherence key widens to (TraitId, TypeArity[<=6]) — operand-pair dispatch; E0730 scoped to method-sugar traits - docs: session handoff — traits-substrate session; opener CLOSED (suite 156/156 green, first fully-green suite since alloc); T-0 + T-1 landed; T-1b (impl-body pipeline) discovered, scouted, runbook in slice_traits.md; 'not' keyword collision surfaced; debt register: #10/#26/#27 closed, #1 3->2, four new entries (31-34), all owned - feat(traits T-1b): impl-body pipeline — impl methods join the FnId spine Touches 61 files: `handoff.md`, `slice_traits.md`, `slice_turbofish.md`, `src/rust/crates/ck_cktest/src/pipeline.rs`, `src/rust/crates/ck_driver/src/compile/cross_module.rs`, `src/rust/crates/ck_driver/src/compile/fn_main.rs` and 55 more.
dferreira approved these changes 2026-03-25 14:24:39 +01:00
dferreira left a comment

Happy with this. I ran the suite against the branch and it is green, src/rust/crates/ck_driver/tests/impl_dispatch_run.rs included.

Happy with this. I ran the suite against the branch and it is green, `src/rust/crates/ck_driver/tests/impl_dispatch_run.rs` included.
@ -468,6 +523,7 @@ fn state_probe_entry(fns: (FnId, FnId, FnId), words: &[i64], span: Span) -> Body
},
span,
);
b.record_type(call, region_ty.clone());
Owner

record_type is cloned on what looks like a hot path. Is the ownership forced here, or can this borrow?, at src/rust/crates/ck_driver/src/compile/state_probe.rs:526.

`record_type` is cloned on what looks like a hot path. Is the ownership forced here, or can this borrow?, at src/rust/crates/ck_driver/src/compile/state_probe.rs:526.
@ -0,0 +109,4 @@
.arg("-u")
.arg(binary)
.output()
.expect("spawn `nm -u`");
Owner

The expect message on expect is the only thing a user sees if this fires. Does it say what they should do, or only what we assumed?, at src/rust/crates/ck_driver/tests/impl_dispatch_run.rs:112.

The expect message on `expect` is the only thing a user sees if this fires. Does it say what they should do, or only what we assumed?, at src/rust/crates/ck_driver/tests/impl_dispatch_run.rs:112.
Author
Owner

It said what I assumed. Reworded in src/rust/crates/ck_driver/tests/impl_dispatch_run.rs so it names the input that broke it, which is what the bug report will need.

It said what I assumed. Reworded in `src/rust/crates/ck_driver/tests/impl_dispatch_run.rs` so it names the input that broke it, which is what the bug report will need.
Author
Owner

It can borrow. The clone of record_type was left over from before the lifetime was threaded through src/rust/crates/ck_driver/src/compile/state_probe.rs, and it is gone.

It can borrow. The clone of `record_type` was left over from before the lifetime was threaded through `src/rust/crates/ck_driver/src/compile/state_probe.rs`, and it is gone.
Also authored: slice_turbofish.md (the §1b runbook, dispatch-ready) and the
slice_traits.md 2026-07-17 APPENDIX (the scout's measured state + sub-slice
split T-0..T-3 — supersedes the older runbook text where they disagree).
KILL: the fn_main.rs '== "Region"' type-name probe (debt #1: 3→2) — the root
of the silent frame-pointer persistence. Replaced by the layout-derived E0743
refusal: Floor::store/load::<T> with multi-word T is a real error naming the
leaf, the type, and the word count (test: store_load_width.rs).
Clock.ck/Scheduler.ck conform: Regions persist as two adjacent 1-word usize
slots, reconstructed brace-only (ctx 64→72; clock entry stride 48→56).
clock_tick_run + clock_coalesce_run GREEN. actor_state_run + scheduler_tick_run
remain red on one rooted gap (emit_user_call_value: Region-returning install
calls in driver-synthesized bodies carry no type/layouts — S-0b).
Debt #29: cross-module Alloc::read/write stone authored, #[ignore]d honest
(generic Floor::load::<T> has no per-stamp FS4 width entry — root in doc).
actor_state_run + scheduler_tick_run GREEN (the opener's last 2 reds; suite
155/155). No codegen change — the fix threads the same type facts a lowered
body carries (return types, record_layouts) into the driver-synthesized
bodies, so the existing generic flatten/repack path handles the two-word
Region; one-word uses project .offset via ordinary record projection.
Second latent root fixed en route: scheduler_lower's cycle→step desugar now
types ctx so its two words flatten (was the 'got 1, expected 2' verifier).
Scope lock held: debt #1's two == "Region" probes untouched; state fields
stay one word.
KILL: the impl-side eq-body restriction (fn_decl.rs Eq arm) — E0035 now fires
only for '= intrinsic' outside module level (Floor.ck-only, unchanged) and for
a genuinely missing body. One production, no impl-side special case (owner
ruling 27a06d6). Trait declarations stay signature-only (docs/traits.md
no-default-bodies lock; 'impl/trait position' = when implementing).
Recovery: a stray token in an impl/trait body emits ONE diagnostic and skips
to the fn/}/field resync boundary in a single Error node (was one per token —
debt #10). Prelude.ck parse errors 240 → 12; residue = 2 heterogeneous
delegating impls (turbofish-slice surface) + the 'not' keyword collision
(new owner question, slice_traits.md).
KILL: the single-subject (TraitId, TypeId) key shape and E0730's unconditional
receiver-position arm. TypeArity (new coherence_key.rs) is the bounded ordered
input-position list — [Option<TypeId>; 8] bucket, MAX_INPUT_ARITY 6, E0744
(error-level) beyond it. Input-vs-output derived structurally from the trait's
method signatures (a param is a key input iff its var appears in params;
output-only R/To never key). Distinct input tuples register distinct rows
(Add<i8,i8,i8> + Add<i8,f32,f32> no longer collide); same-inputs-different-R
stays E0709. Generic impl positions wildcard at head-constructor depth
(String<sa> keys as String; per-value rows impossible); concrete-TAG
discrimination (Money<USD> vs <EUR>) documented as deferred until currency
impls land (coherence_key.rs:48). Method calls thread the data-last operand
list into the probe (method_call.rs); E0730 fires only for one-input-param
traits — Op<A,B,R> is positional operator territory (owner ruling, plan_traits
§1a). Driver reordered: trait methods build before coherence. Locks held: one
hash probe, no solver, population walks impls only, dispatch static.
One law: resolved MethodCall -> coherence.impl_of -> (ImplId, method) -> FnId
-> ordinary direct Call (data-last: args…, receiver). Static dispatch, no
vtable, codegen 0 LoC. Gaps landed: (c) FnId minted per impl method at N1
(span-keyed bridge; (ImplId,method)->FnId registry built on the winning
coherence row); (a) resolve_impl_bodies into bodies_by_fn; (b) impl-method
signatures lifted into the ordinary SignatureTable, bodies checked as
top-level fns; (f) driver settles span-keyed MethodImpls table, lowering
rewrites to Call(Ref(Item(Fn))), discovery auto-finds impl callees
(fn_decls_by_id made impl-aware — no silent miss). (d) generic-impl mono
deferred (nothing exercises it until Concat).

KILL: the lower_method_call -> ExprKind::Unsupported dead-end for resolved
trait methods is gone (send/list-mutation fall-throughs are pre-existing MA2c
code, moved verbatim to method_impls.rs). Zero new name probes in the diff.

First runtime impl corpus stone: tests/corpus/impl_dispatch — impl
Total<Money> body calls Floor::iadd, x.total(y) dispatches data-last,
container-run exit 42 observed (impl_dispatch_run.rs).

Gates (orchestrator-run): fmt 0 · clippy -D warnings 0 · 147/147 cargo
summaries ok (baseline 146 + new stone binary) · arch 14/14 ·
stdlib_type_clean green · ratchet TIGHTENED 102 -> 98 (five parser/impl
fixtures now fully trapped; debt #34 churn blessed honestly).

Net Rust delta: +377 LoC (552+/175-) — sanctioned generic pipeline plumbing;
the subtraction this unblocks (PRIMITIVE_TRAITS, debt #4) lands in T-2.
Known follow-up: MethodImpls armed on the fn-main run path only; the six
other lower_body_full sites pass the empty table (honest Unsupported).
dferreira manually merged commit 14ebb3a7a3 into master 2026-03-25 21:14:27 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
northgale/cklang-bootstrap!68
No description provided.