Limit the git lines that bin/handoff pickup prints #1543
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1543
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
bin/handoff pickupinjects git lines with no size limit. On 2026-11-04 in cc-os, a pickup printed 15worktree:lines, and most named oldagent-*worktrees that the handoff did not mention. That output costs about 1.3 KB on each pickup. A large working tree printed 26status:lines.commit <sha>:lists every branch that holds the commit, so an old SHA can list many branches.Reproduce
Approach
Required work:
Handoff::LiveState, print aworktree:line only when the full handoff text names that worktree's path or branch. Match the branch as a whole word.PickupCommandgivesLiveStatethe full text for this filter. References for tickets, commits, and paths still come fromDocument#progress. — check: presentworktreeinplugins/os/lib/handoff/live_state.rbHandoff::WorkingState, print at most 20status:lines, then onestatus: +N moreline. This applies topickupandprepare. — check: presentmoreinplugins/os/lib/handoff/working_state.rbcommit <sha>:line, printon mainalone whenmainholds the commit, oron masteralone whenmasterholds it andmaindoes not. Otherwise print the first three branches, then+N morewhen more exist. — check: present+inplugins/os/lib/handoff/live_state.rb/os:pickup, state that aworktreeline prints only for a worktree that the handoff names. — check: presenthandoff namesinplugins/os/skills/pickup/SKILL.mddocs/implementation-status/os.md— check: present#1543indocs/implementation-status/os.mdAcceptance criteria
pickupruns, then the output has aworktree:line for that worktree and none for the other.## Progress, whenpickupruns, then the output has aworktree:line for it.pickupruns, then the output has noworktree:line for that worktree.pickuporprepareruns, then the output has 20status:file lines andstatus: +5 more.pickupruns, then the output has 20status:lines and no+line.mainand on another branch, whenpickupruns, then its line sayson main |, with no other branch.pickupruns, then its line names the first three branches and+2 more.Owner sketch
Origin
plugins/os/lib/handoff/live_state.rb, #1542)VERDICT: CREATE
Work started on branch ticket-1543.
Resolution
Done: pickup prints a worktree line only for a worktree the handoff names; status stops at 20 lines plus a count; a commit on main prints main alone, otherwise three branches and a count.
Evidence: main
3dbcc38a; plugins/os suite 236 runs, 0 failures; rubocop clean; worktree lines fell from 15 to 0 on a test handoff. Hand-finished after implementation 229 escalated; one design audit run, findings fixed or answered.Follow-ups: map red-round rule on a green-by-design boundary test captured through /os-backlog:capture
Correction: the close comment cites main
3dbcc38a, but that commit was not on main at close time. worktree finish had exited 2 because main moved. The merge landed after the close; the merge commit on main is0ae8ec37, and the suite passes there with 236 runs and 0 failures.