Responsibility-refactor batch 2 on project.rb from re-audit run 12 #570

Open
opened 2026-09-14 12:24:47 +00:00 by jared · 6 comments
Owner

Context

Re-audit of project.rb, project/yaml.rb, project/config.rb after batch #568 merged (main f2639b1, 2026-09-14). Full report: tuning/responsibility-audit/runs/12-project-rb-reaudit/report.md (untracked tuning area).

Capabilities to move

Capability Current owner Proposed owner
.sdlc directory + entry names Project.sdlc_dir + 10 hand-built joins Project::Layout (new)
Test/code path classification Project::Changes, GateCommands, ScopePolicy, GreenAssertFailureSidecar Project#test_file? / #code_file?
Where a tracker key may sit Runner::TeaTracker Project.tracker_configured? + ProjectTargets

Defect rows (8), the serious ones

  • scope_policy.rb:15 calls Project.load without target:, so the write guard is inert.
  • Project::Config#project returns nil for an empty config; gate_commands.rb:24 and brief_facts.rb:90 dereference it.
  • Yaml#merge_keys applies the attribute-shadow guard to tracker, which is not an attribute key, so save_tracker fails on a targets-shaped project.
  • Raw KeyError when project.yaml lacks name:; raw JSON::ParserError on a malformed config blob.

Procedure

/os-sdlc:responsibility-refactor on the run 12 report: one defects ticket first, then one ticket per capability, cap four. Structural claims go under Structural follow-through (skill rule 75ff72d).

Origin

  • filed-by: agent
  • session: fedf1982-c8e2-4f03-9f41-bc1d84fdd823
  • follow-up: #568
## Context Re-audit of project.rb, project/yaml.rb, project/config.rb after batch #568 merged (main f2639b1, 2026-09-14). Full report: tuning/responsibility-audit/runs/12-project-rb-reaudit/report.md (untracked tuning area). ## Capabilities to move | Capability | Current owner | Proposed owner | | --- | --- | --- | | .sdlc directory + entry names | Project.sdlc_dir + 10 hand-built joins | Project::Layout (new) | | Test/code path classification | Project::Changes, GateCommands, ScopePolicy, GreenAssertFailureSidecar | Project#test_file? / #code_file? | | Where a tracker key may sit | Runner::TeaTracker | Project.tracker_configured? + ProjectTargets | ## Defect rows (8), the serious ones - scope_policy.rb:15 calls Project.load without target:, so the write guard is inert. - Project::Config#project returns nil for an empty config; gate_commands.rb:24 and brief_facts.rb:90 dereference it. - Yaml#merge_keys applies the attribute-shadow guard to tracker, which is not an attribute key, so save_tracker fails on a targets-shaped project. - Raw KeyError when project.yaml lacks name:; raw JSON::ParserError on a malformed config blob. ## Procedure /os-sdlc:responsibility-refactor on the run 12 report: one defects ticket first, then one ticket per capability, cap four. Structural claims go under Structural follow-through (skill rule 75ff72d). ## Origin - filed-by: agent - session: fedf1982-c8e2-4f03-9f41-bc1d84fdd823 - follow-up: #568
Author
Owner

Batch 2 charted from audit run 13 (analysis: .sdlc/tmp/responsibility-audit/13-project-rb-reaudit/analysis.yaml).

Children in order, each via /os-sdlc:implement with maps/poodr-ticket-implementation.yaml, each merged before the next:

  1. #571 ScopePolicy guard + upsert sole creator (defects, no ownership move)
  2. #573 Project::LintConfig
  3. #574 Project::Layout
  4. #572 Project::ArtifactDir

