Callers read the bound Target; Project loses target/test/lint/code/map, FlatAttrs, and ProjectTargets (coding map) #795
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#795
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
After T2 and T3, a Project holds
targets, and it also still holds the selected target'starget,test, andlint. That is two sources for one fact.Project#codeis an alias kept only for callers (ADR-0210 rule 2).mapis set from the yaml but is never read (noproject.mapcaller in lib) and is not persisted.Reproduce
n/a: behavior-preserving. Run on
maps/coding.yaml.Approach
Files, lib (about 10): model/project.rb, model/project/flat_attrs.rb (delete), model/project_targets.rb (delete; its three TargetSelectionError checks move to
Project#target(name), used by Config.load and Open), model/project/codebase.rb (built from a Target), model/diff_test_plan.rb, model/project/validation.rb, query/project/changes.rb, query/gate/commands.rb, command/autocorrect_prepass/pass.rb (shared lint config), parser/project/snapshot.rb. Tests: about 9 that readproject.test,project.lint, orproject.target.If the file count is over 8, split: T7a moves Codebase, Changes, DiffTestPlan, and Gate::Commands to the Target. T7b deletes the members, FlatAttrs, and ProjectTargets.
ADRs: this completes the T3 ADR (ADR-0192 items 1/3/4, ADR-0210 rules 1-2). Cited: ADR-0088 (the three selection errors keep their text), ADR-0213.
Required work:
project.test,project.lint,project.target, andproject.codewith the bound Target. — check:! grep -rnE "project\)?\.(test|lint|target|code)\b" plugins/os-sdlc/libTarget.from_section(name, hash)is the one flat-hash constructor, for both the yaml and the snapshot. — check:! grep -rn "FlatAttrs\|ProjectTargets" plugins/os-sdlcProject.members == [:name, :path, :tracker, :commit_on_complete, :targets]— check:ruby plugins/os-sdlc/tests/all.rbRejected: keep
Project#testas a delegator to the bound target. A Project has no bound target. Only an implementation or a--targetrun has one.Acceptance criteria
Owner sketch
Non-goals
pathtoroot(T8).Blocking edges
Blocked by: T3
Origin
Carried from #792 review (fresh opus read): (1) Target.from_blob belongs in Project::Snapshot (lens A1); (2) the blob's target_name and the row's target column duplicate the bound-target choice (A12), make Snapshot the one chooser; (3) Project#to_config_h and #to_flat_h have no lib callers, only project_path_test.rb:30 uses them as a legacy fixture; (4) Target#bound_as drops test and lint, rename or remove when project.target retires; (5) tighten snapshot_name_guard_test.rb to match the full message; (6) implementation_project_test.rb:17 has two pre-existing alignment offenses.
Carried from #794 review: Project#tracker_required_message (model/project.rb) renders a reader-facing error string inside the model (lens A1, presenter verb). Move it beside the setup presenter when T7 reshapes Project.
Work started on branch ticket-795 via /os-sdlc:implement, coding map (session bb36e383). #794 merged to main.
Session bb36e383 wrapped mid-run. Implementation 60 (coding map) programmer dispatch 625 did not return before wrap. Partial work (42 files, FlatAttrs deleted, callers moved to the bound Target) is preserved as a WIP commit on branch ticket-795 in worktree .claude/worktrees/ticket-795. It is NOT gated. Next session: run the suite there; either continue from that state with a new implementation-open, or discard the branch and rerun.
Resolution
Done: Callers read the bound Target through Project#target(name); Project is Data(name, path, tracker, commit_on_complete, targets); FlatAttrs and ProjectTargets deleted; the three TargetSelectionError checks moved into Project private methods with byte-identical messages; Target.from_section is the sole flat-hash constructor; Target#codebase(root) replaces Project#codebase
Evidence: branch ticket-795 merged to main, head
150727e8; suite 1298 runs 0 failures 0 errors; rubocop 0 offenses on 16 changed lib files; 43 files changed +260 -572Follow-ups: none