Repository navigation
fix(plugins): clean up failed service starts and deduplicate shutdown - #116804
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 31, 2026, 7:44 AM ET / 11:44 UTC. ClawSweeper reviewWhat this changesThe branch makes plugin services clean up resources after a partially failed start and makes concurrent or repeated shutdown calls share one cleanup operation. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain Keep this PR open for explicit maintainer handling: it carries the protected Priority: P2 Review scores
Verification
How this fits togetherPlugin services are optional sidecars registered by plugins and started during the Gateway lifecycle. Their hooks can own HTTP-route context and Gateway event subscriptions, so cleanup must stop resources before revoking the service’s event access. flowchart LR
Registry[Plugin service registry] --> Start[Start service]
Start --> Result{Start result}
Result -->|Failure| Rollback[Run owner cleanup]
Result -->|Success| Running[Track running service]
Rollback --> Revoke[Revoke event access]
Running --> Shutdown[Shared shutdown promise]
Shutdown --> Revoke
Revoke --> Gateway[Gateway lifecycle continues]
Decision needed
Why: The patch changes core plugin-service availability behavior and the protected Before merge
Agent review detailsSecurityNone. PR surfaceSource +8, Tests +95. Total +103 across 2 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one owner cleanup helper for both partial-start rollback and normal shutdown, then attach redacted after-fix lifecycle evidence from a real Gateway/plugin setup before maintainer approval. Do we have a high-confidence way to reproduce the issue? Do we have a high-confidence way to reproduce the issue? Source-reproducible with medium confidence: the current owner records services only after successful startup and has no shared shutdown promise, while the added tests specify the failing partial-start and repeated-stop paths. Is this the best way to solve the issue? Is this the best way to solve the issue? Likely yes: reusing the existing stop-owner cleanup path keeps HTTP registry scope, error isolation, reverse-order shutdown, and event revocation in one ownership boundary rather than adding a parallel rollback mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d865c9b8f567. 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
|
|
Merged via squash.
|
* commit 'd8f229f2e6c39e2dc694730c2efc479e4fb3871e': (59 commits) fix(setup): isolate failed channel probes and report doctor diagnostics (openclaw#116824) fix(telegram): preserve edit previews, message cache, and group history (openclaw#116818) fix(whatsapp): preserve interactive replies and normalize media MIME (openclaw#116816) fix(file-transfer): keep fetched media attachable in sandboxed replies (openclaw#116400) fix(browser): preserve doctor JSON failure status (openclaw#116811) fix(ollama): stream native tool call lifecycle (openclaw#116809) fix(matrix): preserve message-tool room thread routing (openclaw#116802) fix(ui): restore mobile navigation and accessible usage filters (openclaw#116751) fix(ui): coalesce profile identity refresh (openclaw#116764) fix(ui): preserve chat attachments and run ownership (openclaw#116752) fix(plugins): clean up partial service startup once (openclaw#116804) fix(qa-channel): enforce message and thread lifecycle ownership (openclaw#116801) fix(qa-lab): support groups and isolate thread timelines (openclaw#116803) feat(plugins): externalize Voyage embeddings (openclaw#116785) fix(outbound): strip echoed inbound metadata before delivery (openclaw#50520) fix(anthropic-vertex): correct multi-region endpoints (openclaw#116757) fix(ui): scope agent cron jobs and surface model catalog failures (openclaw#116771) fix(ui): preserve scoped session state across updates (openclaw#116772) fix(build): fail closed on symlinked build output roots (openclaw#116705) fix(commands): validate native settings and preserve Telegram ingress outcomes (openclaw#116773) ...
* origin/main: (52 commits) fix(setup): isolate failed channel probes and report doctor diagnostics (openclaw#116824) fix(telegram): preserve edit previews, message cache, and group history (openclaw#116818) fix(whatsapp): preserve interactive replies and normalize media MIME (openclaw#116816) fix(file-transfer): keep fetched media attachable in sandboxed replies (openclaw#116400) fix(browser): preserve doctor JSON failure status (openclaw#116811) fix(ollama): stream native tool call lifecycle (openclaw#116809) fix(matrix): preserve message-tool room thread routing (openclaw#116802) fix(ui): restore mobile navigation and accessible usage filters (openclaw#116751) fix(ui): coalesce profile identity refresh (openclaw#116764) fix(ui): preserve chat attachments and run ownership (openclaw#116752) fix(plugins): clean up partial service startup once (openclaw#116804) fix(qa-channel): enforce message and thread lifecycle ownership (openclaw#116801) fix(qa-lab): support groups and isolate thread timelines (openclaw#116803) feat(plugins): externalize Voyage embeddings (openclaw#116785) fix(outbound): strip echoed inbound metadata before delivery (openclaw#50520) fix(anthropic-vertex): correct multi-region endpoints (openclaw#116757) fix(ui): scope agent cron jobs and surface model catalog failures (openclaw#116771) fix(ui): preserve scoped session state across updates (openclaw#116772) fix(build): fail closed on symlinked build output roots (openclaw#116705) fix(commands): validate native settings and preserve Telegram ingress outcomes (openclaw#116773) ...
* commit 'd8f229f2e6c39e2dc694730c2efc479e4fb3871e': (60 commits) fix(setup): isolate failed channel probes and report doctor diagnostics (openclaw#116824) fix(telegram): preserve edit previews, message cache, and group history (openclaw#116818) fix(whatsapp): preserve interactive replies and normalize media MIME (openclaw#116816) fix(file-transfer): keep fetched media attachable in sandboxed replies (openclaw#116400) fix(browser): preserve doctor JSON failure status (openclaw#116811) fix(ollama): stream native tool call lifecycle (openclaw#116809) fix(matrix): preserve message-tool room thread routing (openclaw#116802) fix(ui): restore mobile navigation and accessible usage filters (openclaw#116751) fix(ui): coalesce profile identity refresh (openclaw#116764) fix(ui): preserve chat attachments and run ownership (openclaw#116752) fix(plugins): clean up partial service startup once (openclaw#116804) fix(qa-channel): enforce message and thread lifecycle ownership (openclaw#116801) fix(qa-lab): support groups and isolate thread timelines (openclaw#116803) feat(plugins): externalize Voyage embeddings (openclaw#116785) fix(outbound): strip echoed inbound metadata before delivery (openclaw#50520) fix(anthropic-vertex): correct multi-region endpoints (openclaw#116757) fix(ui): scope agent cron jobs and surface model catalog failures (openclaw#116771) fix(ui): preserve scoped session state across updates (openclaw#116772) fix(build): fail closed on symlinked build output roots (openclaw#116705) fix(commands): validate native settings and preserve Telegram ingress outcomes (openclaw#116773) ...
Co-authored-by: Peter Steinberger <[email protected]>
* commit '4e7fffdb98ce4d3e6fd69859bedd584cf474ec53': (59 commits) fix(setup): isolate failed channel probes and report doctor diagnostics (openclaw#116824) fix(telegram): preserve edit previews, message cache, and group history (openclaw#116818) fix(whatsapp): preserve interactive replies and normalize media MIME (openclaw#116816) fix(file-transfer): keep fetched media attachable in sandboxed replies (openclaw#116400) fix(browser): preserve doctor JSON failure status (openclaw#116811) fix(ollama): stream native tool call lifecycle (openclaw#116809) fix(matrix): preserve message-tool room thread routing (openclaw#116802) fix(ui): restore mobile navigation and accessible usage filters (openclaw#116751) fix(ui): coalesce profile identity refresh (openclaw#116764) fix(ui): preserve chat attachments and run ownership (openclaw#116752) fix(plugins): clean up partial service startup once (openclaw#116804) fix(qa-channel): enforce message and thread lifecycle ownership (openclaw#116801) fix(qa-lab): support groups and isolate thread timelines (openclaw#116803) feat(plugins): externalize Voyage embeddings (openclaw#116785) fix(outbound): strip echoed inbound metadata before delivery (openclaw#50520) fix(anthropic-vertex): correct multi-region endpoints (openclaw#116757) fix(ui): scope agent cron jobs and surface model catalog failures (openclaw#116771) fix(ui): preserve scoped session state across updates (openclaw#116772) fix(build): fail closed on symlinked build output roots (openclaw#116705) fix(commands): validate native settings and preserve Telegram ingress outcomes (openclaw#116773) ...
* origin/main: (52 commits) fix(setup): isolate failed channel probes and report doctor diagnostics (openclaw#116824) fix(telegram): preserve edit previews, message cache, and group history (openclaw#116818) fix(whatsapp): preserve interactive replies and normalize media MIME (openclaw#116816) fix(file-transfer): keep fetched media attachable in sandboxed replies (openclaw#116400) fix(browser): preserve doctor JSON failure status (openclaw#116811) fix(ollama): stream native tool call lifecycle (openclaw#116809) fix(matrix): preserve message-tool room thread routing (openclaw#116802) fix(ui): restore mobile navigation and accessible usage filters (openclaw#116751) fix(ui): coalesce profile identity refresh (openclaw#116764) fix(ui): preserve chat attachments and run ownership (openclaw#116752) fix(plugins): clean up partial service startup once (openclaw#116804) fix(qa-channel): enforce message and thread lifecycle ownership (openclaw#116801) fix(qa-lab): support groups and isolate thread timelines (openclaw#116803) feat(plugins): externalize Voyage embeddings (openclaw#116785) fix(outbound): strip echoed inbound metadata before delivery (openclaw#50520) fix(anthropic-vertex): correct multi-region endpoints (openclaw#116757) fix(ui): scope agent cron jobs and surface model catalog failures (openclaw#116771) fix(ui): preserve scoped session state across updates (openclaw#116772) fix(build): fail closed on symlinked build output roots (openclaw#116705) fix(commands): validate native settings and preserve Telegram ingress outcomes (openclaw#116773) ...
* commit '4e7fffdb98ce4d3e6fd69859bedd584cf474ec53': (60 commits) fix(setup): isolate failed channel probes and report doctor diagnostics (openclaw#116824) fix(telegram): preserve edit previews, message cache, and group history (openclaw#116818) fix(whatsapp): preserve interactive replies and normalize media MIME (openclaw#116816) fix(file-transfer): keep fetched media attachable in sandboxed replies (openclaw#116400) fix(browser): preserve doctor JSON failure status (openclaw#116811) fix(ollama): stream native tool call lifecycle (openclaw#116809) fix(matrix): preserve message-tool room thread routing (openclaw#116802) fix(ui): restore mobile navigation and accessible usage filters (openclaw#116751) fix(ui): coalesce profile identity refresh (openclaw#116764) fix(ui): preserve chat attachments and run ownership (openclaw#116752) fix(plugins): clean up partial service startup once (openclaw#116804) fix(qa-channel): enforce message and thread lifecycle ownership (openclaw#116801) fix(qa-lab): support groups and isolate thread timelines (openclaw#116803) feat(plugins): externalize Voyage embeddings (openclaw#116785) fix(outbound): strip echoed inbound metadata before delivery (openclaw#50520) fix(anthropic-vertex): correct multi-region endpoints (openclaw#116757) fix(ui): scope agent cron jobs and surface model catalog failures (openclaw#116771) fix(ui): preserve scoped session state across updates (openclaw#116772) fix(build): fail closed on symlinked build output roots (openclaw#116705) fix(commands): validate native settings and preserve Telegram ingress outcomes (openclaw#116773) ...
Summary
Verification
b4e10e8a90f4e9d0d7adffff83a229cd83d9c8fc.codex/autoqa-plugin-service-lifecycle.e24c13a116681b958364d24ec3a7eb4933141ee8.OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree /Users/steipete/.local/bin/node scripts/run-vitest.mjs src/plugins/services.test.ts: 18 plugin-service owner tests passed after the fix.gpt-5.6-sol, high reasoning): clean, confidence 0.97. Real TruffleHog 3.96 credential scan: clean.oxfmt --check, targetedoxlint,git diff --check, and final worktree cleanliness checks passed.Root causes fixed