Skip to content

fix(compiler): reject dynamic default contract routes#292

Merged
cssbruno merged 1 commit into
mainfrom
codex/fix-dynamic-default-contract-routes
Jun 11, 2026
Merged

fix(compiler): reject dynamic default contract routes#292
cssbruno merged 1 commit into
mainfrom
codex/fix-dynamic-default-contract-routes

Conversation

@cssbruno

Copy link
Copy Markdown
Owner

Summary

  • Stop deriving generated contract route paths from dynamic page route patterns when g:command or g:query omits an explicit action/path.
  • Emit contract_route_invalid for omitted contract routes on dynamic pages so the route report cannot advertise unreachable /path/{param} backend routes.
  • Add a regression for default command routes colliding with inherited page action routes so appgen duplicate backend registrations stay compile-time diagnostics.

Review Feedback

Addresses Codex review comments:

  • Avoid registering template route patterns for default commands.
  • Detect collisions with page-owned backend endpoints.

Verification

  • go test ./internal/gwdkanalysis ./internal/compiler
  • go test ./internal/appgen ./internal/buildgen
  • go test ./...
  • go build ./cmd/gowdk

LLM Assistance

  • Implemented by Codex from automated review feedback.

@cssbruno cssbruno merged commit a0b7755 into main Jun 11, 2026
5 checks passed
@cssbruno cssbruno deleted the codex/fix-dynamic-default-contract-routes branch June 11, 2026 18:46
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