Skip to content

Migrate app_proxy spec to deployConfig + transformRemoteToLocal#6913

Open
ryancbahan wants to merge 1 commit intorcb/contract-app-accessfrom
rcb/contract-app-proxy
Open

Migrate app_proxy spec to deployConfig + transformRemoteToLocal#6913
ryancbahan wants to merge 1 commit intorcb/contract-app-accessfrom
rcb/contract-app-proxy

Conversation

@ryancbahan
Copy link
Contributor

@ryancbahan ryancbahan commented Feb 28, 2026

Summary

  • Remove transformConfig from app_proxy spec, including prependApplicationUrl forward logic
  • Set deployConfig and transformRemoteToLocal directly (flat url/prefix/subpath → nested app_proxy)
  • transformLocalToRemote is now undefined — server handles URL resolution
  • Part of the app module contracts migration

Test plan

  • Reverse transform test passes unchanged
  • Forward transform tests removed (transformLocalToRemote is undefined)
  • getDevSessionUpdateMessages tests pass

🤖 Generated with Claude Code

@github-actions
Copy link
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@ryancbahan ryancbahan force-pushed the rcb/contract-app-proxy branch from bc115a4 to c53aa70 Compare February 28, 2026 02:47
@ryancbahan ryancbahan force-pushed the rcb/contract-app-access branch from 34af0cc to 6d74a10 Compare February 28, 2026 02:47
@binks-code-reviewer
Copy link

binks-code-reviewer bot commented Feb 28, 2026

🤖 Code Review · #projects-dev-ai for questions
React with 👍/👎 or reply — all feedback helps improve the agent.

Complete - 2 findings

📋 History

✅ No issues → ✅ 2 findings

@ryancbahan ryancbahan force-pushed the rcb/contract-app-access branch from 6d74a10 to 8a440ce Compare February 28, 2026 14:42
@ryancbahan ryancbahan force-pushed the rcb/contract-app-proxy branch 2 times, most recently from d7de3ae to 7d785eb Compare February 28, 2026 14:46
@ryancbahan ryancbahan force-pushed the rcb/contract-app-access branch from 8a440ce to 9b654f8 Compare February 28, 2026 14:46
@github-actions
Copy link
Contributor

github-actions bot commented Feb 28, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 78.84% 14546/18450
🟡 Branches 73.11% 7229/9888
🟡 Functions 79.05% 3698/4678
🟡 Lines 79.17% 13746/17362

Test suite run success

3780 tests passing in 1449 suites.

Report generated by 🧪jest coverage report action from 6f5cf55

@@ -55,12 +42,6 @@ const AppProxyTransformConfig: CustomTransformationConfig = {
},
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

transformRemoteToLocal can emit invalid local config when remote content is partial/empty

transformRemoteToLocal assumes the remote payload always contains {url, subpath, prefix} and immediately dereferences proxyConfig.url / .subpath / .prefix. If the server returns {} (or omits one of these fields during rollout/migration, or for older apps), this function can return { app_proxy: { url: removeTrailingSlash(undefined), subpath: undefined, prefix: undefined } }, which may throw at runtime (depending on removeTrailingSlash) or silently write invalid config that later fails validation or breaks proxy routing.

deployConfig: async (config) => {
const {name, ...rest} = configWithoutFirstClassFields(config)
return rest
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Behavior change: relative app_proxy.url is no longer resolved against application_url

The PR removes the forward transform that previously applied prependApplicationUrl when app_proxy.url was relative, and tests covering that behavior were removed. The CLI now sends app_proxy.url as-is via deployConfig. If local config uses a relative path (e.g. "/api/proxy"), that relative value will now be sent to the server; if server-side resolution is not fully rolled out or differs from prior CLI join semantics (e.g., trailing slashes), proxies may deploy with an invalid/incorrect URL.

@ryancbahan ryancbahan force-pushed the rcb/contract-app-access branch from 9b654f8 to cbf520a Compare February 28, 2026 20:16
@ryancbahan ryancbahan force-pushed the rcb/contract-app-proxy branch from 7d785eb to aa09ed5 Compare February 28, 2026 20:16
Remove transformConfig including prependApplicationUrl forward logic. Set
deployConfig (configWithoutFirstClassFields pass-through) and
transformRemoteToLocal directly (flat url/prefix/subpath → nested app_proxy).
transformLocalToRemote is now undefined — server handles URL resolution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ryancbahan ryancbahan force-pushed the rcb/contract-app-access branch from cbf520a to 7d1020a Compare February 28, 2026 20:50
@ryancbahan ryancbahan force-pushed the rcb/contract-app-proxy branch from aa09ed5 to 6f5cf55 Compare February 28, 2026 20:50
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