Skip to content

v0.6.0 — Task Lifecycle Correlation, Execution Identity & Reproducible Journals

Choose a tag to compare

@xenups xenups released this 30 Oct 10:13
· 93 commits to main since this release
485643b

Task lifecycle correlation, execution identity and reproducible journals

Every real execution in Asha now has an identity and a reconstructable trace:
one task_id, one run_id, one worker_id and one execution_id per actual
process, correlated through the journal instead of guessed from timestamps.

Added

  • Task lifecycle correlation — telemetry.with_correlation() is the single
    correlation helper; ids ride inside payload, so the five-field event record is
    unchanged and legacy journals stay readable. It never fabricates an id and
    fails closed on a conflicting value, so two tasks can never share an event.
  • Execution identity for the worktree / CLI / DAG runner — one
    exec-<12hex> per launched worker command, minted at the launch site and
    carried on the settled state, on timeout and on execution-error outcomes.
    MCP dispatch passes the id it already owns, so one command never carries two
    identities. A blocked or deferred worker gets none.
  • Per-check validation identity — run_validation_commands mints one id per
    check at the real subprocess.run boundary and records it only when a process
    actually started.
  • run_spec journal lifecycle — the DAG coordinator emits
    execution_started per dispatched worker, exactly one
    sealed/execution_failed per settled worker, and exactly one task-level
    terminal event (payload.scope == "task") only after every worker settled.
    EventJournalWriter now serialises concurrent appends, so N workers writing
    into one run journal cannot interleave records. A journal that cannot be
    opened aborts the tool call before anything executes; a journal write error
    propagates instead of being read as success.
  • CLI run --spec writes the same journal.

Compatibility

Event vocabulary unchanged (execution_started / sealed /
execution_failed); no payload field removed or retyped; new ids and
payload.scope are additive. Journal reading, JournalIntegrity and corruption
reporting unchanged. No public MCP tool-schema change (new test seams are
keyword-only).

Verification

  • Full suite 1192 passed, 4 skipped, 0 failed (was 1167 + 4; the +25 are
    exactly the new tests), CI verify and fail-closed governance gate both
    green on the merged head.
  • End-to-end over the real stdio MCP transport, 9 scenarios: single dispatch,
    two independent dispatches, multi-check validation, failing check, run_spec
    with one worker / two concurrent / one failing / all failing, a blocked worker,
    and an unwritable journal. Concurrency is asserted from real journal timestamp
    overlap; the 100-append / 4-thread test keeps every record parseable.
  • One calibration bound moved (K.6.1 T1 stub budget 82000 → 84000) because the
    new DAGCoordinator helpers grew that signature stub 2170 → 3159 bytes with
    the target body and stub count unchanged — measured, documented in the test,
    no assertion removed.

Known limits

  • No retry/attempt loop exists: one dispatch is one attempt (unchanged).
  • A hard kill between events leaves a truncated journal; integrity reports the
    truncation and no synthetic terminal event is written.
  • Phase 2 (centralized timeout handling) is planned but not part of this
    release; the known validation-timeout launched debt is documented there.