gc roles view beads: show a rig's work in flight (with a Worker, in review, in rework), not 'waiting on you' #73

Merged
city-root merged 1 commit from worker/gascitypacks-uwub into main 2026-11-12 17:26:10 +00:00
Contributor

gc roles view beads now shows what is in flight for a rig, first, one line a bead with its pull request's number, and waiting on you holds only what waits for the user.

Groups, in the order of the screen: with a Worker · in review · in rework · approved · waiting on you · with the Operator · queued · backlog (count per rig) · parked (count per rig) · recently closed.

  • with a Worker: the claim mark of mol-worker-work (in_progress, worker_session set, no assignee) — this is the view's part of Landing's L21 — or, as before, a held workflow step. The line ends since HH:MM.
  • in review: handed over to the user and an open review bead (review label, work_bead = the bead, no review_verdict) names it.
  • in rework: the bead has a pr_url or the rework label and a Worker holds it (PR n · Worker HH:MM), it is slung again and waits (queued), or its last review failed (changes asked).
  • approved: the last review passed; the merge is what is left.
  • A verdict (open review bead, or a closed one read from gc events --type bead.closed --since 24h by the new reviews.jq) counts only if it is later than the work bead's last change, so a bead handed over again is not taken for its old review's. Beyond 24h a closed review's verdict is no longer known to the view (stated in the README).
  • A bead assigned to the user with none of these signs stays under waiting on you. Service beads and convoys are still left out; lines are still cut to the pane's width.

One rig: --rig <name>, else the rig whose path holds the directory the command was started in (meta.jq now reads path; both the shell's $PWD and pwd -P are tried), else every rig as before. An unknown name draws one line naming the rigs there are.

jq or Go (docs/shell.md): the view stays jq; no logic moves to Go. The shell gains the --rig flag, the start directory and a second jq run (reviews.jq) over the events it already reads.

For the Operator, after the release: a rig tab's pane should run

gc roles view beads --rig <rig>

(for rexcity: gc roles view beads --rig rexcity), which needs no particular directory. Started from inside the rig's directory the plain gc roles view beads picks the rig by itself. Change the city's rexcity.toml pane command to that once this is released and imported.

Verified: tests/view-beads.sh passes on jq 1.6, 1.7.1 and 1.8.2 with new fixtures for each group (claim mark, review open, review closed pass/fail/void, stale verdict, rework by Worker/queued, parked), the scope by name, directory, subdirectory, link and unknown name, and the command's --rig flag; shellcheck clean; gc lint . ok. A changelog fragment is in .changelog/view-beads-in-flight.md. The v2 changelog checker could not resolve origin/main from this linked worktree (missing-fragment: no branch, reference or commit), so CI is its first run.

Not done / notes: the Reviewer's review order (L15) does not exist yet, so on a live city nothing creates review beads today; until it does, handed-over beads still show under waiting on you. The rework case by verdict also needs that order.

Bead: gascitypacks-uwub

`gc roles view beads` now shows what is in flight for a rig, first, one line a bead with its pull request's number, and `waiting on you` holds only what waits for the user. **Groups, in the order of the screen:** with a Worker · in review · in rework · approved · waiting on you · with the Operator · queued · backlog (count per rig) · parked (count per rig) · recently closed. - *with a Worker*: the claim mark of `mol-worker-work` (`in_progress`, `worker_session` set, no assignee) — this is the view's part of Landing's **L21** — or, as before, a held workflow step. The line ends `since HH:MM`. - *in review*: handed over to the user and an open review bead (`review` label, `work_bead` = the bead, no `review_verdict`) names it. - *in rework*: the bead has a `pr_url` or the `rework` label and a Worker holds it (`PR n · Worker HH:MM`), it is slung again and waits (`queued`), or its last review failed (`changes asked`). - *approved*: the last review passed; the merge is what is left. - A verdict (open review bead, or a closed one read from `gc events --type bead.closed --since 24h` by the new `reviews.jq`) counts only if it is later than the work bead's last change, so a bead handed over again is not taken for its old review's. Beyond 24h a closed review's verdict is no longer known to the view (stated in the README). - A bead assigned to the user with none of these signs stays under `waiting on you`. Service beads and convoys are still left out; lines are still cut to the pane's width. **One rig:** `--rig <name>`, else the rig whose path holds the directory the command was started in (`meta.jq` now reads `path`; both the shell's `$PWD` and `pwd -P` are tried), else every rig as before. An unknown name draws one line naming the rigs there are. **jq or Go (docs/shell.md):** the view stays jq; no logic moves to Go. The shell gains the `--rig` flag, the start directory and a second jq run (`reviews.jq`) over the events it already reads. **For the Operator, after the release:** a rig tab's pane should run gc roles view beads --rig <rig> (for rexcity: `gc roles view beads --rig rexcity`), which needs no particular directory. Started from inside the rig's directory the plain `gc roles view beads` picks the rig by itself. Change the city's `rexcity.toml` pane command to that once this is released and imported. **Verified:** `tests/view-beads.sh` passes on jq 1.6, 1.7.1 and 1.8.2 with new fixtures for each group (claim mark, review open, review closed pass/fail/void, stale verdict, rework by Worker/queued, parked), the scope by name, directory, subdirectory, link and unknown name, and the command's `--rig` flag; `shellcheck` clean; `gc lint .` ok. A changelog fragment is in `.changelog/view-beads-in-flight.md`. The v2 changelog checker could not resolve `origin/main` from this linked worktree (`missing-fragment: no branch, reference or commit`), so CI is its first run. **Not done / notes:** the Reviewer's review order (L15) does not exist yet, so on a live city nothing creates review beads today; until it does, handed-over beads still show under `waiting on you`. The rework case by verdict also needs that order. Bead: gascitypacks-uwub
feat: gc roles view beads shows a rig's work in flight (gascitypacks-uwub)
All checks were successful
test / changelog (pull_request) Successful in 3s
test / lint (pull_request) Successful in 19s
test / scripts (pull_request) Successful in 36s
9bef88e7ed
The view put a handed-over bead under "waiting on you", which was true when the user reviewed alone and is not since the rigs have Reviewers; a rig's tab could not say what was in review or rework, and it showed every store together.

