Cut Handoff -> Dispatch: Handoff.unclaimed takes the claimed ids #1171
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#1171
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
The Handoff concept calls into the Dispatch concept.
Handoff.unclaimedexcludes handoff ids that some dispatch received. It queriesDispatchfor them (handoff.rb:16). The only caller isImplementation#claim_handoff(implementation.rb:92). The edge Handoff -> Dispatch lies on 21 concept cycles.Dispatchshould own the query for claimed ids.Reproduce
n/a: structure-wave cut, nothing to reproduce
Approach
Required work:
plugins/os-sdlc/lib/os_sdlc/dispatch/queries.rb, addclaimed_handoff_idstoDispatch::Queries. It returnsexclude(received_handoff_id: nil).select(:received_handoff_id). Move the comment about NOT IN and NULL with it — check: presentclaimed_handoff_idsinplugins/os-sdlc/lib/os_sdlc/dispatch/queries.rbplugins/os-sdlc/lib/os_sdlc/handoff.rb, change todef unclaimed(claimed_ids) = exclude(id: claimed_ids)— check: absentDispatch.excludeinplugins/os-sdlc/lib/os_sdlc/handoff.rbplugins/os-sdlc/lib/os_sdlc/implementation.rb, changeclaim_handofftohandoffs_dataset.targeting(agent_type).unclaimed(Dispatch.claimed_handoff_ids).oldest.first— check: presentclaimed_handoff_idsinplugins/os-sdlc/lib/os_sdlc/implementation.rbunclaimedcalls inplugins/os-sdlc/tests/handoff_test.rbto passDispatch.claimed_handoff_ids.Acceptance criteria
bin/crc-cycle-edgesruns, then no edge Handoff -> Dispatch listshandoff.rb:16.claim_handoffruns, then it returns the other handoff.unclaimedruns with the claimed ids, then the handoff is not in the result.Owner sketch
Pinning tests:
tests/handoff_test.rb,tests/pipeline/cli_subagent_start_test.rb.Non-goals
S8 lands before S7. S8 and S7 share
lib/os_sdlc/handoff.rbandtests/handoff_test.rb.Retired tests
plugins/os-sdlc/tests/handoff_test.rb#test_unclaimed_targeting_only_includes_the_matching_implementation_and_agent_type
plugins/os-sdlc/tests/handoff_test.rb#test_a_claimed_handoff_reaches_its_receiving_dispatch_and_leaves_unclaimed
Origin
049a7820)VERDICT: CREATE
Work started on branch crc-os-sdlc-run-3 (os-sdlc CRC run 3, structure wave step 1).
Resolution
Done: Handoff.unclaimed takes the claimed ids; Dispatch.claimed_handoff_ids supplies them; Implementation#claim_handoff joins the two, so handoff.rb no longer names Dispatch.
Evidence:
c338c251(runner),b134eb31(restored scoping test); suite 2248 runs 0 failures (42.4s); rubocop on changed files clean; no Handoff -> Dispatch edge in crc-cycle-edges; inward delta 242 -> 242, only the #1174 rename pairsFollow-ups: none