Skip to content

Codex: fix redirect path format in CloudFront KVS#2849

Merged
reakaleek merged 1 commit intomainfrom
fix/codex-redirect-path-format
Mar 4, 2026
Merged

Codex: fix redirect path format in CloudFront KVS#2849
reakaleek merged 1 commit intomainfrom
fix/codex-redirect-path-format

Conversation

@reakaleek
Copy link
Member

What

  • Codex redirects now use /r/{repo}/{path} format in the CloudFront KeyValueStore instead of /elastic/{repo}/tree/main/{path}
  • Same-repo and cross-repo redirects both resolve correctly for codex builds

Why

  • The KVS redirect lookup expects codex URLs (e.g. /r/ai-guild/best-practices/tools), but redirects were being stored with the preview URL format
  • This caused redirects like best-practices/tools -> tools to fail because the stored keys did not match incoming requests

Notes

  • Include current repo in codexRepositories when building the URI resolver so same-repo redirects use the codex path format
  • Handle relative URIs in path extraction (CodexAwareUriResolver returns relative URIs in codex build mode)

Made with Cursor

- Include current repo in codexRepositories when building resolver
- Handle relative URIs in CollectRedirects path extraction
- Add unit tests for same-repo, cross-repo, and path extraction

Made-with: Cursor
@reakaleek reakaleek requested a review from a team as a code owner March 3, 2026 23:41
@reakaleek reakaleek requested a review from Mpdreamz March 3, 2026 23:41
@reakaleek reakaleek added the fix label Mar 3, 2026
@reakaleek reakaleek merged commit f5d8077 into main Mar 4, 2026
31 checks passed
@reakaleek reakaleek deleted the fix/codex-redirect-path-format branch March 4, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants