iter raw-buf.6 kernel-stub-retirement (DONE 5/5): retire the stub, raw_buf is the sole base extension (refs #7)
Closes the raw-buf milestone. raw_buf (shipped raw-buf.1-.5; the
owned-drop resolution landed under bug #42/#43) has subsumed every
ratification role kernel_stub held -- Term::New end-to-end, the
param-in reject, kernel-tier auto-import, the monomorphic intrinsic
path, and the type-scoped polymorphic intrinsic mechanism (RawBuf's
four ops). The stub is now redundant; this iteration removes it.
Pure removal (-636/+49 across 22 files, 7 deleted):
- Rust surface: drop `mod kernel_stub` + `STUB_AIL` re-export
(ailang-kernel), `parse_kernel_stub` + its workspace injection
(ailang-surface), the `answer` + two `StubT_peek__{Int,Float}`
INTERCEPTS entries + their three emit fns (ailang-codegen). The
(intrinsic) markers leave with the deleted source, so the
marker<->entry bijection holds in lockstep.
- Source + tests: delete crates/ailang-kernel/src/kernel_stub/,
kernel_stub_module_round_trips, the two stub-consumer e2e tests,
and mono_scoped_symbol.rs (its scope-qualified-mono mechanism is
now pinned by RawBuf's ops + the intercepts bijection).
- Fixtures: delete kernel_answer.ail, new_stubt_smoke.ail,
peek_mono_pin_smoke.ail, and fieldtest kem_3_stub_consumer.ail
(referenced the deleted StubT; documented a since-fixed bug).
- Pins: re-baseline both workspace-count content-pins 5 -> 4
(workspace_pin.rs + the e2e.rs twin) and regenerate all five IR
snapshots (400 stub-IR lines removed; no user IR changed -- the
stub auto-injected into every build).
- Ledger: design/INDEX.md + design/models/0007 to present-state
(raw_buf is the live ratifier; raw-buf milestone shipped, series
pending), plus architecture-comment sweep across workspace.rs,
mono.rs, check/codegen lib.rs, workspace_kernel.rs.
Scope decisions (orchestrator, pre-plan): the self-contained inline
serde_json check-layer fixtures in ailang-check/src/lib.rs keep their
incidental StubT/kernel_stub sample names (they construct what they
reference; not stub-ratification) -- the one permitted residual.
kem_4 fieldtest kept (uses a user NumBox ADT, comment-only edit).
hash.rs `name: "answer"` left (generic serde doc example).
Plan-gap caught at implement: the planner's verbatim edit list
under-enumerated four honesty sites; one (mono.rs:562) carried a
literal `StubT_peek__Int` -- a hard-gate symbol the verbatim list
missed, which would have failed Task 4's removal gate. Filled
(comment-only, no behaviour). Confirms the planner self-review
filter-completeness risk; the implement gate caught it.
Verification: full workspace suite green (0 failed); hard symbol gate
(STUB_AIL|parse_kernel_stub|emit_answer|emit_stubt_peek|StubT_peek__)
zero matches across crates/ examples/ design/; soft gate residual only
the kept inline fixtures; kernel crate is lib.rs + raw_buf/ only.
Regression: compile_check 24/24 stable (exit 0; uniform downward
check_ms within tol -- stub no longer parsed per compile), cross_lang
25/25, check 34/34 stable (exit 0; an earlier exit-1 on
rc_over_bump was machine-load ratio noise -- denominator bump_s got
faster, rc_s also improved -- confirmed green on re-run, not
baselined).
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
; Fieldtest kem.3 (Axis 3, kernel-tier modules + auto-import) — a
|
||||
; consumer that references `kernel_stub`'s TypeDef without an
|
||||
; `(import kernel_stub)` declaration. Per spec § "Iteration prep.3":
|
||||
;
|
||||
; - The module's top-level defs are accessible bare in every other
|
||||
; module of the workspace, with no `(import ...)` declaration
|
||||
; required.
|
||||
; - The module's types are accessible bare in type position.
|
||||
;
|
||||
; Outcome: `ail check` fails with
|
||||
;
|
||||
; [unknown-module] unwrap_int: unknown module prefix
|
||||
; `kernel_stub` in qualified reference
|
||||
;
|
||||
; The workspace pre-pass rewrites bare `StubT` to qualified
|
||||
; `kernel_stub.StubT` (correct per prep.1's `qualify_workspace_term`);
|
||||
; but the resolver does not accept `kernel_stub` as a valid module
|
||||
; prefix because the consumer has no explicit `(import kernel_stub)`.
|
||||
; That is, the qualification pre-pass and the auto-import scope are
|
||||
; not cooperating — the auto-import does NOT add the kernel module
|
||||
; to the resolver's known-prefixes set.
|
||||
;
|
||||
; Workarounds attempted:
|
||||
;
|
||||
; - Adding `(import kernel_stub)`: fails earlier with
|
||||
; [module-not-found] expected at <sibling>/kernel_stub.ail.json
|
||||
; — the kernel stub has no on-disk file, it is built into the
|
||||
; compiler binary.
|
||||
; - Bare `StubT` everywhere: same outcome as above (the pre-pass
|
||||
; qualifies it before the resolver sees it).
|
||||
;
|
||||
; Prelude's bare fns (`print`, `lt`, etc.) DO work — prelude_free_fns
|
||||
; ratifies that. So the bug is specifically about TypeDefs in type
|
||||
; position for kernel-tier modules other than prelude. The shipped
|
||||
; kernel_stub TypeDef appears unreachable from any consumer in
|
||||
; practice.
|
||||
|
||||
(module kem_3_stub_consumer
|
||||
|
||||
(fn unwrap_int
|
||||
(doc "Project the Int back out of a StubT<Int>. Bare `StubT` in the type slot exercises the kernel-tier auto-import — and currently fails to resolve.")
|
||||
(type (fn-type (params (con StubT (con Int))) (ret (con Int))))
|
||||
(params s)
|
||||
(body (match s (case (pat-ctor Stub x) x))))
|
||||
|
||||
(fn main
|
||||
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||
(params)
|
||||
(body
|
||||
(let s (term-ctor StubT Stub 7)
|
||||
(seq (app print (app unwrap_int s)) (do io/print_str "\n"))))))
|
||||
@@ -6,7 +6,7 @@
|
||||
; Per spec § "Iteration prep.3 — Kernel-tier modules + param-in":
|
||||
; the param-in restriction is a generic, data-driven check; nothing
|
||||
; in the checker mentions any specific extension. So a user TypeDef
|
||||
; can declare it just as the stub kernel_stub.StubT does.
|
||||
; can declare it just as the raw_buf.RawBuf base extension does.
|
||||
|
||||
(module kem_4_paramin_box_green
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
(module kernel_answer
|
||||
(fn main
|
||||
(doc "E2E ratifier: prints the intrinsic answer (42).")
|
||||
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||
(params)
|
||||
(body (app print (app kernel_stub.answer)))))
|
||||
@@ -1,13 +0,0 @@
|
||||
(module new_stubt_smoke
|
||||
(fn unwrap_int
|
||||
(doc "Project the Int back out of a StubT<Int>.")
|
||||
(type (fn-type (params (con StubT (con Int))) (ret (con Int))))
|
||||
(params s)
|
||||
(body (match s (case (pat-ctor Stub x) x))))
|
||||
(fn main
|
||||
(doc "raw-buf.4 desugar ratifier: (new StubT 42) desugars to (app StubT.new 42), builds, and prints 42.")
|
||||
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
||||
(params)
|
||||
(body
|
||||
(let s (new StubT 42)
|
||||
(app print (app unwrap_int s))))))
|
||||
@@ -1,9 +0,0 @@
|
||||
(module peek_mono_pin_smoke
|
||||
(fn at_int
|
||||
(type (fn-type (params (own (con StubT (con Int)))) (ret (con Int))))
|
||||
(params s)
|
||||
(body (app StubT.peek s)))
|
||||
(fn at_float
|
||||
(type (fn-type (params (own (con StubT (con Float)))) (ret (con Float))))
|
||||
(params s)
|
||||
(body (app StubT.peek s))))
|
||||
Reference in New Issue
Block a user