Move the PostToolUse pending-dispatch lookup from the hook into the runner [capture] #576
Labels
No labels
P0
P1
P2
P3
bug
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
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#576
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?
Context
The new
Sdlc/RequireInMethodcop (added 2026-09-14, branch require-hygiene) flagsrequire "os_sdlc"insideload_runner_libinplugins/os-sdlc/hooks/post_tool_use.rb. The hook does its cheap checks (Agent tool call,async_launched, pipeline DB file present) and then, still in-process, loadsos_sdlc, connects to the pipeline DB, and callsmodels.dispatch.pending_dispatch_forbefore it pipesnextto the runner. The hook's header comment names this lookup as a runner concern deferred from #550. Arubocop:disable Sdlc/RequireInMethoddirective now marks the line.Observed
The hook holds four methods that exist only to reach the pipeline DB:
load_runner_lib,models_for,dispatch_lookup,pending_dispatch. That is a database query living in a hook that ADR-0172 defines as a pipe.Reproduce
n/a: design ticket. The directive suppresses the offense; the smell stays.
Expected
The hook keeps only the cheap checks and always pipes
nextwhen they pass. The runner performs the pending-dispatch lookup and answers empty when nothing is pending. The four methods and the directive leave the hook.Illustration
Cost to weigh: one runner boot per async Agent launch in a session that has a pipeline DB, even when no dispatch is pending. Measure hook wall time before and after; the pre-existing
dispatch_ready?gate already excludes every project without a pipeline DB.Origin
bundle exec rubocop --only Sdlc/RequireInMethod lib bin hookson branch require-hygiene, 2026-09-14# rubocop:disable Sdlc/RequireInMethodon the require line with the reasonload_runner_lib/pending_dispatch