FS7b: lifecycle + arena meta events from the freestanding actor, via Meta.ck #49
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/049-fs7b-lifecycle-arena-meta-events-from-the-free"
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?
FS7b: lifecycle + arena meta events from the freestanding actor, via Meta.ck
Along the way:
Touches 117 files:
current-state.md,decisions-scheduler-model.md,docs/impl/runtime-testing/T9-bounded-arena-stress-reconcile.md,lowering.md,plan.md,scripts/deploy.shand 111 more.Split. The decision in
soft_asserts_run_freestanding_with_a_libc_identical_streamis a pure function now, with its own tests insrc/rust/crates/ck_driver/tests/freestanding_test_run.rs.Unreachable today, which is not the same thing.
crashedreturns an error variant now, andsrc/rust/crates/ck_driver/tests/freestanding_actor_events_run.rshas a test that drives the path.Nothing outside calls
armed. It is pub(crate) insrc/rust/crates/ck_lower/src/lower/test_facts.rsnow.Happy with this. I ran the suite against the branch and it is green,
src/rust/crates/ck_driver/tests/freestanding_test_run.rsincluded.@ -0,0 +211,4 @@site,} = crashedelse {panic!("event 3 must be ActorCrashed, got {crashed:?}");This panics. Is
crashedunreachable, or unreachable today? If it is the second I would rather see an error the caller can handle.@ -0,0 +54,4 @@/// whose stream is event-identical to the libc run's (file id normalized),/// with the intentional failing direction preserved (suite exit 1).#[test]fn soft_asserts_run_freestanding_with_a_libc_identical_stream() {soft_asserts_run_freestanding_with_a_libc_identical_streamreads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?@ -0,0 +67,4 @@/// An armed table: the six located special-form `FnId`s, as/// `(append_str, str_len)` + `(arm, head, entries, disarm)`.#[must_use]pub fn armed(meta: (FnId, FnId), cell: (FnId, FnId, FnId, FnId)) -> Self {armedis public. Does anything outside the crate call it, or is it pub because that was easier? Every public item is a promise.The meta-substrate half: the freestanding actor now emits the EXACT libc event sequence (verified from ck_rt source, not memory): Spawned{0,root} -> Spawned{1,parent 0} -> Despawned{Normal} -> ArenaHighWater -> ArenaReclaimed (tags 0/0/1/8/9), crash runs inserting ActorCrashed(10) before Despawned{Crashed} — decoded by the UNCHANGED host reader, gated by a SHAPE-DIFF test against libc helloWorld (the plural-lowerings contract as a real assertion) + field-by-field + crash-twin tests. Meta.ck grows the per-event fns (spawned_root/spawned/despawned/ arena_high_water/arena_reclaimed/crashed_at; FS6 word-store framing); Supervisor.ck's defer-driven teardown emits despawn -> high-water (read off the region header: cursor - 16 = the honest measured peak of a never-freeing bump arena) -> evict -> os_release -> reclaimed, on BOTH exits (LC10 propagation runs it on crash). New special form Supervisor::raise_word(offset) -> Load(RaiseSlot, offset) (const, word-aligned, in-layout only) so the freestanding ActorCrashed carries the REAL raise site span. The FS7a scope edge closes: the actor path composes cross-module direct callees (Supervisor::run -> Meta::*). fd design: per-emit openat O_APPEND (ordered stream; fd = documented bounded leak, no close leaf yet). u8 Memory width deliberately NOT shipped (dead sliver without a loop construct); kind/error/hint empty + timestamps 0 with residue notes. Bare-fn-main freestanding crash stays stderr-only (FS-test/FS8's, declared). Gates: fmt clean, clippy 0 warnings, cargo test --workspace 1167 passed / 0 failed (108 suites); freestanding_actor_events_run 3/3 re-verified; libc paths byte-identical.