Repository navigation
feat(platform): add native Android extension support behind the native-apps flag - #296
Merged
Merged
Conversation
`gddy platform app add native-extension` now registers an Android native extension with DevX Core instead of only writing local config. The new `NativeAppClient` resolves the application id from the app-registry subgraph, then upserts against `/api/v1/native-apps`: GET the native app, PATCH every field when it already exists, otherwise POST the draft and follow up with a `supportEmail` PATCH. - add `rust/src/application/native_app_client.rs` with the DevX Core success/error envelopes and HTTP-level tests asserting the exact create/update/support-email payloads - add `rust/src/config/native_extension.rs` to persist `support_contact` and `android_package_name` in `godaddy.<env>.toml` - move the subcommand into `rust/src/application/commands/add/` to keep each module under the 1000-line limit - document the integration and open questions in `docs/proposals/native-extension-devx-core-integration.md` Verified end to end against a local DevX Core + application-service stack: the GET -> PATCH sequence returns `operation: "updated"` with the expected body, and the create POST passes DevX Core's `createNativeAppBodySchema` validation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…dies `api_error` put the entire raw response body into the error `code` when the body was not a DevX Core error envelope. `GddyError::from` interpolates that code into the user-facing message, so a gateway returning an HTML error page dumped the whole page into `error.code`. Emit a stable `UPSTREAM_ERROR` code and a whitespace-collapsed, 200-byte-bounded snippet as the message instead, truncating on a char boundary. New tests: - `create_reports_failure_when_support_email_patch_fails` — the follow-up `supportEmail` PATCH is load-bearing (application-service does not persist the field on create), so pin that `upsert` surfaces its failure even though the draft already exists upstream and a retry then reports `Updated` - `non_envelope_error_body_is_reduced_to_a_bounded_snippet` — covers the fix above - `error_envelope_without_message_renders_code_only` and `empty_error_body_carries_no_message` — exercise the `DisplayMessage(None)` branch so a missing message cannot leave a dangling separator Also note in the test module that the pinned `status: "draft"` payloads describe what the CLI sends, not what upstream stores: application-service omits `status` from its PATCH DTO and hardcodes `ACTIVE` on create, so DevX Core's `draft -> INACTIVE` mapping never takes effect. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…visible Stable release stays a normal web release when godaddy.toml already has a native_extension section.
Stable help no longer lists the command. Experimental min_stage still shows it.
…ew guide The command stays available at experimental stage. This copy returns when the flag is removed.
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical draft-state and module-size issues remain unresolved.
Review effort: Lite
Findings: 3
Open (5)
What changed in this PR
Adds experimental native Android extension support with manifest configuration, DevX Core synchronization, feature-flagged release payloads, validation, and tests.
Changes:
- Adds the
native-extensioncommand and native app client. - Adds
[native_extension]configuration and validation. - Gates native functionality behind
native-apps. - Adds release integration and error-handling updates.
| File | Reviewed changes |
|---|---|
rust/src/platform/mod.rs |
Overview documentation tests |
rust/src/platform/guides/platform-overview.md |
Platform guidance updates |
rust/src/platform/app/onboarding/mod.rs |
Exposes onboarding client |
rust/src/platform/app/native_app_client.rs |
Native app API client and upsert flow |
rust/src/platform/app/mod.rs |
Registers native client |
rust/src/platform/app/commands/schemas.rs |
Native output schemas |
rust/src/platform/app/commands/release.rs |
Native release payload handling |
rust/src/platform/app/commands/mod.rs |
Native-app feature flag |
rust/src/platform/app/commands/init.rs |
Preserves native configuration |
rust/src/platform/app/commands/deploy/mod.rs |
Deployment test fixtures |
rust/src/platform/app/commands/deploy/extensions.rs |
Extension test fixtures |
rust/src/platform/app/commands/add/native_extension.rs |
Native extension command |
rust/src/platform/app/commands/add.rs |
Command registration and tests |
rust/src/platform/app/client.rs |
Native release extension selection |
rust/src/main.rs |
Feature visibility tests |
rust/src/config/tests.rs |
Native configuration tests |
rust/src/config/settings_form.rs |
Validation handling |
rust/src/config/redirect_uris.rs |
Configuration fixtures |
rust/src/config/native_extension.rs |
Native extension validation |
rust/src/config/mod.rs |
Native configuration model |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…e helpers The command still sends status "draft", but help and errors no longer claim the stored record is one. The native-extension release payload moves to release/native_extension.rs so release.rs stays under the 1000-line limit.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Two critical and three moderate unresolved findings remain.
Review effort: Lite
Findings: 2
Open (5)
Unconditionally selecting nativeExtensions breaks stable releases · New Form encoding incorrectly encodes spaces in path segments · New Eager onboarding check blocks existing app updates · New Empty name is not falling back in the result field · New Upstream errors lose the stable UPSTREAM_ERROR code · New
…nd PATCH only owned fields `gddy platform app add --native-extension` now requires accepted developer agreements before creating a DevX Core native-app record. A new `--accept-agreements` flag supports non-TTY automation when onboarding is still pending. Existing records are updated via a scoped `NativeAppUpdate` payload so portal-owned categories and description are preserved.
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # rust/src/platform/app/commands/init.rs
…t_at and remove unused OnboardingClient re-export
cblecken-godaddy
approved these changes
Oct 1, 2026
cblecken-godaddy
left a comment
Collaborator
There was a problem hiding this comment.
looks fine to me. One nit added.
Replace the `cfg!(test)` TTY override in `ensure_ready_for_app_init_at` with an explicit `is_tty` parameter so callers decide whether to prompt. Thread the flag through `sync_native_extension` and pass the actual terminal state from the command entry point.
mstankovic-godaddy
marked this pull request as ready for review
October 2, 2026 10:41
mstankovic-godaddy
requested review from
axburgess-godaddy,
jpage-godaddy,
jpearlman-godaddy,
mguerrero3-godaddy,
qcai-godaddy,
rts1-godaddy,
sgopalan-godaddy,
smukherjee-godaddy and
wcole1-godaddy
as code owners
October 2, 2026 10:41
jpage-godaddy
approved these changes
Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
gddy platform app add native-extension, which writes a[native_extension]section togodaddy.tomland upserts a DevX Core native-app draft: GET the app, PATCH when it already exists, otherwise POST and follow up with asupportEmailPATCH.native-appsfeature flag (Stage::Experimental). Stable help and the platform overview omit the command. A stablereleasestays a normal web release and does not sendnativeExtensions, even when the manifest already has a native extension section.UPSTREAM_ERRORcode and a short snippet, instead of putting the raw response body inerror.code.Test plan
cargo check --workspacecargo clippy --workspace -- -D warningscargo test --workspacecargo fmt --check