Bind implementations to a map name through Map::Catalog #868
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.
Blocks
Reference
jared/cc-os#868
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
ADR-0258 decision 5 makes
implementations.map_patha map NAME, so a reroutes row and the default map use the same kind of value. Today the column holds a file path.Implementation#maploads it withMap::Loader.load(map_path)(model/implementation/targeting.rb:6), andBrief.forfindsbrief:files withFile.dirname(implementation.map_path)(presenter/brief.rb:6). A name has no directory, so both break.Reproduce
n/a: design change, nothing to reproduce.
Approach
Add
Map::Catalog, the one object that resolves a map name to a file in a maps directory.Catalog.defaultuses the pluginmaps/directory. Tests bind the catalog totests/fixtures/mapsthrough a test-support seam (no ENV override).os-sdlc-implementation-open SESSION TICKET NAMEtakes a map name (e.g.poodr-ticket-implementation).WorkOrder#map_pathandargs_holder.rbmap_path!carry the name; the usage text shows a name.Implementation#maploadsMap::Catalog.default.load(map_path).Brief.forpassesMap::Catalog.default.dirasmap_dir.open.rb:18loads through the catalog. BumpSCHEMA_VERSION(ADR-0129/0155) because existing rows hold paths.The column name stays
map_path(ADR-0258 keeps it). Theopen.rb:48basename test still works with a name; the headers ticket replaces it with a map-level flag.Required work:
class Cataloginplugins/os-sdlc/lib/os_sdlc/**/*.rbMap::Loader.load(map_path)inplugins/os-sdlc/lib/os_sdlc/model/implementation/targeting.rbFile.dirname(implementation.map_path)inplugins/os-sdlc/lib/os_sdlc/presenter/brief.rbmaps/toy.yamlinplugins/os-sdlc/lib/os_sdlc/parser/dispatch_commands/args_holder.rbRejected: keep a path and derive the name with
File.basename— ADR-0258 decision 5 stores a name, and a drafts directory (slice 4) needs a resolver, not a path.Acceptance criteria
poodr-ticket-implementation, when implementation-open runs, then the implementation row storespoodr-ticket-implementationand its map is the one loaded frommaps/poodr-ticket-implementation.yaml.brief:path, when the brief is composed for an implementation bound by name, then the brief file resolves relative to the catalog maps directory.Owner sketch
Origin
Parent: #859
Work started on branch ticket-868 (os-sdlc pipeline, map poodr-ticket-implementation).
Implementation 20 ended implementation_failed (verdict:error at contract-auditor dispatch 173). Cause: the contract-auditor correction (name-only Catalog#path_for, test-support seam binding the catalog to tests/fixtures/maps, migration of path-passing test support) needs changes to existing tests, which no role in poodr-ticket-implementation may make. Under-decomposed for the pipeline, recoverable. Finishing by hand in worktree ticket-868 per the escalation procedure; gates replicated (suite, lint, required-work, independent review). Earlier: implementation 19 escalated on a test-writer defect (payload.node on a Hash); suite-check also hit an environment defect, fixed in
38652664(Gemfile.lock BUNDLED WITH 4.0.11 -> 4.0.22, from #858).Resolution
Done: Map::Catalog resolves map names; implementations.map_path holds a name; Implementation#map, Brief.for and implementation-open load through Catalog.default; usage text and implement/responsibility-refactor skills pass names; test-support seam binds the catalog to tests/fixtures/maps (thread-local, no ENV); SCHEMA_VERSION 26. Deviations: implementation 19 escalated on a test-writer defect (payload.node on a Hash), fixed by hand and re-opened as implementation 20; suite-check hit an env defect from #858 (Gemfile.lock BUNDLED WITH 4.0.11), fixed in
38652664; implementation 20 failed verdict:error because the test-support migration is not routable in the map; HAND-FINISHED (sonnet worker + independent opus review PASS).Evidence: main
a2875763(feature),38652664(lockfile),ca494959(History row); bin/test on main: 9 suites passed; rubocop clean on changed lib files; all four Required-work checks verified present/absent.Follow-ups: none captured. Dropped: four review NITs on the two new tests (identity fixture_map helper, StandardError in assert_raises, self-derived expected values) - cosmetic; A10 catalog injection at targeting.rb - lens said JUSTIFIED by the ticket Approach.