Skip to content

task layer: no introspection of scheduler decisions — a gated task_sched_trace seam #846

Description

@InauguralPhysicist

Found building eddy's interleaving explorer (eddy#6, fleet UI ladder rung 4; ledger entry F-EDDY-06).

The gap. A schedule visualizer wants "who ran when": run segments (resume → yield), the seeded ready-queue's pick order, and sleep/virtual-time wakeups. None of that is visible to .eigs code. eddy derives lanes from app-level records — op invoke/ok pairs on its logical clock plus explicit marks at each task_yield call site — which works only because eddy owns every yield site. A consumer that loads third-party task code, or wants to visualize task_sleep/virtual-clock scheduling (liferaft's cluster sim is the obvious second consumer), cannot hand-instrument every site. True run segments are simply not drawable today.

Proposal shape. A gated task_sched_trace seam, off by default like the observer/trace flags: when enabled, the runtime records {tick, resumed task id, cause: spawn|yield|sleep-wake|join-release|kill} into a history readable from .eigs (or emitted like --viz-events). Two hard constraints from the DST discipline:

  • Pure reader: enabling it must not perturb the seeded pick sequence — a run with tracing on must be byte-identical to the same seed with it off (eddy's gate would assert this the way it asserts sink purity today).
  • Tape-aware: records derive from the deterministic schedule, so they must NOT be tape N-records; a traced run under EIGS_REPLAY must reproduce them (the trace-tape engineer's Design: trace-tape format versioning — the tape is becoming a persisted artifact #411/tape-first review applies).

Two consumers waiting: eddy's explorer (upgrade derived lanes → true segments) and liferaft's visualizer (task-level view under the Raft sim). Not urgent — the derived view ships fine — but the surface is a real blind spot the fleet UI ladder keeps walking past.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions