fix(supervisor): preserve siblings during targeted lifecycle - #106
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 4:51 PM ET / 20:51 UTC. ClawSweeper reviewWhat this changesThe PR reconciles only the target environment during service start and environment create/clone/import, while fully reconciling the fleet before activating a stopped supervisor daemon. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer review. The current head narrowly fixes target-scoped supervisor synchronization and adds focused regression coverage; it remains a MEMBER-authored PR with pending platform checks. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherOCM lifecycle commands persist desired environment service state for a shared supervisor daemon. The daemon consumes that state to run OpenClaw gateway child processes. flowchart LR
A[Lifecycle command] --> B[Environment metadata]
B --> C[Targeted supervisor sync]
C --> D[Persisted child state]
D --> E[Gateway child processes]
B --> F[Stopped daemon check]
F --> G[Full fleet sync]
G --> D
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Merge the target-only reconciliation after the latest macOS and Ubuntu checks pass, preserving the focused lifecycle regressions. Do we have a high-confidence way to reproduce the issue? Yes, from source: focused daemon-runtime tests create sibling services, introduce drift, and assert sibling specifications and PIDs remain unchanged. Is this the best way to solve the issue? Yes. Reusing existing targeted synchronization and reserving fleet sync for stopped-daemon activation is the narrowest maintainable repair. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning high; reviewed against 6044dbaf5e55. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (12 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review Addressed the stopped-daemon finding and added the clone-isolation fix exposed |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review Addressed the import-isolation finding on head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Extended the creation path at
Evidence:
No live OCM environment or Gateway was used during proof. |
Summary
service startIncidents
Two related fleet-isolation failures were reproduced:
ocm service start openclawrebuilt complete fleet state andrelaunched unrelated gateways when latent sibling drift was present.
ocm env clone clawpatrol <canary>rebuilt complete fleet state andreloaded production OpenClaw during supervisor convergence.
Both failures came from target-scoped commands invoking fleet-wide supervisor
synchronization.
Behavior
only the named environment.
activation so stale persisted sibling definitions are not launched.
regenerate sibling specs.
Validation
cargo fmt --all -- --checkcargo check --workspace --all-targets --lockedservice_start_preserves_running_siblings_despite_unrelated_driftservice_start_reconciles_siblings_before_activating_stopped_daemonenv_clone_preserves_unrelated_supervisor_child_specsenv_import_preserves_unrelated_supervisor_child_specscargo test --test daemon_runtime_tests -- --test-threads=1cargo test --all-targets --locked -- --test-threads=1 --skip bin_wrapper_runs_with_an_overridden_homecargo build --release --lockedThe skipped wrapper test requires
rustup, which is not installed on thedeployment host. Every executed test passed.