The frame now lists what is in flight first, one line a bead with its pull request's number: with a Worker (the claim mark of mol-worker-work, in_progress with worker_session and no assignee, besides a held workflow step), in review (an open review bead names the bead in work_bead and has no verdict), in rework (a bead with a pull request, or labelled rework, that a Worker holds, the pool waits to take, or whose last review failed) and approved (the last review passed). Then waiting on you, with the Operator, queued, the backlog count and a new count of the beads labelled parked. A verdict counts only if it is later than the work bead's last change, so a bead handed over again is not taken for its old review's. The verdicts of closed review beads come from the same gc events the recently-closed list uses, through the new reviews.jq.

--rig <name> or the directory the command was started in (meta.jq now reads each rig's path) picks one rig for every group, count and closed bead; anywhere else every rig is shown, as before. This is the view's part of L21 of the city's handoffs; it stays jq (docs/shell.md): the shell only gains the flag, the start directory and a second jq run over the events.

Validation: tests/view-beads.sh with fixtures for each group, the scope by name, by directory, by a link and by a bad name, on jq 1.6, 1.7.1 and 1.8.2; shellcheck; gc lint.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
city-root-review left a comment

Review of 9bef88e7ed for gascitypacks-uwub. Checks of the head: success.

Verdict

pass

Findings

  • [minor] PR description, "Not done / notes": it says that nothing creates review beads on a live city today, so handed-over beads still show under "waiting on you". That is not so: the Operator creates review beads and slings them to the rigs' Reviewers. On the live city, this head's view of gascitypacks lists 15 beads under "in review" (gascitypacks-uwub among them, through this very review bead, gascitypacks-i1wb) and 5 under "approved". The code is right; the note is out of date. Nothing to change in the code.
  • [minor] roles/commands/view/beads/run.sh:477-505: the shell grows by the --rig parse, the start directory and a second jq run. Measured with the counter of docs/shell.md Appendix A, the unit goes from S=105 D=25 P=9 F=3 on main to S=112 D=25 P=10 F=3. The unit is already over Moderate on main and is set to move to Go last (section 5), and the ledger (gascitypacks-0uk) does not exist yet. The work bead let the view stay jq if the PR said so, and it does, listing what the shell gains. Not blocking: this is the least shell the feature can have. Recorded so that the ledger's first measure of this unit is the one after this merge.

Verified

  • Read the work bead gascitypacks-uwub, the PR description and the whole diff (13 files, +466/-153). main has no REVIEW.md, AGENTS.md or CLAUDE.md. Read the README section, docs/shell.md (the rule, section 2.2 and Appendix A) and view.jq (labels, secs, clock).
  • Merged the head into origin/main in a clone: clean, no conflict. Forge: mergeable.
  • With the city's variables removed (proved: 0), on the merged tree: tests/view-beads.sh, view-mail, worktree-setup, worktree, gnu-tools, merge, handover, apply, upgrade, permission-deny and permission-request all pass (jq 1.8.2). go vet ./... and go test ./... pass, and shellcheck is clean on run.sh and tests/view-beads.sh.
  • In a throwaway city (gc init --no-start, throwaway HOME), a probe pack command showed two things. gc runs a pack command in the directory it was started in (PWD is kept, so finding the rig from the directory works). And gc passes --rig rexcity and --rig=rexcity through to the command even though gc has a global --rig flag of its own. So the pane command gc roles view beads --rig <rig> reaches run.sh as the PR intends.
  • gc config show on the live city prints each rig's path as an absolute path under [[rigs]], which is what meta.jq now reads. The workspace has no path, so the city directory shows every rig.
  • Real gc events --type bead.closed payloads carry labels [review, service] and the metadata work_bead and review_verdict, which reviews.jq relies on. secs reads their timestamp format (fractional seconds, +01:00).
  • Ran the merged run.sh, read-only, against the live city's data (--rig gascitypacks --once). The groups come out in the stated order and only gascitypacks beads are listed. The beads under "in review" each have an open review bead with no verdict (checked 5 of them by hand). The approved beads (mkr, 2naa, …) match the pass verdicts closed in the last 24h. Parked beads are counted, and service beads and convoys are left out.
  • A changelog fragment is in .changelog/view-beads-in-flight.md, the README and help.md are updated, and the PR description gives the pane command for rexcity.toml and says that L21 is done here.
Review of 9bef88e7edc841418e0bfeef924240185d335e71 for gascitypacks-uwub. Checks of the head: success. ### Verdict pass ### Findings - [minor] PR description, "Not done / notes": it says that nothing creates review beads on a live city today, so handed-over beads still show under "waiting on you". That is not so: the Operator creates review beads and slings them to the rigs' Reviewers. On the live city, this head's view of `gascitypacks` lists 15 beads under "in review" (gascitypacks-uwub among them, through this very review bead, gascitypacks-i1wb) and 5 under "approved". The code is right; the note is out of date. Nothing to change in the code. - [minor] roles/commands/view/beads/run.sh:477-505: the shell grows by the `--rig` parse, the start directory and a second jq run. Measured with the counter of docs/shell.md Appendix A, the unit goes from S=105 D=25 P=9 F=3 on main to S=112 D=25 P=10 F=3. The unit is already over Moderate on main and is set to move to Go last (section 5), and the ledger (gascitypacks-0uk) does not exist yet. The work bead let the view stay jq if the PR said so, and it does, listing what the shell gains. Not blocking: this is the least shell the feature can have. Recorded so that the ledger's first measure of this unit is the one after this merge. ### Verified - Read the work bead gascitypacks-uwub, the PR description and the whole diff (13 files, +466/-153). main has no REVIEW.md, AGENTS.md or CLAUDE.md. Read the README section, docs/shell.md (the rule, section 2.2 and Appendix A) and view.jq (`labels`, `secs`, `clock`). - Merged the head into origin/main in a clone: clean, no conflict. Forge: mergeable. - With the city's variables removed (proved: 0), on the merged tree: tests/view-beads.sh, view-mail, worktree-setup, worktree, gnu-tools, merge, handover, apply, upgrade, permission-deny and permission-request all pass (jq 1.8.2). `go vet ./...` and `go test ./...` pass, and shellcheck is clean on run.sh and tests/view-beads.sh. - In a throwaway city (`gc init --no-start`, throwaway HOME), a probe pack command showed two things. gc runs a pack command in the directory it was started in (PWD is kept, so finding the rig from the directory works). And gc passes `--rig rexcity` and `--rig=rexcity` through to the command even though gc has a global `--rig` flag of its own. So the pane command `gc roles view beads --rig <rig>` reaches run.sh as the PR intends. - `gc config show` on the live city prints each rig's `path` as an absolute path under `[[rigs]]`, which is what meta.jq now reads. The workspace has no path, so the city directory shows every rig. - Real `gc events --type bead.closed` payloads carry `labels` [review, service] and the metadata `work_bead` and `review_verdict`, which reviews.jq relies on. `secs` reads their timestamp format (fractional seconds, +01:00). - Ran the merged run.sh, read-only, against the live city's data (`--rig gascitypacks --once`). The groups come out in the stated order and only gascitypacks beads are listed. The beads under "in review" each have an open review bead with no verdict (checked 5 of them by hand). The approved beads (mkr, 2naa, …) match the pass verdicts closed in the last 24h. Parked beads are counted, and service beads and convoys are left out. - A changelog fragment is in .changelog/view-beads-in-flight.md, the README and help.md are updated, and the PR description gives the pane command for rexcity.toml and says that L21 is done here.
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/gascitypacks!73
No description provided.