Skip to content

fix(cli): hydrate acquired deployment configuration - #380

Open
alongubkin wants to merge 2 commits into
mainfrom
alon/alien-478-fix-cli-setup-deploy-hydration
Open

fix(cli): hydrate acquired deployment configuration#380
alongubkin wants to merge 2 commits into
mainfrom
alon/alien-478-fix-cli-setup-deploy-hydration

Conversation

@alongubkin

@alongubkin alongubkin commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

  • preserve the authoritative deploymentConfig returned by acquisition before entering the deploy loop
  • fail closed when a target release cannot be fetched, decoded, or does not contain the requested platform stack
  • restore manager URL and deployment-token runtime fields after hydration
  • refresh deterministic TypeScript API outputs required by the repository generation gate

Why

The CLI previously rebuilt configuration from local arguments after acquiring a deployment and silently ignored target-release lookup failures. A setup-owned deployment could therefore enter reconciliation without its desired resource graph and complete an observe-only pass instead of applying the release.

The generated refresh is included because the required pnpm generate clean-tree gate changed the pinned outputs independently of the Rust diff.

Verification

  • cargo fmt --check -p alien-cli
  • cargo test -p alien-cli commands::deploy::tests::target_release_requires_a_stack_for_the_deployment_platform
  • cargo test -p alien-cli commands::deploy::tests::deployment_models_match_platform_delivery
  • pnpm generate
  • git diff --ignore-all-space --exit-code -- packages/core packages/sdk

@greptile-apps

greptile-apps Bot commented Aug 9, 2026

Copy link
Copy Markdown

Greptile Summary

The PR hydrates the CLI deployment configuration from the manager’s acquisition payload and makes target-release resolution fail closed.

  • Preserves the authoritative acquired deploymentConfig before reconciliation.
  • Restores manager URL and deployment-token runtime fields after hydration.
  • Rejects failed, malformed, or platform-incompatible target releases.

Confidence Score: 5/5

The PR appears safe to merge because no eligible blocking failure remains in the follow-up review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/alien-cli/src/commands/deploy.rs Hydrates configuration from acquisition, validates target-release stacks, and restores runtime-only manager credentials before running the deployment loop.

Sequence Diagram

sequenceDiagram
  participant CLI as alien CLI
  participant Manager as Deployment Manager
  participant Runner as Deployment Runner
  CLI->>Manager: Fetch deployment and target release
  Manager-->>CLI: Deployment state and release stack
  CLI->>Manager: Acquire deployment session
  Manager-->>CLI: Acquired deploymentConfig
  CLI->>CLI: Hydrate config and restore runtime fields
  CLI->>Runner: Run deployment step loop
  Runner->>Manager: Reconcile final state
  CLI->>Manager: Release deployment session
Loading

Reviews (2): Last reviewed commit: "chore: refresh generated TypeScript APIs" | Re-trigger Greptile

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