Skip to content

Add reflection-based /Navigation/Reductions endpoint; consolidate reduction graph#216

Open
wrigjl wants to merge 1 commit into
ReduxISU:CSharpAPIfrom
wrigjl:submit/reduction-graph-endpoint
Open

Add reflection-based /Navigation/Reductions endpoint; consolidate reduction graph#216
wrigjl wants to merge 1 commit into
ReduxISU:CSharpAPIfrom
wrigjl:submit/reduction-graph-endpoint

Conversation

@wrigjl
Copy link
Copy Markdown
Collaborator

@wrigjl wrigjl commented May 23, 2026

Introduces a single reflection-derived discovery endpoint that exposes the reduction graph as an adjacency map: from -> to -> [{className, endpoint, inputType, outputType}]. Optional source and target query parameters filter the result. Each edge is self-describing so consumers can plan multi-step reductions by matching outputType of step N to inputType of step N+1.

Type system (IReduction<TFrom, TTo>) becomes the source of truth; filesystem layout is no longer authoritative.

Removed (filesystem-walking, dead or redundant):

  • GET /Navigation/All_Reductions
  • GET /Navigation/NPC_Reductions
  • GET /Navigation/Problem_Reductions
  • GET /Navigation/Problem_ReductionsRefactor
  • GET /Navigation/PossibleReductions
  • GET /Navigation/PossibleReductionsRefactor
  • GET /Navigation/Reverse_Reductions
  • GET /Navigation/NPC_NavGraph/info (no live consumers)
  • ProblemGraph class (Nav_Graph.cs), orphaned after refactor
  • Commented-out ProblemGraph scaffolding in PRIMEFACTOR_Class.cs

Refactored to share data with /Navigation/Reductions (cannot drift):

  • GET /Navigation/NPC_NavGraph/availableReductions
  • GET /Navigation/NPC_NavGraph/reductionPath Response shapes preserved; both views back to the same in-memory graph.

…uction discovery

Introduces a single reflection-derived discovery endpoint that exposes
the reduction graph as an adjacency map: from -> to -> [{className,
endpoint, inputType, outputType}]. Optional source and target query
parameters filter the result. Each edge is self-describing so consumers
can plan multi-step reductions by matching outputType of step N to
inputType of step N+1.

Type system (IReduction<TFrom, TTo>) becomes the source of truth;
filesystem layout is no longer authoritative.

Removed (filesystem-walking, dead or redundant):
  - GET /Navigation/All_Reductions
  - GET /Navigation/NPC_Reductions
  - GET /Navigation/Problem_Reductions
  - GET /Navigation/Problem_ReductionsRefactor
  - GET /Navigation/PossibleReductions
  - GET /Navigation/PossibleReductionsRefactor
  - GET /Navigation/Reverse_Reductions
  - GET /Navigation/NPC_NavGraph/info (no live consumers)
  - ProblemGraph class (Nav_Graph.cs), orphaned after refactor
  - Commented-out ProblemGraph scaffolding in PRIMEFACTOR_Class.cs

Refactored to share data with /Navigation/Reductions (cannot drift):
  - GET /Navigation/NPC_NavGraph/availableReductions
  - GET /Navigation/NPC_NavGraph/reductionPath
Response shapes preserved; both views back to the same in-memory graph.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant