Skip to content

feat(application init): gate creation on onboarding (DEVX-545) - #139

Merged
jpage-godaddy merged 2 commits into
godaddy:rust-portfrom
smukherjee-godaddy:DEVX-545-app-init-onboarding
Jul 24, 2026
Merged

feat(application init): gate creation on onboarding (DEVX-545)#139
jpage-godaddy merged 2 commits into
godaddy:rust-portfrom
smukherjee-godaddy:DEVX-545-app-init-onboarding

Conversation

@smukherjee-godaddy

Copy link
Copy Markdown
Contributor

Summary

  • gate gddy application init on the authenticated customer's developer organization status without coupling onboarding to auth login
  • prompt pending interactive users for agreement acceptance and require --accept-agreements for non-interactive workflows
  • pass the resolved organizationId to App Registry while keeping organization state server-authoritative instead of persisting it in the keychain
  • add devx-core environment resolution and focused tests for API handling, decision logic, prompts, and failure paths

Supersedes the auth-login approach from #129.

Test plan

  • cargo fmt --check
  • cargo check
  • cargo clippy -- -D warnings
  • cargo test (321 passed)

Made with Cursor

Require an active developer organization before application creation and pass its organization ID to App Registry. Support explicit agreement acceptance for non-interactive workflows without coupling onboarding to authentication.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new onboarding gate to gddy application init by checking the authenticated customer’s developer organization onboarding status via devx-core, prompting for agreement acceptance in interactive flows, and requiring an explicit --accept-agreements flag in non-interactive workflows. This keeps onboarding state server-authoritative while still passing the resolved organizationId through to App Registry during application creation.

Changes:

  • Introduces a new onboarding module (client, prompt, decision logic, and ensure flow) to check status and optionally complete onboarding.
  • Adds devx-core base URL resolution for built-in environments and an override via environment variable.
  • Updates application init to enforce onboarding readiness, pass organizationId to App Registry, and include orgId in output.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
rust/src/onboarding/types.rs Adds onboarding and API-envelope types used by the onboarding client/flow.
rust/src/onboarding/prompt.rs Implements an interactive agreement-acceptance prompt plus unit tests.
rust/src/onboarding/mod.rs Wires onboarding submodules and re-exports key APIs.
rust/src/onboarding/flow.rs Adds status/TTY/flag decision logic with unit tests.
rust/src/onboarding/ensure.rs Adds the main “ensure ready for app init” async flow and httpmock-based tests.
rust/src/onboarding/client.rs Adds the devx-core onboarding HTTP client and API-handling tests.
rust/src/main.rs Registers the new onboarding module in the crate.
rust/src/environments/mod.rs Adds devx-core URL support for built-in envs plus override logic and tests.
rust/src/application/commands/mod.rs Gates application init on onboarding readiness, adds --accept-agreements, and propagates orgId.
Comments suppressed due to low confidence (1)

rust/src/onboarding/ensure.rs:114

  • The test-only helper also swallows prompt I/O errors via unwrap_or(false), which can hide real failures during unit tests (and diverges from the intended runtime behavior if prompt errors should be surfaced).
    let prompt_accepted = if status.status == "PENDING" && is_tty {
        Some(prompt_accept_agreements(reader, stderr).unwrap_or(false))
    } else {
        None
    };

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rust/src/environments/mod.rs
Comment thread rust/src/onboarding/ensure.rs
Comment thread rust/src/onboarding/prompt.rs Outdated
Comment thread rust/src/onboarding/prompt.rs Outdated
@smukherjee-godaddy
smukherjee-godaddy force-pushed the DEVX-545-app-init-onboarding branch from 2d0a1cb to dd8a53e Compare July 24, 2026 15:12
@jpage-godaddy
jpage-godaddy merged commit afa87e2 into godaddy:rust-port Jul 24, 2026
1 check 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.

3 participants