Skip to content

fix: report completed deployment cleanup - #624

Merged
alongubkin merged 1 commit into
mainfrom
alon/alien-796-report-completed-deployment-cleanup
Sep 14, 2026
Merged

alongubkin merged 1 commit into
mainfrom
alon/alien-796-report-completed-deployment-cleanup

Conversation

@alongubkin

@alongubkin alongubkin commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • return a typed delete response that tells setup clients whether setup-owned cleanup is still required
  • let generated deployment CLIs finish cleanly when the manager already removed a never-provisioned deployment
  • preserve compatibility with older managers by treating an absent cleanup result as cleanup required
  • regenerate the Manager OpenAPI and Rust SDK inputs from the route schema

Why

A deployment that fails initial preflights before creating stack state owns no cloud resources. The Platform can safely remove that empty record, but the generated CLI previously continued into setup teardown and received a 404 because the deployment was already gone.

The response is explicit rather than inferred from messages or errors. Existing managers remain safe: a new CLI defaults a missing field to continuing cleanup.

Validation

  • cargo test -p alien-manager routes::deployments::tests --lib (6 passed, including both route response outcomes)
  • cargo test -p alien-deploy-cli commands::down::tests (7 passed)
  • pnpm run generate:manager-rust-sdk reproduced the checked-in OpenAPI inputs with no diff
  • real malformed generated-CLI fixture dep_np5lyeeke2aqndq5raweleoi3cak: one ordinary destroy removed the deployment, operation, certificate, and local tracker without setup teardown; an exact-tag AWS audit was empty

Stack

Stacked on #620 until its teardown retry and lease-renewal changes merge.

Linear: ALIEN-796

@greptile-apps

greptile-apps Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge, with the cleanup decision covered at both the manager route and CLI control-flow levels.

Fix All in CodexFindings

  1. P1 Patch release breaks consumers ▶
Fix with agent prompt
### Issue 1
client-sdks/manager/typescript/package.json:undefined-4
This patch release changes the exported `RemoteAwsSandboxBinding` property from `idleSuspendSeconds` to `idlePauseSeconds`. Existing TypeScript consumers that access or construct the former property will fail to compile after upgrading from 3.3.21 to 3.3.22. Preserve a compatible alias or publish this breaking SDK contract change under an appropriate major version.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

  • Adds a typed DeleteDeploymentResponse to the manager route and OpenAPI contracts.
  • Determines cleanup responsibility from whether the deployment remains after the cleanup request.
  • Preserves compatibility with older managers by treating a missing cleanup result as requiring teardown.
  • Adds route and CLI coverage for both retained-record and completed-deletion outcomes.
  • The earlier TypeScript SDK compatibility finding no longer applies because the final PR diff does not contain that SDK change.

Diagram

sequenceDiagram
    participant CLI as Deployment CLI
    participant Manager as Manager API
    participant Store as Deployment Store
    CLI->>Manager: cleanup deletion request
    Manager->>Store: mark delete pending
    Manager->>Store: read deployment
    alt Deployment remains
        Manager-->>CLI: "cleanupRequired = true"
        CLI->>Manager: acquire setup teardown
    else Deployment removed
        Manager-->>CLI: "cleanupRequired = false"
        CLI-->>CLI: finish without setup teardown
    end
Loading

Reviews (4) · Last reviewed commit: "fix: report completed deployment cleanup"

Comment thread client-sdks/manager/typescript/package.json
Comment thread crates/alien-manager/src/routes/deployments.rs Outdated
Base automatically changed from alon/alien-794-setup-owned-teardown-renew-lease to alon/alien-793-generated-deploy-cli-cannot-retry-failed-setup-teardown September 14, 2026 09:16
@alongubkin
alongubkin force-pushed the alon/alien-796-report-completed-deployment-cleanup branch from 79a0648 to 5ca067c Compare September 14, 2026 09:57
@alongubkin

Copy link
Copy Markdown
Member Author

@greptileai Please review exact head 5ca067c. The TypeScript SDK drift is removed; the PR now contains only five intended route/OpenAPI/CLI files. Added HTTP route tests for both cleanupRequired outcomes, reran 6 Manager route tests and 7 CLI teardown tests, and regenerated the Manager Rust SDK inputs from source with no residual diff.

Base automatically changed from alon/alien-793-generated-deploy-cli-cannot-retry-failed-setup-teardown to main September 14, 2026 10:03
@alongubkin
alongubkin force-pushed the alon/alien-796-report-completed-deployment-cleanup branch from 5ca067c to a089575 Compare September 14, 2026 10:04
@alongubkin

Copy link
Copy Markdown
Member Author

@greptileai Please re-review the current head after the clean rebase onto main. Confirm the cleanup response lifecycle remains correct and rate this exact head.

@alongubkin
alongubkin force-pushed the alon/alien-796-report-completed-deployment-cleanup branch from a089575 to 5b781a5 Compare September 14, 2026 11:02
@alongubkin

Copy link
Copy Markdown
Member Author

@greptileai Please review exact head 5b781a5 after the final rebase onto main. The diff remains limited to the five intended cleanup-response route, generated API, and deploy CLI files.

@alongubkin
alongubkin enabled auto-merge (squash) September 14, 2026 11:35
@alongubkin
alongubkin merged commit 420f1e3 into main Sep 14, 2026
21 checks passed
@alongubkin
alongubkin deleted the alon/alien-796-report-completed-deployment-cleanup branch September 14, 2026 17:20
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