fix(channels): stop unavailable targets repeating plugin scans#100377
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 4:28 AM ET / 08:28 UTC. Summary PR surface: Source +38, Tests +57, Docs +3. Total +98 across 4 files. Reproducibility: yes. source inspection gives a high-confidence path: failed bootstrap attempts previously removed their marker, so the next bootstrap-enabled outbound resolution repeated the registry loader. The current replacement’s non-canonical full-config hashing is also directly source-reproducible, though no live benchmark was run in this read-only review. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Use a cheap lifecycle-owned config generation identity prepared before outbound resolution, retain the bounded per-channel and registry-generation guard, and prove suppression plus recovery on the exact head in a real gateway. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence path: failed bootstrap attempts previously removed their marker, so the next bootstrap-enabled outbound resolution repeated the registry loader. The current replacement’s non-canonical full-config hashing is also directly source-reproducible, though no live benchmark was run in this read-only review. Is this the best way to solve the issue? No, not yet. The shared bootstrap seam is a better owner than heartbeat-specific preactivation, but request-time stable serialization and hashing of agent-scoped configs conflicts with the hot-path goal; a prepared lifecycle identity is safer and narrower. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f71255e47566. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +38, Tests +57, Docs +3. Total +98 across 4 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (27 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Reviewed at
The |
|
Thanks for the thorough review Amir! All three points were spot on:
See the latest commit for details. Thanks again! |
|
@clawsweeper re-review Addressed the [P1] finding from the last review — explicit normalized heartbeat plugin targets now honor caller Changes (
Test results: 145/145 pass across 4 test files. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Co-authored-by: Peter Lee <[email protected]>
|
Land-ready maintainer pass complete on exact head
Contributor credit is retained in the code commit and changelog. Thank you, @xialonglee. |
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where heartbeat and other outbound delivery routes could repeat a full runtime-plugin scan whenever an explicit or session-derived external channel target remained unavailable. A failed activation removed its retry guard, so recurring target resolution could pay the same expensive bootstrap cost on every attempt.
Why This Change Was Made
The retry invariant now lives in the shared outbound channel bootstrap owner. Failed attempts are remembered per channel, canonical runtime-config key, and combined pinned/active plugin-registry generation; a real config or registry reload allows one new attempt. A bounded 64-generation LRU preserves interleaved agent configs without unbounded process state.
This keeps activation available to every existing caller. It does not add heartbeat-specific preactivation, disable plugin bootstrap, or change unavailable-channel reporting.
User Impact
An unavailable or misconfigured external channel target now follows the normal no-target path without repeatedly rescanning every installed plugin. Fixing configuration or reloading the plugin registry still permits recovery immediately, with no new configuration required.
Evidence
1cb78cba2434eca714d42e0d7774494eee424ae2; the rebase preserves the reviewed code patch and adds maintainer-owned changelog credits.corepack pnpm test src/infra/outbound/channel-bootstrap.runtime.test.ts src/infra/outbound/channel-resolution.test.ts— 2 files, 34/34 tests passed.target:lastactivation; every unavailable route remainedno-target. Success marker:OPENCLAW_PR100377_LIVE_CLEAN_OK.Co-authored-by: Peter Lee [email protected]