Skip to content

improve: speed up lifecycle tests - #106501

Merged
steipete merged 2 commits into
mainfrom
codex/test-speed-telegram-crash-replay
Jul 13, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/test-speed-telegram-crash-replay

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Several lifecycle tests spent fixed wall-clock time waiting for timeouts or proving that background work stayed blocked. The three affected suites consumed about 36.17 seconds of test time, slowing focused local runs and CI feedback.

Why This Change Was Made

The Telegram crash-recovery test now advances the graceful-stop ceiling with fake time and still waits for the polling session to stop before recovering the claim. The cron process-group test polls the spawned child state, treating zombies as terminated, and the PR-operation-lock test waits for an explicit contention signal while using a test-local short retry sleep.

No production behavior changes.

User Impact

No user-visible behavior change. Contributors and maintainers get faster lifecycle-test feedback with stronger deterministic synchronization.

Evidence

  • Baseline Testbox tbx_01kxdzega6peegpmq5vfwjbnda:
    • Telegram polling: 29,186 ms
    • Cron command runner: 1,052 ms
    • PR operation lock: 5,931 ms
    • Total test time: 36,169 ms
  • Fresh exact-base Testbox tbx_01kxe1b4zs8d2qfkzds7txjb3v (Actions run):
    • Telegram polling: 13,751 ms
    • Cron command runner: 469 ms
    • PR operation lock: 5,677 ms
    • Total test time: 19,897 ms, about 45% faster
    • 139 tests passed
    • Targeted oxfmt and oxlint passed
  • Core-test, extension-test, and root-test tsgo lanes passed.
  • Fresh branch autoreview: no actionable findings.

AI-assisted. I reviewed the implementation and validation results.

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: S maintainer Maintainer-authored PR labels Jul 13, 2026
@steipete

steipete commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Land-ready proof for head 8c134671d710024468199418e2463f5cbe6668ae:

  • Blacksmith Testbox tbx_01kxe1b4zs8d2qfkzds7txjb3v / Actions run https://github.com/openclaw/openclaw/actions/runs/29262185285: 139 focused tests passed for extensions/telegram/src/polling-session.test.ts, src/cron/command-runner.test.ts, and test/scripts/pr-operation-lock.test.ts.
  • Focused test time: 36.169s before, 19.897s after (~45% faster).
  • Targeted oxfmt and oxlint passed.
  • Source, extension, and root test tsgo lanes passed on the patch.
  • After the final review fix, Blacksmith Testbox tbx_01kxe2gbbwgcb6drhmjsnpjj8z passed targeted oxfmt, oxlint, all 8 cron command-runner tests, and pnpm tsgo:test:src.
  • Fresh autoreview after that fix: no actionable findings, 0.98 confidence.
  • Final rebase preserved patch id 327736e4a35cffb6297317942869b31eed7cebac exactly.

Earlier hosted CI failures came from moving-main dead exports and worker test imports outside this three-test-file patch. Those main defects landed separately in #106492 and #106535. Exact-head CI passed: https://github.com/openclaw/openclaw/actions/runs/29264928582.

@steipete
steipete force-pushed the codex/test-speed-telegram-crash-replay branch from 9d8bf04 to dd57cb8 Compare July 13, 2026 15:49
@steipete
steipete force-pushed the codex/test-speed-telegram-crash-replay branch from dd57cb8 to 8c13467 Compare July 13, 2026 16:04
@steipete
steipete merged commit 7a0efad into main Jul 13, 2026
104 checks passed
@steipete
steipete deleted the codex/test-speed-telegram-crash-replay branch July 13, 2026 16:14
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 14, 2026
* test: remove fixed waits from lifecycle tests

* test: harden cron process liveness probe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant