Repository navigation
fix(stack): recreate containers whose published host port was taken before start - #7081
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🤖 AI Review
Both independent reviews completed; Codex reported no findings. Code inspection confirms one minor resource-lifetime issue and two diagnostic nits. The tracing finding is narrowed to the verified missing attempt count; its claim that every existing retry uses the helper is false. No major or critical issues were verified. Tests were read but not executed.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟡 MINOR | packages/stack/src/runtime/Container.ts:1129 |
resource-management |
claude | Abandoned retry attempts retain their environment directories and cleanup finalizers until the caller's scope closes. A successful service launch after collisions therefore keeps up to two unnecessary environment files, potentially containing secrets, for the service session's lifetime. |
| ⚪ NIT | packages/stack/src/runtime/Container.ts:1136 |
conventions |
claude | The launch span records retry.attempt_count only after removal succeeds and another attempt is scheduled. First-attempt success, first-attempt terminal failure, and removal failure before the first retry omit the count. |
| ⚪ NIT | packages/stack/src/runtime/Container.ts:1135 |
error-handling |
claude | If removing a collided container fails, the retry branch replaces the removal failure with the original launch error without explicitly logging or preserving the cleanup failure, obscuring why retrying stopped. |
Stats
Claude findings: 3 · Codex findings: 0 · Confirmed: 3 · Refuted: 0 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
avallete
approved these changes
Oct 9, 2026
jgoux
enabled auto-merge
October 9, 2026 16:24
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 9, 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.
TL;DR
stops a container service from failing to start when its published host port is taken between create and start.
whats broken?
containers publish with an engine-chosen host port (
127.0.0.1::<port>). Podman picks that port at create by opening and closing a socket, and pasta only binds it at start. Anything that grabs the port in between, such as an outbound connection from another stack, fails the start withListen failed for HOST TCP port …: Address in use.now fixed by:
ref: