Repository navigation
fix: teammate-idle counts only the lane's own scope and says it once (#97, #98) - #101
Conversation
…97, #98) The hook counted the open tasks of STATE.md's current_milestone and exited 2 at every idle turn while any was open, so coordinator lanes looped on an old open milestone (M034) outside their brief. It now counts only the lane the teammate holds (its claimed or running LANES.md row, else the M###-S##[-T##] in its name), skips done, dropped, shipped-informally and backlog milestones, stays silent without a known scope, and says the same teammate, lane and count once per session (idle-said in the session home). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…fix (#97, #98) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e07d06168e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| SCOPE=$(printf '%s\n' "$MINE" | awk -F '\t' '$2 == "claimed" || $2 == "running" { print $1; exit }') | ||
| else | ||
| SCOPE=$(printf '%s\n' "$TM" | grep -oE 'M[0-9]{3}-S[0-9]{2}(-T[0-9]{2})?' | head -1) | ||
| ACTIVE=$(printf '%s\n' "$ROWS" | awk -F '\t' '$3 != "" && $3 != "-" && $2 != "merged" && $2 != "dropped" { print substr($1, 1, 4) }') |
There was a problem hiding this comment.
Exclude blocked rows from the held-milestone filter
When a team-mode teammate has no row of its own and LANES.md retains a blocked lane from an earlier milestone, this filter still adds that lane's milestone to ACTIVE because it excludes only merged and dropped. bin/ytstack-frontier does not classify blocked as held, and changing a row to blocked does not clear its Claimed by value, so line 61 rejects a valid current teammate name such as impl-M046-S01 and the hook silently omits its open-task reminder. Restrict ACTIVE to the actual held statuses before applying the milestone guard.
Useful? React with 👍 / 👎.
… last said count (#97, #98) - the name fallback stays silent when the named lane has any row in LANES.md (another holder, released, dropped), and the ref must stand alone in the name - LANES.md is read from the main checkout through yt_lanes_file, shared with ytstack-upkeep - speaks when the count differs from the last one said (2 -> 1 -> 2 is said) - stop prunes 14-day-old session dirs holding only idle-said and/or stop-said - spec text matches the code (first word, yt_artifact_path) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…_lanes_file Co-Authored-By: Claude Opus 5.5 <[email protected]>
- yt_lanes_file is the unified resolver (also for PR #101's callers): out-of-tree file, else the main checkout's LANES.md, else <yt_dir>'s (no snapshots), else the out-of-tree path; prints the path and sets YT_LANES_FILE/YT_LANES_SOURCE - migrate takes the main checkout's copy, refuses while a worktree's copy differs, marks both; migrate --from <old path|key> for a moved checkout; where says how to recover - goal: coordinate sets --rounds 30; ytstack-goal calls do not re-arm; the stop goes through once every open slice waits for a person; a stale or unreadable running row is no background work; any Stop-hook block leaves its transcript offset; scan at most 2 MB; --if-unset replaces a reached goal; hooks/stop prints through python without jq before a message counts as said - upkeep: merge-commit subjects no longer give "##N" - docs: QUICKSTART, README, coordinator-format example, evals note Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve against #101: keep the unified yt_lanes_file (out of tree first, then the main checkout's non-snapshot LANES.md) and drop #101's duplicate; keep both CHANGELOG sections and DECISIONS entries; spec row and test lists carry both idle-said and goal mode. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat: the host is the ledger of a lane; lanes file out of tree (#79) A lane's state is its pull request, read fresh. What only the coordinator knows lives in one lanes file per repository, out of tree at ${XDG_STATE_HOME:-~/.local/state}/ytstack/repos/<repo key>/LANES.md, resolved by yt_lanes_file for every reader (frontier, stop lint, upkeep, status --phases, finish-lane route, coordinate/finish-lane/lane-retro preambles). - ytstack-frontier where | migrate | snapshot; a repo LANES.md without a snapshot: key stays the lanes file until migrate (LANES_MIGRATE in the coordinate preamble) - finish-lane bundles roadmap tick, decisions and the milestone snapshot on the lane branch before the push - ytstack-upkeep: bookkeeping section, days with more than 3 merged PRs that changed only .ytstack/ (local refs) - coordinate 0.8.0, finish-lane 0.8.0, lane-retro 0.2.1, spawn-milestone-team 0.5.3; DECISIONS, spec, docs, CHANGELOG - tests isolate XDG_STATE_HOME; widen a timing-sensitive heartbeat check Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat: goal mode keeps a long-running session working (#99) ytstack-goal set <M###>|"<sentence>" writes a goal marker out of tree (<session home>/<id>/goal). The Stop hook holds the stop while the goal is open, naming open slices, the milestone's exit criteria, missing files and failed checks, and lets it through for an asked question, a recorded blocker (ytstack-goal block), a running lane or a PR watched for this session, or a reached bound (--until, --rounds), said once. Inside a hook-continued turn it blocks again only after a tool call in the transcript, so it cannot loop; a standing or lint block comes first. - ytstack-goal set | status (runs --check) | block | clear | hook - coordinate 0.9.0: sets the current milestone as the goal (--if-unset), checklist item 14 clears it; Codex uses its native /goal - DECISIONS, spec, coordinator-format "Goal mode", docs/codex.md, CHANGELOG - spec dependencies verified_at moved (git-ctx resolver only, no dependency change) Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: coordinate names no host in its goal-mode instructions (#99) tests/codex_plugin_test.py allows another host's name only in shell comments; the goal lines now say "a host with its own /goal". Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: review of PR #102: main checkout first, bounded goal, person waits - yt_lanes_file is the unified resolver (also for PR #101's callers): out-of-tree file, else the main checkout's LANES.md, else <yt_dir>'s (no snapshots), else the out-of-tree path; prints the path and sets YT_LANES_FILE/YT_LANES_SOURCE - migrate takes the main checkout's copy, refuses while a worktree's copy differs, marks both; migrate --from <old path|key> for a moved checkout; where says how to recover - goal: coordinate sets --rounds 30; ytstack-goal calls do not re-arm; the stop goes through once every open slice waits for a person; a stale or unreadable running row is no background work; any Stop-hook block leaves its transcript offset; scan at most 2 MB; --if-unset replaces a reached goal; hooks/stop prints through python without jq before a message counts as said - upkeep: merge-commit subjects no longer give "##N" - docs: QUICKSTART, README, coordinator-format example, evals note Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Root cause
hooks/teammate-idlereadcurrent_milestonefromSTATE.md(the lead's pointer, here an old open milestone M034) and counted the unchecked tasks of every slice plan of it. It exited 2 whenever that count was above zero and kept no record of what it had said. The TeammateIdle payload has no loop guard likestop_hook_active, so every idle turn of every lane got "13 task(s) still open in milestone M034". That happened even when the lane was dispatched for M046, had reported, or had been confirmed by the lead.Fix
LANES.mdrow whoseClaimed bystarts with the payload'steammate_name, and it counts only while the row isclaimedorrunning. Any other status of the row means the work is in, and the hook stays silent. Without a row (team mode claims no lanes), theM###-S##[-T##]in the teammate's name counts. WhenLANES.mdhas held lanes, that milestone must be one of theirs. A slice counts its uncheckedT##boxes, a task counts its own box.done,dropped,shipped-informallyorbacklog, and stays silent with no scope, no session id or no teammate name.<session home>/<session-id>/idle-said(same pattern asstop-said). If progress changes the count, it gives one new message. It stays silent when it cannot record what it said.spawn-milestone-team0.5.3 names team-mode teammates after their slice (impl-M004-S02). That keeps the useful case: a teammate whose own slice still has open tasks.hooks-and-state(table, rules, written files, tests),skills(team row), andchecks-and-evals(verified_at). Also a DECISIONS entry and a CHANGELOG Fixed entry.Verification
tests/hooks-teammate-idle.test.sh(new) reproduces both issues. Against the old hook:7 passed, 23 failed. Against the new hook:30 passed, 0 failed.tests/hooks-worktree.test.sh32 passed,tests/hooks-readonly.test.sh108 passed (updated to name the teammate).bash tests/run-all.sh(bash 3.2, Darwin): ALL SUITES PASSED.bash tests/run-all.sh --linuxfrom agit archive HEADexport (bash 5.3, alpine): ALL SUITES PASSED.python3 bin/ytstack-check: OK (with 9 warnings, as on main).bin/ytstack-spec lint: 0 failures.bin/ytstack-spec drift: no area to look at.Closes #97
Closes #98
🤖 Generated with Claude Code