fix(test): add retry logic for session lock in R3 exec smoke tests#9
Merged
fix(test): add retry logic for session lock in R3 exec smoke tests#9
Conversation
Co-authored-by: Piboonsak <17107792+Piboonsak@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix session lock issues in R3 exec smoke tests
fix(test): add retry logic for session lock in R3 exec smoke tests
Mar 8, 2026
Piboonsak
approved these changes
Mar 8, 2026
Owner
Piboonsak
left a comment
There was a problem hiding this comment.
✅ LGTM! Changes match spec exactly. Only test script modified, retry logic + pre-wait added.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
C1/C2 exec smoke tests fail intermittently when the deploy pipeline runs while the bot has an active session —
exec datetimes out andwhoamihitssession file locked (timeout 10000ms).Summary
openclaw agentimmediately post-deploy with no retry, causing failures when a prior session held the lock.retry_exechelper (3 attempts, 10 s backoff) usingopenclaw exec --text; added 15 s settle wait after lock-file cleanup; rewired C1/C2 to useretry_exec.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
None. Test-only change; no runtime behavior affected.
Security Impact (required)
NoNoNoNoNoRepro + Verification
Environment
openclaw-sgnl-openclaw-1Steps
tests/r3-regression-tests.shimmediately after container restartexec date) or C2 (exec whoami) hits session lockExpected
Actual (before fix)
session file locked (timeout 10000ms)Evidence
Human Verification (required)
bash -n); logic traced manually for both pass and fail pathsfailwith last captured output; approval/permission error on first success → still fails C1 correctlyCompatibility / Migration
YesNoNoFailure Recovery (if this breaks)
tests/r3-regression-tests.shto previous committests/r3-regression-tests.shonlyretry_execitself may have a path issue; checkopenclaw exec --textavailability in containerRisks and Mitigations
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.