feat(council): live observability — status --watch + tail#13
Merged
Conversation
Add a pure tail domain for selecting log bytes and formatting task log output from deterministic inputs: stream, byte offset, bounded buffer size, `--lines`, `--since`, truncation/rotation handling, and follow cursor advancement.
Extend the existing status workflow domain with a pure `projectRunView` function that folds `RunSummary` tasks/waves, runstore lifecycle events, optional supervisor snapshots, worker results, and an injected clock into a deterministic `RunView`. The view must include per-task state, attempt, restarts, model tier, last detection, started/updated timestamps, duration, wave, dependency satisfaction, and run rollups for counts by state, ready set, critical path, and elapsed time.
Close the lifecycle event metadata gap by adding backward-compatible optional output timestamps and log paths to `WorkerOutputPayload`, codec validation, worker trace projection, composition event mapping, and RunView freshness handling.
Build pure renderers for `RunView`: compact human table with deterministic badges/colors, wave grouping, durations, active detections, rollups, and a stable JSON snapshot formatter for machine output.
Add a thin filesystem adapter/port for live status inputs that loads a run directory's normalized summary, durable events, worker supervisor snapshots, and worker results while treating missing optional files as partial data instead of fatal errors.
Implement a thin live status workflow that uses the live run artifact reader, `projectRunView`, and status renderers to support one-shot JSON/table snapshots and watch polling through an injected ticker.
Implement a thin tail workflow that resolves a task log from live run artifacts/result/snapshot/event metadata, reads bytes through an injected log reader, applies the pure tail domain, and supports follow mode through an injected ticker.
Wire live status into `CouncilApp` and `cli/index.ts`: preserve existing `app.status` summary behavior, add an app live-status method, parse `council status --run <dir> --json|--once|--watch [--interval-ms N]`, and route outputs through the status watch workflow.
Wire `council tail <task>` into `CouncilApp` and `cli/index.ts` using the tail follow workflow, removing only the tail placeholder while preserving other unimplemented command placeholders.
Update parity, self-test, render doctor, and manifest validation surfaces so the implemented `status` and `tail` commands are treated as real council command surface, not placeholders.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds live, glanceable observability for in-flight runs, built on the durable events the native executor emits — retiring "1 shell running" opacity. 10-task all-codex fanout, 100% line/stmt/func coverage (576 tests), all gates green.
council status --watch: polls a run dir, re-projects, renders a compact live table (states, durations, active detections, wave grouping);--json/--once.council tail <task>: follows a worker log from a byte offset with bounded buffer +--since/--lines.All gates green: tsc, eslint (0 warn), dependency-cruiser, vitest 100%, render --check, manifest validate, self-test.