No actionable comments were generated in the recent review. ๐
โน๏ธ Recent review info
โ๏ธ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
971aeb97-7036-4380-952a-c4afde0b3bbc
๐ฅ Commits
Reviewing files that changed from the base of the PR and between 988f52afc6f494d693a15924b6f34137c9b8717a and 8c9649b2c3192b6997aebbb930333668119b0b70.
๐ Files selected for processing (2)
core/crates/ployzd/src/docker/lifecycle.rscore/crates/ployzd/src/docker/mod.rs
๐ง Files skipped from review as they are similar to previous changes (2)
- core/crates/ployzd/src/docker/mod.rs
- core/crates/ployzd/src/docker/lifecycle.rs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
๐ Summary
Summary by CodeRabbit
- Bug Fixes
- Failed-to-start local ingress proxies can restart automatically when the machine is eligible, a complete container scan finds no running or restarting local proxy, and no container was created during the scan.
- Managed containers can reconnect to the Ployz network when it is missing.
- Stop-first replacements stop an existing proxy even if it was already stopped. If replacement creation fails, the previous proxy is restarted; other stopped containers remain stopped.
- Documentation
- Updated port 80 troubleshooting guidance: ingress starts automatically within a minute after the port is freed, so you donโt need to remove and re-add the server.
Walkthrough
The daemon now retries eligible failed starts for existing local ingress containers and reconnects managed containers to the
ployznetwork when needed. Stop requests suppress recovery. Stop-first replacement handling and troubleshooting instructions also change.Changes
Ingress recovery
Layer / File(s) Summary Managed-container recovery and stop state
core/crates/ployzd/src/docker/mod.rs,core/crates/ployzd/src/docker/lifecycle.rs,core/crates/ployzd/src/docker/test_support.rsManaged-container starts reconnect a missing ployznetwork. Eligible failed ingress starts can be retried, subject to stop state and the container-create count. Removal clears related tracking state. Tests cover recovery eligibility, stop coordination, and network-connection races.Scan-based ingress selection
core/crates/ployzd/src/docker/observe.rs,core/DESIGN.md,docs/user/troubleshooting/app-not-reachable.mdAfter a complete scan, the observer selects the newest system ingress only when all system ingresses are at rest and the machine participates and accepts ingress. The design and troubleshooting text describe the recovery behavior. Stop-first replacement compensation
core/crates/ployz/src/deploy/exec/mod.rs,core/crates/ployz/src/deploy/exec_tests.rs,core/crates/ployz/src/deploy/exec_tests/replacement.rsStop-first replacement attempts to stop every inspected old container. Tests cover ingress restart compensation and cases where stopped service containers remain down. Priority: โ Normal
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Sequence Diagram(s)
mermaid1 sequenceDiagram 2 participant ContainerObserver 3 participant Docker 4 participant ContainerRuntime 5 ContainerObserver->>Docker: Inspect inventoried containers 6 ContainerObserver->>ContainerObserver: Select eligible ingress after a complete scan 7 ContainerObserver->>ContainerRuntime: Start selected stranded ingress 8 ContainerRuntime->>Docker: Reattach ployz network if missing and start container - Bug Fixes
Merge Risk: ๐ก Moderate ยท up to 8c964
A narrowly timed replacement can leave the older ingress holding port 80 and prevent the newer ingress from starting. Coordinate the retry and create operations before merging, or explicitly accept this remaining risk.
Security Architecture Review
Security architecture risk: ๐ก Moderate ยท up to
988f5Recovery is narrowly scoped and coordinated with stop requests, but an ingress stop is not preserved across every recovery or rollback state. A failed replacement can restart a previously stopped ingress, and restart behavior remains uncertain for explicitly stopped containers whose last start failed.
Retained concerns
- Medium ยท security ยท observed: Stop-first replacement compensation now starts inactive system ingress even when a user had stopped it before replacement. If replacement creation or startup fails, rollback can therefore reopen the old ingress rather than restore its prior stopped state. This is an intentional documented exception, and requires a replacement operation, but changes the isolation guarantee of a prior container stop.
- Low ยท security ยท inferred: Recovery suppression for an explicit stop exists only in daemon memory. After daemon restart, a stopped failed-start ingress could become eligible again if Docker retains its nonempty start error. Ordinary stopped containers without that error are excluded, and disabling the machine's ingress role suppresses scan recovery. Actual revival remains unverified because Docker's post-stop error semantics are not established by the supplied runtime evidence.
Security review details
Security Blast Radius
- inferred โ The newly autonomous start authority is machine-local and limited to system ingress, but restoring that ingress can expose the services it routes. The inspected evidence does not establish additional cross-service propagation or the full downstream service population.
Security Findings and Attack Paths
- inferred โ The supported risk is loss of prior stop intent during rollback or recovery, not a verified unauthenticated exploit. Inconsistent labels alone were not retained as an attack path: normal creation overwrites reserved labels, and lower-privilege access to both Docker metadata and persisted specifications was not established.
Trust Boundaries and Controls
- observed โ Scan recovery is an internal lifecycle call gated by local participation and ingress policy. The inspected management request wrapper checks accepted remote credentials when connection metadata is present; its no-connection passthrough branch prevents this excerpt alone from proving authentication for every transport.
Resilience and Maintainability Implications
- observed โ Same-runtime tests cover stop precedence and failed-start eligibility. Their fake Docker start and stop responses do not update container state, so they do not establish whether a real Docker stop clears the error used by recovery after daemon restart.
Hardening Proposals
- proposed โ If per-container stop is intended to preserve isolation, persist that intent across daemon restart and distinguish pre-existing user stops from replacement-owned holds during compensation. Otherwise, explicitly define per-container stop as temporary and direct isolation workflows to durable ingress policy.
Pre-merge checks ยท Passed 4 ยท Failed 1
Failed Failed checks (1 warning)
Check name Status Explanation Resolution Docstring Coverage Warning Docstring coverage is 48.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 70 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold. Passed Passed checks (4 passed)
Check name Status Explanation Title check Passed The title clearly and concisely describes the main change: automatically starting a Server's ingress after port 80 becomes available. Description check Passed The description directly explains the port 80 failure, the retry behavior, network restoration, verification, and scope limitations covered by the changeset. Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
- Fix all pre-merge checks with AI
โจ Finishing Touches ๐ก 1
-
๐ Generate docstrings ๐ก
- Commit to this branch
- Create a new PR
๐งช Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix ยท Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.