Run 12 rows not in this batch (Config#project nil, merge_keys tracker shadow, raw KeyError, tracker_configured?): run 13 did not report them. The re-audit decides whether they still exist.

Re-audit after the last merge:
/os-sdlc:responsibility-audit plugins/os-sdlc/lib/os_sdlc/project.rb plugins/os-sdlc/lib/os_sdlc/project/layout.rb plugins/os-sdlc/lib/os_sdlc/project/lint_config.rb plugins/os-sdlc/lib/os_sdlc/project/artifact_dir.rb plugins/os-sdlc/lib/os_sdlc/scope_policy.rb

Pass: each batch capability reads current-owner or existing-no-move; no batch defect row remains; no new defect names a file the batch created. The re-audit decides whether a batch 3 is needed.

Batch 2 charted from audit run 13 (analysis: .sdlc/tmp/responsibility-audit/13-project-rb-reaudit/analysis.yaml). Children in order, each via /os-sdlc:implement with maps/poodr-ticket-implementation.yaml, each merged before the next: 1. #571 ScopePolicy guard + upsert sole creator (defects, no ownership move) 2. #573 Project::LintConfig 3. #574 Project::Layout 4. #572 Project::ArtifactDir Run 12 rows not in this batch (Config#project nil, merge_keys tracker shadow, raw KeyError, tracker_configured?): run 13 did not report them. The re-audit decides whether they still exist. Re-audit after the last merge: /os-sdlc:responsibility-audit plugins/os-sdlc/lib/os_sdlc/project.rb plugins/os-sdlc/lib/os_sdlc/project/layout.rb plugins/os-sdlc/lib/os_sdlc/project/lint_config.rb plugins/os-sdlc/lib/os_sdlc/project/artifact_dir.rb plugins/os-sdlc/lib/os_sdlc/scope_policy.rb Pass: each batch capability reads current-owner or existing-no-move; no batch defect row remains; no new defect names a file the batch created. The re-audit decides whether a batch 3 is needed.
Author
Owner

Batch 2 progress 2026-09-14: #571 merged (main 8daffca, ADR-0178) and closed. Runner hit bound_exhausted after 3 programmer-repair rounds; cause was test-side Project.create callers the programmer may not edit plus missing requires in scope_policy.rb (hook has no Zeitwerk). Hand-fixed per refactor skill, suite 1220 green. Follow-up #575 filed (hook target at multi-target root). Next: #573.

Batch 2 progress 2026-09-14: #571 merged (main 8daffca, ADR-0178) and closed. Runner hit bound_exhausted after 3 programmer-repair rounds; cause was test-side Project.create callers the programmer may not edit plus missing requires in scope_policy.rb (hook has no Zeitwerk). Hand-fixed per refactor skill, suite 1220 green. Follow-up #575 filed (hook target at multi-target root). Next: #573.
Author
Owner

Batch 2 progress 2026-09-14: #573 merged (main 058f20d, ADR-0179) and closed. Pipeline reached implementation_complete; hand-fixed one test-side default assertion and moved LintConfig to its own file. Next: #574 Project::Layout.

Batch 2 progress 2026-09-14: #573 merged (main 058f20d, ADR-0179) and closed. Pipeline reached implementation_complete; hand-fixed one test-side default assertion and moved LintConfig to its own file. Next: #574 Project::Layout.
Author
Owner

Batch 2 progress 2026-09-14: #574 merged (main a26ebb3, ADR-0180) and closed. Runner ended verdict:error (gate test-mapping gap for tests/project_layout_test.rb); hand-finished, no contract-auditor rounds. Next: #572 Project::ArtifactDir, last in batch, then re-audit.

Batch 2 progress 2026-09-14: #574 merged (main a26ebb3, ADR-0180) and closed. Runner ended verdict:error (gate test-mapping gap for tests/project_layout_test.rb); hand-finished, no contract-auditor rounds. Next: #572 Project::ArtifactDir, last in batch, then re-audit.
Author
Owner

Batch 2 progress 2026-09-14: #572 merged (main ca5e3d9, ADR-0181) and closed. All four children merged. Running the re-audit now on project.rb plus the three new owner files and scope_policy.rb; the result decides whether a batch 3 is needed.

Batch 2 progress 2026-09-14: #572 merged (main ca5e3d9, ADR-0181) and closed. All four children merged. Running the re-audit now on project.rb plus the three new owner files and scope_policy.rb; the result decides whether a batch 3 is needed.
Author
Owner

Re-audit run 14 (2026-09-14, main 3267553) on project.rb + layout.rb + lint_config.rb + artifact_dir.rb + scope_policy.rb. Report: tuning/responsibility-audit/runs/14-project-rb-batch2-reaudit/report.md (untracked).

Pass check: all four batch capabilities read current-owner (Layout, LintConfig, ArtifactDir; upsert sole creator). No run-13 defect row remains. FAIL on the third condition: new defects name batch files.

Batch-3 candidates (not ticketed; user decides):

  1. Layout#code?/test? have no production sender: Changes and GateCommands use the public prefixes; ScopePolicy uses a substring rule (ADR-0180 records why). Proposal: predicates only, prefixes private, a relative() helper for absolute hook paths.
  2. LintWorklistTarget joins root+code_path three times; File.dirname on a single-segment code_path widens the scan to the repo root. Proposal: Layout#code_dir/#subtree.
  3. Role vocabulary split between ScopePolicy constants and WriteGuard string compares. Proposal: ScopePolicy::Role value object.
    Defects: LintConfig#configured? true for empty string; raise_yaml_already_exists! unreachable after #571; upsert anchors at cwd and never ascends; ScopePolicy.load rescues only TargetSelectionError while Yaml#read raises HarnessError (hook crash on an empty project.yaml).

Batch 2 is complete. This map stays open until the user decides on batch 3.

Re-audit run 14 (2026-09-14, main 3267553) on project.rb + layout.rb + lint_config.rb + artifact_dir.rb + scope_policy.rb. Report: tuning/responsibility-audit/runs/14-project-rb-batch2-reaudit/report.md (untracked). Pass check: all four batch capabilities read current-owner (Layout, LintConfig, ArtifactDir; upsert sole creator). No run-13 defect row remains. FAIL on the third condition: new defects name batch files. Batch-3 candidates (not ticketed; user decides): 1. Layout#code?/test? have no production sender: Changes and GateCommands use the public prefixes; ScopePolicy uses a substring rule (ADR-0180 records why). Proposal: predicates only, prefixes private, a relative() helper for absolute hook paths. 2. LintWorklistTarget joins root+code_path three times; File.dirname on a single-segment code_path widens the scan to the repo root. Proposal: Layout#code_dir/#subtree. 3. Role vocabulary split between ScopePolicy constants and WriteGuard string compares. Proposal: ScopePolicy::Role value object. Defects: LintConfig#configured? true for empty string; raise_yaml_already_exists! unreachable after #571; upsert anchors at cwd and never ascends; ScopePolicy.load rescues only TargetSelectionError while Yaml#read raises HarnessError (hook crash on an empty project.yaml). Batch 2 is complete. This map stays open until the user decides on batch 3.
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#570
No description provided.