Repository navigation
fix(dev): prefer docker-compose for Compose-mode Podman and keep failed stacks for inspection - #4023
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR changes Podman Compose selection, development file permissions, PostgreSQL readiness, worker diagnostics, and failed-startup retention. Example: Start the Compose control plane with Kubernetes Compute and OpenShell.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 12 items remain Keep this PR open for maintainer triage: the Podman repair has value, but the patch breaks routing-file preparation, restores a PostgreSQL readiness race, and leaves parts of the logging change ineffective. Priority: P2 Decision needed
Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe development launcher provisions PostgreSQL and OCC in Compose, connects them to k3d workloads, and prepares private routing files; the worker executes queued lifecycle operations and emits operational diagnostics. flowchart LR
A[Development CLI] --> B[Compose provider]
B --> C[PostgreSQL]
B --> D[Routing file preparation]
D --> E[OCC API and worker]
E --> F[Kubernetes workloads]
E --> G[Operational logs]
Technical reviewBest possible solution: Coordinate the Podman repair with the existing startup PR, retain private-file ownership and TCP readiness, and carry accepted diagnostics through the existing logging owner. Do we have a high-confidence way to reproduce the issue? Source inspection establishes the introduced routing-file rejection and dropped diagnostic paths; no current-main Podman runtime reproduction was run. Is this the best way to solve the issue? The provider-selection repair addresses a reported limitation, but the existing ownership helper already solves non-root file access and main already protects PostgreSQL initialization with TCP readiness. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bd67c46d5e53. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 29, 2026, 5:42 AM ET / 09:42 UTC. |
|
Free's clanker here (an AI agent working on Free's behalf). Thanks for splitting this out. I reviewed head Blocking
Other
Suggested path: keep this PR to the provider preference (with @freeqaz-openai flagging this one for your review. |
The Compose command the Kubernetes profile uses passes --project-directory, which standalone podman-compose does not support, so `occ dev up` failed on hosts where Podman was selected through the podman-compose provider. Prefer docker-compose, which reaches Podman through the DOCKER_HOST endpoint startup pins, and keep podman-compose for hosts without it. `occ dev down` resolves the same provider through one shared helper, so every host that can start the Compose control plane can also stop it, and first-agent.mjs records the same preference when it replays saved state. Update the flow, driver reference, and requirements documentation, including the rootful Podman API socket the DOCKER_HOST route needs.
`occ dev up` rolls back its owned cluster, Compose stack, and state directory when startup fails, which removes the evidence needed to diagnose the failure. OCC_DEVELOPMENT_KEEP_ON_FAILURE, set to any nonempty value, keeps the failed stack, the state directory, and any copied service key, and prints a cleanup hint naming `occ dev down`; the Kubernetes-only and Compose control-plane profiles both honor it. Document the setting beside the other Kubernetes profile settings and in the environment variables cheat sheet.
e533e83 to
10f13d5
Compare
|
Thanks for the thorough review — the diagnosis on every point was correct, and the suggested path is what I took. The branch is rebased onto current Blocking
Other
|
|
Free's clanker here (an AI agent working on Free's behalf). Thanks for narrowing this down. I re-reviewed head What I checked
One docs correction left This PR changes only the Go
Please limit the new provider sentence to Kubernetes Compute ( Optional
What's left from our side is the docs correction above. Once that's in, this is ready to merge. |
|
Free's clanker here (an AI agent working on Free's behalf). Thanks for the update. I re-reviewed head What passes
1. Bug: Docker Compute The Docker Compute branch of I checked whether this matters with a small two-service Compose file (a long-running service, a one-shot service and a named volume) on rootless Podman 6.1.4:
So on such a host, Suggested fix: use the new preference only on the Kubernetes Compute Compose path, where Go owns both 2. Docs (the point from the last review, still open) The docs still say the Docker Compute entry point prefers
Please limit the provider preference to Kubernetes Compute ( Optional (unchanged from last time)
Once 1 and 2 are fixed, this looks ready to merge from our side. |
scripts/dev-up starts Docker Compute stacks with standalone podman-compose, but after the provider preference change occ dev down selected docker-compose for them when both were installed. A docker-compose down against that stack exits 0 and removes nothing, so occ dev down reported success while the stack kept running. Docker Compute down now selects the engine with the standalone provider that scripts/dev-up pins, while the Kubernetes-profile Compose command keeps the docker-compose preference on both up and down. Scope the documentation the same way, and assert the provider pin from both down paths.
|
Both points fixed in 1. Docker Compute 2. Docs scoping — Optional items
Verification on |
|
Free's clanker here (an AI agent working on Free's behalf). Thanks for the fix. I re-reviewed head 1. Docker Compute
2. Docs: fixed
Checks
Optional, not blocking
|
Problem
Two development-infrastructure gaps, found while driving the Compose control plane with Kubernetes Compute under rootful Podman:
podman-composewhenever Podman was the engine, butpodman-composedoes not support--project-directory, which the launcher's Compose command passes — soocc dev upcould not run against Podman.occ dev downresolved onlypodman-compose, so a host with onlydocker-composecould start the stack but not stop it.This is the first of four independently mergeable slices split from a larger OpenShell integration branch; it deliberately carries no OpenShell semantics.
Change
fix(dev): prefer docker-compose for Compose-mode Podman— the Kubernetes-profile Compose command thatocc dev upandocc dev downdrive prefersdocker-compose(which reaches Podman through theDOCKER_HOSTendpoint startup pins) overpodman-compose, keepingpodman-composefor hosts without it. One shared helper resolves the provider for both commands. Docker Compute keeps standalonepodman-composeon both ends:scripts/dev-uppins it to start, andocc dev downselects the same provider to stop, so a provider mismatch cannot leave a started stack running.first-agent.mjsrecords the same preference when it replays saved state. The flow, driver reference, and requirements documentation state the split, including the rootful Podman API socket theDOCKER_HOSTroute needs.feat(dev): keep a failed development stack for inspection—OCC_DEVELOPMENT_KEEP_ON_FAILURE, set to any nonempty value, keeps the failed stack, state directory, and any copied service key, and prints a cleanup hint namingocc dev down. Both the Kubernetes-only and Compose control-plane profiles honor it. Documented in the development settings reference and the environment variables cheat sheet.Dropped from the earlier revision after review: the
0644routing-file mode changes (they brokeassignComposeFileOwner's private-file check), the worker and Kubernetes Driver log-field changes (they bypassed the bounded diagnostic paths and failed thepostgres-worker-agent-revisionintegration test), and the Compose postgres healthcheck change (main's TCPpg_isreadycheck withstart_period/start_intervalalready covers slow first boots).Verification
go test ./internal/...— pass, including the newTestPodmanComposeProviderPrefersDockerCompose(both providers present →docker-compose),TestDockerComputeDownPinsStandalonePodmanCompose(Docker Compute down pinspodman-composewith both present),TestDownKubernetesComposeModePrefersDockerCompose, and thekeep on failurescenario inTestK3dCodexPreflightOrdering.node --test tests/integration/dev-up.test.mjs— 24 pass, including a new keep-on-failure case that proves the stack is kept, the hint is printed, andocc dev downstill cleans it up.node --test tests/integration/dev-up-compose.test.mjs— 59 pass (the Podman fixture still exercises thepodman-composefallback).pnpm lint,pnpm format:check,pnpm docs:check,pnpm docs:check-length,pnpm check:workspace— clean.Risks
Development tooling only. The Compose provider preference changes which binary the launcher invokes under Podman, and the keep-on-failure switch changes failure cleanup when explicitly set. No production configuration or behavior changes.