Route the ticket map waiting node to an in-map map-router node #885
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
Depends on
Reference
jared/cc-os#885
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-0259 decision 7 makes map-router an in-map node. A reroutable map (one with
entries:) declares areroute: map-routerexit on the waiting nodeneeds-orchestratorand amap-routernode withagent: map-router,enrich: [approved_maps], andgates: [reroute], and the validator requires them. Today no map has a map-router node,Brief::Facts::FACT_RESOLVERS(query/brief/facts.rb:6) has noapproved_maps, andMap::Validator::CHECKS(model/map/validator.rb:6) has no such rule.check_enrich_facts!refuses an enrich name that is not a fact or an agent type, so the node cannot be added before the fact exists.Reproduce
n/a: design change, nothing to reproduce.
Approach
approved_mapsfact: add"approved_maps" => :approved_mapstoFACT_RESOLVERS. It returns the joined text of every*.yamlfile inMap::Catalog.default.dir(#868), sorted:check_reroute_route!(added toCHECKS): it runs only on a map whoseentriesis not empty. The map must have a waiting node (#872) with arerouteedge. The edge target must be a node whose agent ismap-router, whose verdict source isgatewithrerouteamong its gates, and whoseenrichincludesapproved_maps. Codes::missing_reroute_route(no waiting node with arerouteedge) and:bad_map_router(the target node breaks a rule; the message names the rule).maps/poodr-ticket-implementation.yaml: the waiting node getsedges: { reroute: map-router }. New node:The bounds keep
check_bounded_cycles!valid (needs-orchestrator -> map-router -> escalate -> needs-orchestrator) and match the reroute cap of 3. map-router is not inentries. Thereroutegate and its landing come in #873; the CLI that takes thererouteexit comes in the reroute-request ticket. Until both land, nothing routes a run to map-router.Required work:
"approved_maps"inplugins/os-sdlc/lib/os_sdlc/query/brief/facts.rbcheck_reroute_route!inplugins/os-sdlc/lib/os_sdlc/model/map/validator.rbagent: map-routerinplugins/os-sdlc/maps/poodr-ticket-implementation.yamlreroute: map-routerinplugins/os-sdlc/maps/poodr-ticket-implementation.yamlAcceptance criteria
entries:whose waiting node has norerouteedge, when it loads, then it fails withmissing_reroute_route.entries:whosererouteedge leads to a node without thereroutegate or withoutapproved_mapsinenrich, when it loads, then it fails withbad_map_routerand names the missing rule.entries:and no map-router node, when it loads, then it is valid.approved_mapsholds each map in the maps directory under aMap: <name>line, separated by----lines.Owner sketch
Origin
Parent: #859
Blocked by: #870, #872, #869
Work started on branch ticket-885 (os-sdlc pipeline, map poodr-ticket-implementation).
Resolution
Done: The ticket map waiting node routes to an in-map map-router node; Node#map_router_gap and Map::Validator::RerouteRoute enforce the map-router node and reroute-route rules; Brief::Facts#approved_maps supplies the approved_maps fact.
Evidence: main
b9896f57(Runner commit, implementation 1 implementation_complete, 12 dispatches, 1 retry; required-work and suite gates green),34c5b4c2History row; bin/test on main: 9 suites passed.Follow-ups: none