L3 (symbolic generic pins + ckc check runs the type checker) onto L1 (record-law totality) #66
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/066-l3-symbolic-generic-pins-ckc-check-runs-the-ty"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
L3 (symbolic generic pins + ckc check runs the type checker) onto L1 (record-law totality)
Along the way:
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.ckand 6 more.Mostly there, but the question on
src/rust/crates/ck_driver/tests/check.rsneeds 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() {ckc_check_reports_a_type_error_that_resolution_alone_missesreads, 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")The expect message on
expectis 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.Split. The decision in
ckc_check_reports_a_type_error_that_resolution_alone_missesis a pure function now, with its own tests insrc/rust/crates/ck_driver/tests/check.rs.It said what I assumed. Reworded in
src/rust/crates/ck_driver/tests/generic_thread_run.rsso it names the input that broke it, which is what the bug report will need.Pushed a fix for both. The second pass on
src/rust/crates/ck_driver/tests/check.rsis much smaller than the first.Good. The second pass on
src/rust/crates/ck_driver/tests/check.rsis 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.