Repository navigation
Conversation
|
Codex review: needs changes before merge. Summary Reproducibility: yes. by source inspection: current main has the one-reconnect Discord READY failure path, direct Discord reply delivery without a final send-boundary scrub, and no sessions.list startup gate. I did not perform live Discord or Gateway soak reproduction in this read-only review. Next step before merge Security Review findings
Review detailsBest possible solution: Keep the code/test hardening, remove or rewrite the status artifact as generic documentation, broaden the changelog entry to cover the user-facing fixes, then land after targeted checks remain green. Do we have a high-confidence way to reproduce the issue? Yes by source inspection: current main has the one-reconnect Discord READY failure path, direct Discord reply delivery without a final send-boundary scrub, and no sessions.list startup gate. I did not perform live Discord or Gateway soak reproduction in this read-only review. Is this the best way to solve the issue? No, not as-is: the code changes fit the existing startup-unavailable, approval-bootstrap, Discord lifecycle, and outbound-delivery boundaries, but the incident status note belongs in PR evidence or a private artifact rather than source docs. The remaining changelog entry should describe the full user-facing startup and Discord reply-safety fix. Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 29a3e71106ac. |
|
Addressed clawsweeper feedback in 9769dc0daf:
Validation run locally:
|
a454c9b to
8ef28b8
Compare
(cherry picked from commit 3956672106b3387d42427a485a9ca01e77f3b78f)
88e1aa4 to
b1a386e
Compare
|
Landed via rebase onto main.
Thanks @NikolaFC! |
Summary
This PR hardens two incident-adjacent paths:
sessions.listduring startup so Control UI polling does not compete with sidecar/channel readiness through the expensive session scan path;Why
A local production incident showed a bad interaction between startup readiness pressure and front-channel output safety. The failure mode included transient Gateway readiness stalls, slow
sessions.liststartup calls, and Discord-visible internal execution/commentary-like text. This PR adds both startup resilience and a final Discord delivery guard so the channel boundary is safer even if upstream output assembly makes a mistake.Production validation
e5b08409453c55967a89156b480c8e2a8d7a35a9built and run from a local source checkout viadist/index.jsin an isolatedOPENCLAW_HOME, loopback-only Gateway, auth disabled, channel plugins disabled./usr/bin/node dist/index.js gateway --port 29988 --auth none --allow-unconfigured.GET /healthreturned{"ok":true,"status":"live"}.git revert <this commit>, rebuild, and restart the operator-managed Gateway service.Validation
pnpm install --frozen-lockfilenode scripts/run-vitest.mjs run --config test/vitest/vitest.extension-discord.config.ts extensions/discord/src/monitor/provider.lifecycle.test.ts extensions/discord/src/monitor/reply-delivery.test.tsOPENCLAW_GATEWAY_PROJECT_SHARDS=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/server-methods.control-plane-rate-limit.test.tsnode scripts/run-vitest.mjs run --config test/vitest/vitest.infra.config.ts src/infra/approval-handler-bootstrap.test.ts src/infra/exec-approval-channel-runtime.test.tspnpm buildreadyon port29988./healthreturned live status./proc/<pid>/cmdline.git diff --checkRisk / compatibility notes
sessions.listis temporarily unavailable during startup until sidecars clear startup gating. Clients should retry retryable startupUNAVAILABLEresponses.