Callers stop asking Project for a default target; Facts#bound_target crashed every enriching hook on shaped projects (#795 regression) #803
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#803
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
#795 (commit
150727e8) removed the flat default target fromProject.Project#target(nil)now raisesTargetSelectionErroron a project whose yaml has named targets. Three callers still ask for the default target. The first,Brief::Facts#bound_target, runs in the SubagentStart hook for every pipeline node that enrichestest_changesorcode_changes. Claude Code swallows a failing hook, so the agent starts with no brief and no dispatch id.Observed
Implementation 61 (#796) on the os-sdlc target. Two test-reviewer dispatches returned without a brief.
Backtrace:
model/project.rb:32 Project#target←query/brief/facts.rb:114 Facts#bound_target←Facts#codebase←Facts#changes←Facts#test_changes.Reproduce
Approach
Callers read the bound target from the object that knows it, never from
Projectwith no name.Required work:
Brief::Facts#bound_targetreturns@implementation.target(the accessorcommand/gate/run.rb:55already uses). — check:! grep -n "project.target(nil)" plugins/os-sdlc/lib/os_sdlc/query/brief/facts.rbProject#status_lineno longer callstarget(nil): its one callercommand/cli/project_config_command.rb:91prints one line per target for a shaped project. — check:bin/os-sdlcproject listing on this repo exits 0Project#resolved_lint_configtakes the target name or reads it from its callercommand/autocorrect_prepass/pass.rb:35. — check:! grep -n "target(nil)" plugins/os-sdlc/lib/os_sdlc/model/project.rbruby plugins/os-sdlc/tests/all.rbRejected: restore a flat default target on Project. #795 removed it on purpose; the run's target belongs to the Implementation.
Acceptance criteria
Owner sketch
Non-goals
Item 1 is hand-fixed in this session on branch hotfix-795-bound-target; items 2 and 3 stay open on this ticket.
Origin
150727e8removed the flat default targetVERDICT: CREATE
REASON: Root of the #795 regression; Facts#bound_target crash breaks every enriching pipeline node live on #796; hard floor.
Item 1 hand-fixed and merged to main at
b4700987(commitced9837e): Brief::Facts#bound_target reads @implementation.target. Items 2 and 3 (status_line, resolved_lint_config) stay open.Work started via /os-sdlc:implement on branch ticket-803 (worktree .claude/worktrees/ticket-803) for items 2-3. Finding: AutocorrectPrepass has no production caller and load_shared returns a single target, so item 3 does not crash live; the P0 crash was item 1, already on main.
Fourth caller found live: ObjectionIntake#changed_test_paths (command/objection_intake.rb:54) called Project#target(nil); every os-sdlc-subagent-stop on this repo exited 3 (TargetSelectionError), so no pipeline agent could settle. Hotfixed to implementation.target and merged to main at
6cf71459(suite 1333 runs, 0 failures). Implementation 65 then hit the #773 phantom dispatch on resume (dispatch 664 shadows settled 663); waiting for the stall directive.Resolution
Done: Item 1 (Brief::Facts#bound_target) was hotfixed earlier (
ced9837e). A fourth caller, ObjectionIntake#changed_test_paths, crashed every os-sdlc-subagent-stop on shaped projects; hotfixed to implementation.target at6cf71459. Items 2-3 in1a402f01: Project#status_line prints one line per target; Project#resolved_lint_config takes a target name.Evidence: Implementation 65: test-reviewer passed the new test tests/model/project_shaped_listing_test.rb; behavior-verifier passed 3 times; suite 1334 runs 0 failures by hand (49.7s). The suite gate escalated only on the 47 s wall-clock budget under load 10.4, so the run was hand-finished. os-sdlc project-config --show --target os-sdlc exits 0 and prints all six targets.
Follow-ups: #813 suite gate fails green suites under load (captured, user-approved). Dropped: resolved_lint_config(target_name = nil) keeps a nil default but has no production caller (AutocorrectPrepass is test-only); target_status is public; both minor, not ticketed. #773 phantom dispatch on resume recurred (dispatch 664); already tracked.
project-config --show --target NAMEignores --target and prints all targets #861