chore: drop accidental .claude/worktrees gitlink; ignore worktrees dir #10

Manually merged
dferreira merged 3 commits from feat/010-chore-drop-accidental-claude-worktrees-gitlink into master 2026-01-14 13:00:00 +01:00
Owner

chore: drop accidental .claude/worktrees gitlink; ignore worktrees dir

Along the way:

  • feat(runtime): re-slice floor-first; land order-1 substrate (ck_rt)
  • feat(runtime): ck --interactive REPL drives the floor (order 1, increment 2)

Touches 15 files: .gitignore, docs/impl/runtime-testing/README.md, docs/impl/runtime/R1-executor-core.md, docs/impl/runtime/R8-the-floor.md, docs/impl/runtime/README.md, docs/impl/runtime/substrate-and-supervisor.md and 9 more.

chore: drop accidental .claude/worktrees gitlink; ignore worktrees dir Along the way: - feat(runtime): re-slice floor-first; land order-1 substrate (ck_rt) - feat(runtime): ck --interactive REPL drives the floor (order 1, increment 2) Touches 15 files: `.gitignore`, `docs/impl/runtime-testing/README.md`, `docs/impl/runtime/R1-executor-core.md`, `docs/impl/runtime/R8-the-floor.md`, `docs/impl/runtime/README.md`, `docs/impl/runtime/substrate-and-supervisor.md` and 9 more.
Author
Owner

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

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

Nothing outside calls events. It is pub(crate) in src/rust/crates/ck_rt/src/lib.rs now.

Nothing outside calls `events`. It is pub(crate) in `src/rust/crates/ck_rt/src/lib.rs` now.
dferreira approved these changes 2026-01-14 12:55:00 +01:00
dferreira left a comment

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

A clear improvement. The change in `src/rust/crates/ck_driver/src/repl.rs` is the part I would have argued for.
@ -0,0 +136,4 @@
}
}
fn reason_label(reason: DespawnReason) -> &'static str {
Owner

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

`reason_label` 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 +96,4 @@
/// Every event recorded so far, in emission order.
#[must_use]
pub fn events(&self) -> &[MetaEvent] {
Owner

events is public. Does anything outside the crate call it, or is it pub because that was easier? Every public item is a promise.

`events` is public. Does anything outside the crate call it, or is it pub because that was easier? Every public item is a promise.
The n2-effect-uniqueness git worktree had been committed as a submodule-style
gitlink (mode 160000 at a1cb950, since 7729a1e), so the repo always showed it
dirty. With the worktree deleted, untrack the gitlink and add .claude/worktrees/
to .gitignore (the prior .worktrees entry never matched this path).
Invert the runtime cascade to floor-first per the "everything is an actor"
decision: build the real actor substrate first, not a throwaway tree-walker.
The executor's eval becomes the behavior an actor runs (order 2).

Docs (docs/impl/runtime/):
- README.md re-sliced with an Order column; 4 locked sub-decisions; the
  bootstrap-branch seam (master owns/extends ck_hir with the owned Core-Erlang
  tree + side-table types; runtime consumes via ck_eval; order 1 insulated,
  order 2 rendezvous with the lowering).
- substrate-and-supervisor.md: new order-1 spec.
- R1 reframed (eval in a behavior, order 2); R8 reframed (multi-actor, order 10).
- Correct event vocabulary to the closed MetaEvent set: ActorSpawned /
  ActorDespawned (ArenaReclaimed is proposed/M7, not v1 -- reclaim observed via
  RuntimeState). Binary is `ck`.

Code -- ck_rt (order 1, increment 1: lifecycle + reclaim):
- Runtime::boot() brings up the universal root supervisor.
- Runtime::spawn(kind, behavior): single carrier, run-to-completion; emits
  ActorSpawned -> ActorDespawned{Normal}; reclaims (safe arena stand-in,
  unsafe_code still forbidden).
- MetaStream (order-1 subset) + RuntimeState (live set + arena high-water) --
  the two post-interpret artifacts, now real.
- 4 unit tests gate the lifecycle / reclaim / fresh-id invariants.
- Registered ck_rt in the workspace + the architecture dependency graph.

Gates: clippy --workspace (pedantic+all=deny) 0/0; cargo test --workspace all
pass; cargo fmt --check clean.
Wire the `ck` binary to a REPL that boots the runtime floor and makes the
substrate observable — the first time the runtime does something drivable.

- ck_driver::run() dispatches argv; `ck --interactive` boots ck_rt and loops.
- Commands: `spawn <Name>` (spawn under root, run to completion), `stream`
  (full meta history), `state` (live actors + arena high-water), `help`,
  `quit`/`exit`. Command parse/run factored into pure, unit-tested functions;
  the stdin loop is a thin wrapper (R4 fn-LoC cap respected).
- `spawn <Name>` uses a built-in trivial behavior for now; resolving the name
  to a declared actor (and running its real behavior over the lowered HIR) is
  the next increment / order 2.
- ckc/main.rs now calls ck_driver::run() -> ExitCode.
- Registered the ck_driver -> ck_rt edge in the architecture graph.

Gates: clippy --workspace (pedantic+all=deny) 0/0; cargo test --workspace
643 passed / 0 failed; cargo fmt --check clean.
dferreira manually merged commit e82800a3a9 into master 2026-01-14 13:00:00 +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!10
No description provided.