go: Phase 10 closed — sister plans cross-referenced [nothing]
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 32s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 32s
plans/lib-guest-scheduler.md and plans/lib-guest-static-types- bidirectional.md both have Phase 1 ticked complete from Go's side with status blocks enumerating what landed. Each sister diary received a consolidated chisel-summary entry: the kit primitives the Go consumer chiselled out, the three pluggable predicates / orthogonal first-class-tag axes, and the v0 limitations the eventual kit must lift. No new Go code — Phase 10 is doc-only per plan. Go-on-SX loop fully landed: 11 phases, 7 test suites, 609/609 passing. Two-consumer rule per sister plan now waits on TypeScript (Phase 2 of the bidirectional sister plan, owned outside this loop). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -144,13 +144,22 @@ This is a long-running plan paced against Go-on-SX. Phases are not loop-style
|
||||
- **Output:** clear-eyed mental model. Without this, we'll merge Erlang's
|
||||
scheduler shape into the kit and pretend it generalises.
|
||||
|
||||
### Phase 1 — Go scheduler independent implementation ⬜
|
||||
### Phase 1 — Go scheduler independent implementation ✅
|
||||
- During Go-on-SX, implement `lib/go/sched.sx` from scratch. Do NOT look at
|
||||
Erlang's scheduler while doing this. (Or read it once, then close it.)
|
||||
- Pass Go's channel + goroutine + select conformance tests.
|
||||
- **Acceptance:** Go scheduler green, lib/go/scoreboard.json includes scheduler
|
||||
tests, two-consumer rule now passable.
|
||||
- **Output:** two independent, working implementations of the same idea.
|
||||
- **Status (2026-05-28):** Done. `lib/go/sched.sx` ships channels as
|
||||
closure-bundles `(:go-chan SEND RECV CLOSED? CLOSE! LEN)` sharing a
|
||||
mutable buffer + closed flag. Goroutines: `go` stmt is v0-synchronous
|
||||
(no real preemption — flagged Phase 5b). select dispatches by source
|
||||
order picking first ready case; default makes it non-blocking;
|
||||
blocking-no-default returns `:select-blocked-no-default` sentinel.
|
||||
40 runtime tests + 12 e2e programs use the scheduler primitives.
|
||||
**Two-consumer rule passable** — Erlang's scheduler and Go's
|
||||
scheduler both exist as independent implementations.
|
||||
|
||||
### Phase 2 — Diff and proposed kit ⬜
|
||||
- Side-by-side diff: Erlang's scheduler vs Go's scheduler. Where do they
|
||||
@@ -231,6 +240,50 @@ real result.
|
||||
|
||||
_Newest first. Append one dated entry per milestone landed._
|
||||
|
||||
- 2026-05-28 — **Go-on-SX consumer-side surface fully landed (609/609
|
||||
tests across 7 suites).** This is the Phase-10 cross-reference
|
||||
entry: with all of Go's lex+parse+types+eval+sched+stdlib+e2e
|
||||
proven independent of the eventual kit, the scheduler-kit
|
||||
surface that emerged from this consumer is:
|
||||
|
||||
**Primitives (locked in):**
|
||||
1. `(:go-chan SEND RECV CLOSED? CLOSE! LEN)` — closures-over-
|
||||
mutable-state channel. Identity matters (distinct `make()`
|
||||
calls produce distinct closures, `(= ch1 ch2)` false).
|
||||
2. `(:go-defer CALLEE FROZEN-ARGS)` — frame-attached cleanup
|
||||
record. Args evaluated at defer-time; call deferred to
|
||||
frame exit.
|
||||
3. `__go-defer-stack` — frame-local mutable list of
|
||||
defer records. Drained LIFO at frame exit by `go-run-defers!`.
|
||||
4. `__go-panic-cell` (STATE V) — frame-attached out-of-band
|
||||
channel. STATE ∈ {:none, :raised, :recovered}. `recover()`
|
||||
walks env chain to find the outermost :raised cell.
|
||||
5. `(:go-panic V)` — propagating sentinel.
|
||||
6. v0 stub `after(d)` — channel already buffered with `:tick`.
|
||||
Real time becomes a refinement of *when* readiness flips,
|
||||
not of the protocol.
|
||||
|
||||
**Cross-cutting abstractions (chiselled):**
|
||||
- **Readiness protocol** (sched-pick): `select` consults
|
||||
`ready?` over its cases; send/recv/timer/etc. all factor
|
||||
through one predicate. See 2026-05-27 entry.
|
||||
- **Frame-cleanup queue vs scheduler ready-queue** — distinct
|
||||
orthogonal slots; conflating them was an early temptation
|
||||
and stays explicit in the design.
|
||||
- **Control-flow sentinels unify** at every AST boundary
|
||||
(block, for, range-for, stmt-catch-all, program-loop): each
|
||||
needs the same `propagates?` predicate inline. Kit should
|
||||
expose ONE helper instead of N inline arms.
|
||||
|
||||
**v0 limitations the kit must lift** (durable in commit trail):
|
||||
- Real preemption (Phase 5b — needs reified execution state)
|
||||
- Buffered/unbuffered channel distinction (currently unbounded)
|
||||
- select fairness (currently source-order; spec wants random)
|
||||
- Real-time clocks for `after`
|
||||
|
||||
Next sister-plan-owned step is Phase 2 (diff + propose kit)
|
||||
with Erlang's existing scheduler as the second consumer.
|
||||
|
||||
- 2026-05-27 — **Phase 6 closed: control-flow-sentinel unification
|
||||
observation.** After wiring panic propagation through 4 sites
|
||||
(go-eval-block, go-eval-for, go-eval-stmt's catch-all, go-eval-
|
||||
|
||||
Reference in New Issue
Block a user