docs: session handoff — slices 1+2 landed, verified state, debt register, next-slice brief #63

Manually merged
hkowalski merged 6 commits from feat/063-docs-session-handoff-slices-1-2-landed-verifie into master 2026-03-19 13:34:18 +01:00
Owner

docs: session handoff — slices 1+2 landed, verified state, debt register, next-slice brief

Along the way:

  • docs(plan): alloc's measured dependencies — runs after values + function calls
  • feat(values): V1 — the bit domain gate dies; unannotated bounds take the 2^k bucket
  • feat(values): V2 — the pin channel dies; one generic coerce carries every value into its written target
  • docs: session handoff — values V1+V2 landed, alloc reorder recorded, V3a–V4 briefs for the next session
  • feat(values): V3a — the named-lowercase-parameter declaration surface completes

Touches 28 files: handoff.md, plan.md, slice_alloc.md, src/rust/crates/ck_driver/src/compile/typecheck.rs, src/rust/crates/ck_driver/tests/architecture/main.rs, src/rust/crates/ck_driver/tests/architecture/values.rs and 22 more.

docs: session handoff — slices 1+2 landed, verified state, debt register, next-slice brief Along the way: - docs(plan): alloc's measured dependencies — runs after values + function calls - feat(values): V1 — the bit domain gate dies; unannotated bounds take the 2^k bucket - feat(values): V2 — the pin channel dies; one generic coerce carries every value into its written target - docs: session handoff — values V1+V2 landed, alloc reorder recorded, V3a–V4 briefs for the next session - feat(values): V3a — the named-lowercase-parameter declaration surface completes Touches 28 files: `handoff.md`, `plan.md`, `slice_alloc.md`, `src/rust/crates/ck_driver/src/compile/typecheck.rs`, `src/rust/crates/ck_driver/tests/architecture/main.rs`, `src/rust/crates/ck_driver/tests/architecture/values.rs` and 22 more.
praghunathan left a comment

A clear improvement. The change in src/rust/crates/ck_types/src/param_args.rs is the part I would have argued for.

A clear improvement. The change in `src/rust/crates/ck_types/src/param_args.rs` is the part I would have argued for.
@ -0,0 +204,4 @@
},
],
);
scope.insert(type_entry(pair_sym, pair_id)).unwrap();
Owner

insert unwraps here. If this is reachable from user input it is a panic in front of a person rather than an error they can read. Is it provably there at this point, or should it carry a ??

`insert` unwraps here. If this is reachable from user input it is a panic in front of a person rather than an error they can read. Is it provably there at this point, or should it carry a `?`?
Author
Owner

It is reachable. The function in src/rust/crates/ck_types/src/param_args.rs returns a Result now and the caller reports it, so the unwrap on insert is gone.

It is reachable. The function in `src/rust/crates/ck_types/src/param_args.rs` returns a Result now and the caller reports it, so the unwrap on `insert` is gone.
Ground truth (machine-verified 2026-07-11): Alloc.ck needs positional record
construction (E0704), cross-module type-position resolution (E0301), and the
record-by-value word-list ABI (Region as a real two-word {offset,size} value).
Owner-approved reorder: values -> function calls -> alloc.
plan_values_02.md Steps 3+4. KILL: check_bit_literal_domain (def + both
calls), the e0740 diagnostic + re-export, every stale E0740 comment, and the
old-model golden bit_literal_out_of_range.cktest — bit truncates like every
scalar (§1.6), no per-type gate. ADD: bucket(measure) = next_power_of_two,
floor 2, applied ONLY to the unannotated arm (§2); the annotated/turbofish
bound stays verbatim, gated by the exact measure (E0715 unchanged). Arch-test
V1 (v1_no_bit_domain_gate, error-level, red-proven) forbids the gate's return
in any production source. Net production Rust: -43 lines (95 deleted / 39
added incl. the arch-test; the only production additions are bucket + docs).
plan_values_02.md Steps 1+2 (one change, landed together). KILL:
initializer_pins_to + the synth_let_stmt scalar-pin branch (a literal now
ALWAYS keeps its self-type, §1.1), lit_int_ty/lit_float_ty (a const emits at
intrinsic width; Cranelift folds the wrap), the Local-only
scalar_conversion_tags/lower_scalar_convert pair (generalized INTO coerce, not
kept beside it), and dead-code fallout (scalar::is_char_ty). ADD: the one
value-level coerce(value, from, to) entry in convert_lower.rs with exactly two
surfaces — the coercion turbofish and the let slot (binder type from
types.locals) — and NO third row: the fn boundary stays strict both ways
(§1a). let x: u8 = 258 now truly holds 2 (§1.5, corpus-proven end-to-end).
The one surviving check_block arm is the empty former [] — §2a open-generic
slot resolution, not a pin (no self-type exists to override). Bool stays
excluded from int-literal coercion targets (the leaf enumerates Char/bit).
Arch-test V2 (v2_no_pin_channel, error-level, red-proven) forbids the pin
channel's return. Goldens: 493/493 byte-identical, zero re-blessed. Net
production Rust: -31 lines; coercion paths 3 -> 1.
plan_parameters.md §0-§3, §8.1-8.3 (literal-only; const-eval arithmetic and
coherence wildcards stay gated per §8.4-8.5). Measurement-first: parser and
resolver already carried the full surface (ParamKind::Value, literal generic
args); typeck already enforced invariant identity (E0722) for newtype/record/
mixed List<T, size>. The two real gaps closed, both generic: (1) declaration-
beats-fallback — well_known_or_builtin split into the scalar registry
(consulted first, alias transparency) and builtin_ty (String/EmptyString/
Unit/Nothing), now a FALLBACK after module scope, so 'newtype String<size>'
names the declared type; the residual name-keyed builtin is owned by the
String<N> slice, noted at the site. (2) the literal-only law as a diagnostic —
new E0742 via one whole-tree walk (param_args.rs::check_value_param_args)
pairing argument slots against ParamKind, no type name matched, hooked into
both drivers. Value-field role (s.size) measured NOT emergent — pending, owner:
traits slice (Sized::size_of, plan_parameters §6). Known softness: a literal
in a TYPE slot (List<4,4>) still absorbs silently — owner: instantiation
kind-checking, flagged for the traits slice. Net-additive (+181/-38) as
sanctioned for declaration surface; live corpus stdlib untouched; 6 new
trapped fixtures; 493 goldens byte-identical; no arch-test (kills nothing —
§8.6's name-keyed-arm rule lands with the String<N> collapse).
hkowalski manually merged commit ab57710d65 into master 2026-03-19 13:34:18 +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!63
No description provided.