Skip to content

Review follow-up: submitRouting should update RPG graph structure for move decisions #52

@amondnet

Description

@amondnet

Original Review Suggestion

submitRouting currently mutates hierarchyAssignments/pendingRouting but does not update the RPG graph structure (high-level nodes / functional edges) to reflect routing moves. Since persistGraph() serializes the RPG, routing decisions won't be represented in the persisted .rpg/graph.json. Consider applying the routing change to the graph as well (e.g., ensure the target hierarchy nodes exist + add/remove the appropriate functional edge(s); this may require adding a supported functional-edge removal API in RepositoryPlanningGraph).

Reviewer: @copilot-pull-request-reviewer
PR: #44
File: src/mcp/interactive/encoder.ts:793
Comment: #44 (comment)

Status

Decision: Needs Discussion
Reason: Requires new API design (RepositoryPlanningGraph.removeFunctionalEdge()) and architectural decisions about when/how routing changes should be reflected in the graph structure.

Considerations

  1. RepositoryPlanningGraph currently only supports addFunctionalEdge — no removal API exists
  2. Creating target hierarchy nodes during routing could conflict with the submitHierarchy workflow
  3. Need to decide if routing is a "draft" operation (committed later) or immediate graph mutation

Action Items

  • Design RepositoryPlanningGraph.removeFunctionalEdge() API
  • Decide on routing mutation strategy (immediate vs. deferred)
  • Implement graph structure updates in submitRouting for move decisions
  • Add integration tests for routing-driven graph mutations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions