Skip to content

Fix cross-file routes and Go promoted dispatch - #8

Merged
NianJiuZst merged 1 commit into
mainfrom
codex/framework-go-gaps
Nov 1, 2026
Merged

NianJiuZst merged 1 commit into
mainfrom
codex/framework-go-gaps

Conversation

@NianJiuZst

@NianJiuZst NianJiuZst commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Problem

HTTP clients missed NestJS routes mounted through RouterModule and setGlobalPrefix, React Router navigation missed route-object tables declared in another file, and Go interface calls did not reach methods promoted from embedded types.

Changes

  • Persist NestJS module, mount and bootstrap sites and compose effective HTTP paths across imports. Support nested literal mounts, imported aliases, multiple application roots, and statically readable method/path exclusions. Exclusions are applied when matching parameterized paths. Route node names remain controller-local.
  • Find named and default-exported React Router arrays through imports and re-exports, including nested imported children and spreads. Candidate nodes remain in the graph, but only tables reached by a recognized router call participate in navigation matching.
  • Resolve Go interface dispatch to the nearest unambiguous embedded method, respecting overriding, field shadowing, signature compatibility and package-scoped unexported names.
  • Persist the new cross-file sites, recompute links during incremental sync, and bump the engine rule version to 6 so existing indexes rebuild. The segment format is unchanged. Update both READMEs with supported patterns and limits.

These are bounded static rules: dynamic route configuration is not evaluated, Go method sets remain an approximation, and candidate React route nodes can exist before a router consumes their array.

Validation

  • Focused end-to-end cases cover all three gaps, nested routes, import aliases/default exports, ambiguous and shadowed Go methods, separate Nest applications, and partial/method-specific prefix exclusions.
  • Cross-file synchronization exercises 21 one-sided edits and compares each delta with a full rebuild, including edits to route registration, imports, prefixes, exclusions, and Go signatures/fields.
  • cargo +1.99.0 fmt (CI package list) and cargo +1.99.0 clippy --workspace --exclude cg-kernel --all-targets -- -D warnings passed.
  • CGR_SYNC_SEQUENCES=6 CGR_SYNC_STEPS=100 cargo +1.99.0 test --workspace --locked passed (one existing ignored test).
  • cargo +1.89.0 check --locked -p cg-resolve passed.
  • Local scripts/smoke.sh target/debug/cgr passed, including init, sync, MCP stdio and export.

@NianJiuZst
NianJiuZst merged commit c795575 into main Nov 1, 2026
9 checks passed
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