Repository navigation
task-monitor 1/6: snapshot --json collector (bash) and schema - #280
Merged
Merged
Conversation
…sk-monitor-snapshot New canonical root binary `bin/task-monitor-snapshot` prints one JSON document (schema 1) per repo, or with --all for every repo radio knows: in flight (worktree sidecars joined to radio sessions, PRs and the latest review intent), next (PM queue, else the tracker fallback), done (merged PRs that deliver an item, last 24h or last 10, cached once on disk), and exactly three attention signals. --local makes no forge call: `gh` is shadowed by a failing function and the run merges with the last full run's cache. Per-tracker behaviour is three new hooks with _default.sh bodies: aw_tracker_item_describe, aw_tracker_pr_item, aw_tracker_next_fallback. The parity suite checks them for every impl. Text extraction is awk (lib/monitor-text.sh), assembly is jq (lib/monitor-assemble.jq), and the whole thing runs on /bin/bash 3.2. Also: aw_task_fm moves from bin/task-board to lib/task-file.sh for reuse, aw_main_repo_root is factored out of aw_main_repo_name, and all seven installers link the new binary. Schema documented in docs/task-monitor-schema.md with an example; README, workflow templates and CHANGELOG updated. Closes #273 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
Spec compliance (#273)CI ran on head Deliverables, checked against the issue:
Nothing from the spec is missing. Code-review findingsAll of these are small and fixable inside this PR.
Verdict: clean-with-nitsThe implementation is solid and matches the spec, and the tests and CI are real. Finding 1 is the one I would not merge without. Findings 2–5 are quick doc or comment fixes. PM decides on the merge. |
…s review round 1 - worker-awaiting needs a heartbeat younger than radio orphans' 1h, so a crashed tab cannot keep a repo lit. - The unread count drops the alias-inbox branch: an alias owns no inbox, radio delivers its mail to the primary. Documented in the schema doc. - session.since is renamed last_heartbeat, which is what it is. - Same-second messages are ordered by the radio log's send lines, since a radio id ends in a random suffix and cannot break the tie. - forge.available: false for a repo whose forge has never answered (no GitHub remote), instead of a permanent stale. - The gh Next fallback is one paginated GraphQL query: open issues only, no archived items, no issues with sub-issues, ordered by the project's Priority field when it has one. The comment says API order is not board order. - A missing radio log no longer aborts the run under pipefail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… on jq 1.7 and newer shellcheck - lib/monitor-assemble.jq: parenthesize the `available` comparison. jq 1.7.1 (ubuntu-latest) rejects `!=` as a bare object value; jq 1.8 accepts it, which is why it passed locally. Reproduced with a 1.7.1 binary, and the suite passes under it. - bin/task-monitor-snapshot: the radio-log guard is an `if` instead of `A && B || true` (SC2015 on CI's shellcheck). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
A new command,
task-monitor-snapshot, prints one JSON document saying what is in flight, next and done in a repo, each with a title and a plain description, and whether the repo needs you. It reads everything from radio's state, the worktree sidecars, the tracker and GitHub, and no model writes any of it. Its--localmode never calls GitHub, so the coming front end can refresh instantly on file changes.Closes #273
What
bin/task-monitor-snapshotprints"schema": 1for the current repo, or with--allfor every repo a radio session names. Repos run in parallel..<slug>.infosidecar, joined to its radio session, its PR (by thetask/<slug>head), a status word from the latest review intent, and its attached reviewers.$TASK_FORCE_HOME/monitor/<repo>/prs/.--alsoaliases count toward the primary), a review waiting on merge, and a worker inawaiting.--local:ghis shadowed by a failing function, and the run merges with the last full run's cache. A full run whose forge call fails keeps the last result and marks itstale._default.shbodies:aw_tracker_item_describe,aw_tracker_pr_itemandaw_tracker_next_fallback, overridden by gh, local and jira.tests/loadout_modules.batschecks that they resolve for every impl.lib/monitor-text.sh(awk paragraph and## Summaryextraction, no large-string substitutions, per task-remove hangs at 100% CPU in _la_strip_line under bash 3.2 with a UTF-8 locale #266) andlib/monitor-assemble.jq(the join).aw_task_fmmoved frombin/task-boardtolib/task-file.sh, andaw_main_repo_rootwas factored out ofaw_main_repo_name.~/.local/bin/task-monitor-snapshot(shared, drift-guarded stanza).docs/task-monitor-schema.md, an example JSON from this repo, a README section, all seven workflow templates plus.claude/gh-workflow.md, and CHANGELOG.Decisions worth a look
review-waiting-mergestays quiet. Otherwise a cold--localrun lit groppo with seven old reviews.staleis an explicit "did the forge answer this run" flag. A timestamp comparison was flaky when two runs fell in the same second.gh project item-listreturns, which is not guaranteed to be board order.Verification
./run_tests.sh: 1424/1424 pass. The newtests/task_monitor_snapshot.batshas 39 tests, each run under/bin/bash(3.2 here).tools/check-drift.shclean, andshellcheck -xclean on the changed shell files.TASK_FORCE_HOMEcopy,/bin/bash3.2:--allover 4 repos takes about 10s, and a single-repo--local0.65s.🤖 Generated with Claude Code