You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestissue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
PR #457's auto-approval behavior is now covered well, but a few negative/dedup checks still use short Task.Delay(...) waits to prove something did not happen, and one path depends on the production 1s reconnect delay.
Follow-up:
Replace timing-based negative assertions with deterministic completion/synchronization signals.
Consider injecting a delay/time provider into GatewayConnectionManager so tests can set the post-approve reconnect delay to zero.
Preserve coverage for: other-node requests are ignored, missing approval scope is ignored, duplicate request IDs are not approved twice, and node-side skipped attempts do not suppress later operator-side approval.
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve.
Latest ClawSweeper review: 2026-05-24 07:49 UTC / May 24, 2026, 3:49 AM ET.
Workflow note: Future ClawSweeper reviews update this same comment in place.
How this review workflow works
ClawSweeper keeps one durable marker-backed review comment per issue or PR.
Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
Maintainers can also comment @clawsweeper review to request a fresh review only.
Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Summary
Keep open: current main still has fixed-delay assertions in NodePairAutoApproveTests and no deterministic completion hook or injectable post-approve delay, while the linked Repo Assist patch was closed unmerged because it mixed test cleanup with runtime operator-side auto-approve behavior.
Reproducibility: yes. from source inspection, not by running tests: current main still contains the fixed Task.Delay(200) waits in NodePairAutoApproveTests and the hard-coded 1 second post-approve delay in GatewayConnectionManager.
Next step
A narrow repair is clear if it is limited to current-main test synchronization and does not revive the removed operator-side auto-approve path.
Review details
Best possible solution:
Land a fresh focused test-determinism PR on current main, replacing only the existing node-side test waits with deterministic signals and delay injection while keeping operator-side auto-approve out unless separately approved.
Do we have a high-confidence way to reproduce the issue?
Yes from source inspection, not by running tests: current main still contains the fixed Task.Delay(200) waits in NodePairAutoApproveTests and the hard-coded 1 second post-approve delay in GatewayConnectionManager.
Is this the best way to solve the issue?
Yes for a narrow repair: deterministic completion synchronization plus an injectable test delay is the maintainable path, but #464 is not suitable as-is because it also depended on operator-side runtime code that was later removed.
Label changes:
add P3: This is low-risk test determinism cleanup with no direct production user impact.
add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
add clawsweeper:source-repro: Current issue advisory state selects this label.
add clawsweeper:queueable-fix: Current issue advisory state selects this label.
add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.
Label justifications:
P3: This is low-risk test determinism cleanup with no direct production user impact.
Acceptance criteria:
./build.ps1
dotnet test ./tests/OpenClaw.Connection.Tests/OpenClaw.Connection.Tests.csproj
dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore
Current manager still hard-codes production delay:GatewayConnectionManager still waits Task.Delay(1000) after node auto-approval, and the current source has no AutoApproveDecisionCompleted or postApproveDelay hook. (src/OpenClaw.Connection/GatewayConnectionManager.cs:903, ef6ac8acbab2)
Operator-side path was intentionally removed: Commit 45dccec removed the operator-side NodePairListUpdated auto-approve path because it could race the WSL setup node-pairing phase, so a new fix should not copy that part back blindly. (src/OpenClaw.Connection/GatewayConnectionManager.cs:239, 45dccec60c51)
Canonical search found no open replacement: GitHub issue/PR searches found this issue and the closed unmerged Repo Assist PR, but no open PR currently owning the deterministic auto-approve test cleanup.
Likely related people:
shanselman: Blame attributes the current NodePairAutoApproveTests timing waits and GatewayConnectionManager constructor baseline to Scott Hanselman, and commit 45dccec intentionally removed the operator-side auto-approve path. (role: recent area contributor; confidence: high; commits: c499c294b764, 45dccec60c51, ef6ac8acbab2; files: tests/OpenClaw.Connection.Tests/NodePairAutoApproveTests.cs, src/OpenClaw.Connection/GatewayConnectionManager.cs)
ranjeshj: Commit 7747e60 introduced the merged auto-approve refinements and post-approval reconnect flow that the tests cover. (role: feature contributor; confidence: medium; commits: 7747e6075052; files: src/OpenClaw.Connection/GatewayConnectionManager.cs, tests/OpenClaw.Connection.Tests/NodePairAutoApproveTests.cs)
Remaining risk / open question:
Copying the closed Repo Assist branch as-is would reintroduce operator-side NodePairListUpdated auto-approve behavior that was removed for a WSL setup race.
The repair should preserve the production 1 second post-approve delay by default and use any delay injection only for tests.
Codex review notes: model gpt-5.5, reasoning high; reviewed against ef6ac8acbab2.
Good news: the deterministic fix appears to be already in master (commit 2ca3457). The test file now uses WaitForApprovalCallAsync() and WaitForApprovalCompleteAsync() deterministic helpers, and GatewayConnectionManager has the _reconnectDelay injection — all the changes described in the issue. All 256 connection tests pass.
This issue looks safe to close unless there's something else outstanding.
Confirmed this is already resolved on current master. The node auto-approve tests now use deterministic synchronization helpers instead of short negative Task.Delay waits, and GatewayConnectionManager has injectable reconnect delay while preserving the production default. Targeted verification passed: dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --filter NodePairAutoApproveTests (4 passed, 0 failed). Closing as already fixed.
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestissue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
Activity
fix(tests): make node auto-approve tests deterministic
github-actions commentedon May 19, 2026
clawsweeper commentedon May 24, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve.
Latest ClawSweeper review: 2026-05-24 07:49 UTC / May 24, 2026, 3:49 AM ET.
Workflow note: Future ClawSweeper reviews update this same comment in place.
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Summary
Keep open: current main still has fixed-delay assertions in
NodePairAutoApproveTestsand no deterministic completion hook or injectable post-approve delay, while the linked Repo Assist patch was closed unmerged because it mixed test cleanup with runtime operator-side auto-approve behavior.Reproducibility: yes. from source inspection, not by running tests: current main still contains the fixed
Task.Delay(200)waits inNodePairAutoApproveTestsand the hard-coded 1 second post-approve delay inGatewayConnectionManager.Next step
A narrow repair is clear if it is limited to current-main test synchronization and does not revive the removed operator-side auto-approve path.
Review details
Best possible solution:
Land a fresh focused test-determinism PR on current main, replacing only the existing node-side test waits with deterministic signals and delay injection while keeping operator-side auto-approve out unless separately approved.
Do we have a high-confidence way to reproduce the issue?
Yes from source inspection, not by running tests: current main still contains the fixed
Task.Delay(200)waits inNodePairAutoApproveTestsand the hard-coded 1 second post-approve delay inGatewayConnectionManager.Is this the best way to solve the issue?
Yes for a narrow repair: deterministic completion synchronization plus an injectable test delay is the maintainable path, but #464 is not suitable as-is because it also depended on operator-side runtime code that was later removed.
Label changes:
P3: This is low-risk test determinism cleanup with no direct production user impact.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:queueable-fix: Current issue advisory state selects this label.clawsweeper:fix-shape-clear: Current issue advisory state selects this label.Label justifications:
P3: This is low-risk test determinism cleanup with no direct production user impact.Acceptance criteria:
What I checked:
NodePairAutoApproveTestson current main still has fourTask.Delay(200)waits in the negative/dedup auto-approve checks at lines 77, 96, 123, and 127. (tests/OpenClaw.Connection.Tests/NodePairAutoApproveTests.cs:77, ef6ac8acbab2)GatewayConnectionManagerstill waitsTask.Delay(1000)after node auto-approval, and the current source has noAutoApproveDecisionCompletedorpostApproveDelayhook. (src/OpenClaw.Connection/GatewayConnectionManager.cs:903, ef6ac8acbab2)NodePairListUpdatedauto-approve path because it could race the WSL setup node-pairing phase, so a new fix should not copy that part back blindly. (src/OpenClaw.Connection/GatewayConnectionManager.cs:239, 45dccec60c51)Likely related people:
NodePairAutoApproveTeststiming waits andGatewayConnectionManagerconstructor baseline to Scott Hanselman, and commit 45dccec intentionally removed the operator-side auto-approve path. (role: recent area contributor; confidence: high; commits: c499c294b764, 45dccec60c51, ef6ac8acbab2; files:tests/OpenClaw.Connection.Tests/NodePairAutoApproveTests.cs,src/OpenClaw.Connection/GatewayConnectionManager.cs)src/OpenClaw.Connection/GatewayConnectionManager.cs,tests/OpenClaw.Connection.Tests/NodePairAutoApproveTests.cs)Remaining risk / open question:
NodePairListUpdatedauto-approve behavior that was removed for a WSL setup race.Codex review notes: model gpt-5.5, reasoning high; reviewed against ef6ac8acbab2.
test(connection): make node auto-approve tests deterministic
github-actions commentedon May 26, 2026
test(connection): make node auto-approve tests deterministic
github-actions commentedon May 27, 2026
🤖 This is an automated response from Repo Assist.
Good news: the deterministic fix appears to be already in
master(commit2ca3457). The test file now usesWaitForApprovalCallAsync()andWaitForApprovalCompleteAsync()deterministic helpers, andGatewayConnectionManagerhas the_reconnectDelayinjection — all the changes described in the issue. All 256 connection tests pass.This issue looks safe to close unless there's something else outstanding.
ranjeshj commentedon Jun 2, 2026
Confirmed this is already resolved on current master. The node auto-approve tests now use deterministic synchronization helpers instead of short negative Task.Delay waits, and GatewayConnectionManager has injectable reconnect delay while preserving the production default. Targeted verification passed: dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --filter NodePairAutoApproveTests (4 passed, 0 failed). Closing as already fixed.
ranjeshj commentedon Jun 2, 2026
Closing as already fixed on current master.