#534 C: No Project.load outside open — four call sites #539

Closed
opened 2026-09-08 20:15:05 +00:00 by jared · 4 comments
Owner

Context

Child of #534 (ADR-0169). Parent design points and comments on #534. Lands after #535.

Tasks

  • runner/brief_facts.rb:134: replace Project.load(@project_root, target: nil) with @implementation.project(@project_root) (BriefFacts already receives the implementation from start_subagent.rb:43)
  • runner/gate_commands.rb:29: GateHandoff (gate_handoff.rb:89) already holds the implementation; pass implementation.project(project_root) (or the implementation) into GateCommands and delete GateCommands#project's own Project.load
  • runner/tea_tracker.rb:146: keep Project.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 #539
  • regression test plugins/os-sdlc/tests/runner_project_load_guard_test.rb mirroring settlement_vocabulary_guard_test.rb: glob lib/os_sdlc/runner/**/*.rb, fail on any Project.load( outside an exemption list of open_implementation.rb and tea_tracker.rb, reporting path:line

Acceptance criteria

  • grep -rn "Project.load(" plugins/os-sdlc/lib/os_sdlc/runner returns only open_implementation.rb and tea_tracker.rb
  • the guard test is green and fails when a Project.load is added to any other runner file
  • os-sdlc suite green

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

## Context Child of #534 (ADR-0169). Parent design points and comments on #534. Lands after #535. ## Tasks - [ ] runner/brief_facts.rb:134: replace `Project.load(@project_root, target: nil)` with `@implementation.project(@project_root)` (BriefFacts already receives the implementation from start_subagent.rb:43) - [ ] runner/gate_commands.rb:29: GateHandoff (gate_handoff.rb:89) already holds the implementation; pass `implementation.project(project_root)` (or the implementation) into GateCommands and delete GateCommands#project's own Project.load - [ ] runner/tea_tracker.rb:146: keep `Project.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 #539 - [ ] regression test `plugins/os-sdlc/tests/runner_project_load_guard_test.rb` mirroring settlement_vocabulary_guard_test.rb: glob lib/os_sdlc/runner/**/*.rb, fail on any `Project.load(` outside an exemption list of open_implementation.rb and tea_tracker.rb, reporting path:line ## Acceptance criteria - [ ] grep -rn "Project.load(" plugins/os-sdlc/lib/os_sdlc/runner returns only open_implementation.rb and tea_tracker.rb - [ ] the guard test is green and fails when a Project.load is added to any other runner file - [ ] os-sdlc suite green ## 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
Author
Owner

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.

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.
Author
Owner

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.

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.
Author
Owner

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).

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).
Author
Owner

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) and b9eb84d (history row) on branch ticket-539, merged to main 2026-09-09. Suite 1097 runs green. Deviations: (1) the run ended in escalation unexpected_pass:test-writer/diff-test at 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

## 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) and b9eb84d (history row) on branch ticket-539, merged to main 2026-09-09. Suite 1097 runs green. Deviations: (1) the run ended in escalation `unexpected_pass:test-writer/diff-test` at 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
jared closed this issue 2026-09-09 15:44:44 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#539
No description provided.