L3 (symbolic generic pins + ckc check runs the type checker) onto L1 (record-law totality) #66

Manually merged
tvidal merged 1 commit from feat/066-l3-symbolic-generic-pins-ckc-check-runs-the-ty into master 2026-03-24 15:34:43 +01:00
Owner

L3 (symbolic generic pins + ckc check runs the type checker) onto L1 (record-law totality)

Along the way:

  • fix(types): L3 — symbolic turbofish pins propagate (E0722 false-positive dies); ckc check runs the run path's type checker (F5a)

Touches 12 files: src/rust/crates/ck_driver/src/app.rs, src/rust/crates/ck_driver/src/compile/typecheck.rs, src/rust/crates/ck_driver/src/lib.rs, src/rust/crates/ck_driver/src/load.rs, src/rust/crates/ck_driver/tests/check.rs, src/rust/crates/ck_driver/tests/fixtures/check_tyerr/Main.ck and 6 more.

L3 (symbolic generic pins + ckc check runs the type checker) onto L1 (record-law totality) Along the way: - fix(types): L3 — symbolic turbofish pins propagate (E0722 false-positive dies); ckc check runs the run path's type checker (F5a) Touches 12 files: `src/rust/crates/ck_driver/src/app.rs`, `src/rust/crates/ck_driver/src/compile/typecheck.rs`, `src/rust/crates/ck_driver/src/lib.rs`, `src/rust/crates/ck_driver/src/load.rs`, `src/rust/crates/ck_driver/tests/check.rs`, `src/rust/crates/ck_driver/tests/fixtures/check_tyerr/Main.ck` and 6 more.
tvidal requested changes 2026-03-24 13:31:38 +01:00
Dismissed
tvidal left a comment

Mostly there, but the question on src/rust/crates/ck_driver/tests/check.rs needs an answer before this lands.

Mostly there, but the question on `src/rust/crates/ck_driver/tests/check.rs` needs an answer before this lands.
@ -60,0 +66,4 @@
/// (`app::closure_check_diagnostics`) surfaces it; the resolution-only reconcile
/// path (`app::closure_diagnostics`) must NOT — the two contracts stay distinct.
#[test]
fn ckc_check_reports_a_type_error_that_resolution_alone_misses() {
Owner

ckc_check_reports_a_type_error_that_resolution_alone_misses reads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?

`ckc_check_reports_a_type_error_that_resolution_alone_misses` reads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?
@ -0,0 +195,4 @@
let workspace = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.parent()
.and_then(Path::parent)
.expect("workspace root from ck_driver manifest dir")
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/generic_thread_run.rs:198.

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/generic_thread_run.rs:198.
Author
Owner

Split. The decision in ckc_check_reports_a_type_error_that_resolution_alone_misses is a pure function now, with its own tests in src/rust/crates/ck_driver/tests/check.rs.

Split. The decision in `ckc_check_reports_a_type_error_that_resolution_alone_misses` is a pure function now, with its own tests in `src/rust/crates/ck_driver/tests/check.rs`.
Author
Owner

It said what I assumed. Reworded in src/rust/crates/ck_driver/tests/generic_thread_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/generic_thread_run.rs` so it names the input that broke it, which is what the bug report will need.
Author
Owner

Pushed a fix for both. The second pass on src/rust/crates/ck_driver/tests/check.rs is much smaller than the first.

Pushed a fix for both. The second pass on `src/rust/crates/ck_driver/tests/check.rs` is much smaller than the first.
tvidal approved these changes 2026-03-24 15:15:46 +01:00
tvidal left a comment

Good. The second pass on src/rust/crates/ck_driver/tests/check.rs is what I hoped for.

Good. The second pass on `src/rust/crates/ck_driver/tests/check.rs` is what I hoped for.
F5b: Instantiation::apply substituted concrete pins but ERASED symbolic
Var endpoints back to the fresh var, so a generic threading its own T
(fn wrap<T>(v: T) -> T = identity::<T>(v) — the Alloc::read<T> shape)
synthesized its tail at a stray fresh var and E0722 fired. The law is now
uniform: every binding applies verbatim (rewrite over bindings.get),
no is-Var special case; unpinned vars stay put (E0706 fail-soft kept).

F5a: ckc check <dir> ran NO type checker — a well-resolved, ill-typed
program reported clean while run errored. check now folds the exact
run-path cascade (shared run_type_cascade; app_type_diagnostics), gated
on a resolution-clean app closure exactly as compile_project_object
stages it. --traps stays resolution-only (the corpus trap.md reconcile
contract). Zero goldens re-specified.

New coverage: corpus stone generic_thread (concrete + symbolic pins,
exit 42, freestanding-gated by generic_thread_run.rs; red-proven — the
reversed fix fails it with E0722) and check.rs pinning that check
surfaces E0722 where the resolution-only path must not.

FLAGGED, not touched: ckc check over the injected stdlib surfaces ~150
latent E0702 (true per synthesis-only law: bare literals into width
params) + one suspected E0726 false positive ({}::<Admin> with u) —
the stdlib is codegen-correct but not type-clean; owner follow-up needed.
tvidal manually merged commit c7eba4183a into master 2026-03-24 15:34:43 +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!66
No description provided.