#534 C: No Project.load outside open — four call sites #539
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#539
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
Child of #534 (ADR-0169). Parent design points and comments on #534. Lands after #535.
Tasks
Project.load(@project_root, target: nil)with@implementation.project(@project_root)(BriefFacts already receives the implementation from start_subagent.rb:43)implementation.project(project_root)(or the implementation) into GateCommands and delete GateCommands#project's own Project.loadProject.load(@root, target: nil)as a documented exemption; it runs from OpenImplementation#initialize before any implementation row exists and only reads tracker keys, which are target-agnostic. Add a one-line comment citing ADR-0169 and #539plugins/os-sdlc/tests/runner_project_load_guard_test.rbmirroring settlement_vocabulary_guard_test.rb: glob lib/os_sdlc/runner/**/*.rb, fail on anyProject.load(outside an exemption list of open_implementation.rb and tea_tracker.rb, reporting path:lineAcceptance criteria
Blocking edges
Blocked by: #535 and #538
Origin
• Trigger: Agent-initiated from ticket-skeptic gate (CREATE verdict)
• Improvised this session: none
• Chain: DESIGN ← ADR-0169
• Root candidate: #534
• Where: n/a
• Session: 1a3b7fd0-0319-465b-8414-0ab70560de3d
• Transcript: (from session context)
• Judge: claude-sonnet-5 on 2026-09-08; user-decided reframe recorded in ADR-0169; former child G merged into B
Second code-probe done 2026-09-09 (claude-sonnet-5, session d233a2f7-977a-419d-99ea-011b6e1e66f8). Findings: brief_facts.rb and gate_commands.rb both already have an Implementation in their caller chain (start_subagent.rb:43, gate_handoff.rb:89) and thread implementation.project(root) in. tea_tracker.rb:146 is reached from OpenImplementation#initialize before any row exists and is target-agnostic; kept as a documented exemption. Five further Project.load sites sit outside runner/ (autocorrect_prepass.rb, lint_command_support.rb, lint_worklist_target.rb, project_config_command.rb, scope_policy.rb); out of this ticket's stated scope, captured separately. Tasks rewritten; ticket is ready.
Work started via /os-sdlc:implement on branch ticket-539 (session d233a2f7-977a-419d-99ea-011b6e1e66f8). Deviation carried from #537/#538: main's brief_facts.rb hot-patched with target: @implementation.target for the run (#534 hook gap); restored at finish.
Captured map escalate-route issue (#539's increment 2): unexpected_pass on later increments is a legitimate "already done" signal (refactorer generalises scope), not a defect. Deferred: route unexpected_pass:non-first-increment to behavior-verifier or allow test-writer guard/characterisation declaration so diff-test expects green. Skeptic verdict: depth-1 anti-loop rule (parent is AI-created follow-up).
Resolution
Done: Under lib/os_sdlc/runner only open_implementation.rb and tea_tracker.rb call Project.load. Project::Source plays the project-source role for collaborators without an implementation; an implementation row plays it through #project. BriefFacts and GateCommands (fed the implementation by GateHandoff) ask their source, so brief facts and gate commands come from the config bound at open. tea_tracker.rb keeps a one-line documented exemption (pre-open, target-agnostic). runner_project_load_guard_test.rb fails on any other Project.load under runner/, proven by emptying its exemption list.
Evidence: Pipeline /os-sdlc:implement 539, implementation 1 on the schema-21 db, session d233a2f7-977a-419d-99ea-011b6e1e66f8, dispatches 1-15. Commits
afb5440(refactor) andb9eb84d(history row) on branch ticket-539, merged to main 2026-09-09. Suite 1097 runs green. Deviations: (1) the run ended in escalationunexpected_pass:test-writer/diff-testat dispatch 15: increment 1's refactorer had already rewired every runner site, so increment 2's two tests (gate_commands_implementation_project_test.rb, brief_facts_project_source_test.rb) passed on creation; they were kept as they are relevant and public. (2) The guard test is green by construction and cannot enter red-first, so it was written by hand as test-only work (sonnet), outside the pipeline gates, and is disclosed here. (3) The escalation procedure asks for one capture ticket; the ticket-skeptic dropped it under the depth-1 anti-loop rule because #539 is agent-created, and the cause is recorded as a comment on this ticket instead. (4) main's brief_facts.rb hot-patched for the run (#534 hook gap), restored at finish.Follow-ups: #545 (Project.load sites outside runner/); #541 (BriefFacts asks, never queries) and #542 next in the #534 chain; the unexpected_pass-on-later-increment map gap is recorded in this ticket's comments, not ticketed, per the skeptic's DROP verdict