Repository navigation
fix(qa): prevent Slack cleanup from stalling profile runs - #116361
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 6:58 AM ET / 10:58 UTC. ClawSweeper reviewWhat this changesThe PR prevents a stalled Slack observer request from blocking QA profile shutdown, and releases the Slack heartbeat and credential lease only after the Gateway has stopped. Merge readinessKeep this PR open for maintainer review. The current head centralizes the post-Gateway cleanup hook in the QA runner contract and moves Slack lease release to that phase, while leaving observer cancellation non-blocking before Gateway shutdown. The repository’s Priority: P2 Review scores
Verification
How this fits togetherQA Lab profile runs create a channel transport adapter that polls the live channel, owns a heartbeat and lease, and cleans up around Gateway shutdown. The adapter lifecycle feeds aggregate scenario evidence, so a cleanup wait that never settles can leave an otherwise completed profile run hanging. flowchart LR
A[QA profile run] --> B[Slack transport adapter]
B --> C[Observer polling and heartbeat]
C --> D[Pre-Gateway cleanup]
D --> E[Gateway shutdown]
E --> F[Post-Gateway cleanup]
F --> G[Lease release and aggregate evidence]
Decision needed
Why: The patch changes the shared QA transport lifecycle and is protected by the Before merge
Agent review detailsSecurityNone. PR surfaceSource -2. Total -2 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase or merge-refresh the small lifecycle change, then confirm a Slack QA profile completes and emits aggregate evidence after its final scenario while post-Gateway lease release runs once. Do we have a high-confidence way to reproduce the issue? No high-confidence independent reproduction is established here: the failure mechanism is clear from the supplied stalled-run account and the changed cleanup boundary, but the after-fix live run was still in progress. Is this the best way to solve the issue? Yes, conditionally: separating cancellation from awaited post-Gateway resource release is a narrow maintainable repair, provided the shared hook’s runner ordering is verified on the current base. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bf8da2537c64. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
* origin/main: (99 commits) docs(automation): rename scheduled-tasks feature wording to Automations (#114855) feat(ui): finish cron -> Automations rename in visible strings (#114853) feat(cli): add openclaw automations alias and reword cron display prose (#114854) feat(agents): rename scheduler agent tool cron -> automations (#114841) fix(tui): preserve session state across switches and reconnects (#116399) feat(agents): report CLI command outcomes in channel progress fix(cli): preserve explicit option intent (#116389) fix(release): trust update restart harness (#116301) test(reef): remove false-green live guard smoke (#116393) test(comfy): evaluate live guards after setup (#116388) fix(heartbeat): serialize wake lifecycle state (#116351) test: remove redundant extension boundary wrapper (#116385) fix(test): bound Testbox agentic and extension suites (#115696) fix(ui): show the correct Threads page size (#116349) test(discord): align progress timing expectations (#116377) feat(ui): add composable skill references (#116330) fix(qa): prevent Slack cleanup from stalling profile runs (#116361) fix(ci): validate frozen release candidates faithfully (#116357) improve(ci): fail_fast option for release validation, off by default (#116352) fix(agents): compare shell tool names case-insensitively and stop re-parsing tool labels ...
…16361) * fix(qa): release Slack leases after gateway stop * fix(qa): preserve async Slack cleanup contract * fix(qa): expose post-gateway adapter cleanup
What Problem This Solves
Fixes an issue where maturity profile runs would hang after the final Slack scenario had already passed, eventually consuming the full 90-minute job timeout without producing aggregate evidence.
The failed run completed the final
thread-isolationscenario at 09:56:31, then emitted no further QA progress before cancellation at 10:26:48: https://github.com/openclaw/openclaw/actions/runs/30528316514Why This Change Was Made
Slack observer cancellation no longer awaits the SDK request at the pre-Gateway cleanup boundary. The observer already owns its rejection handler, so cancellation can safely proceed while Gateway shutdown runs. Heartbeat shutdown and Convex credential release now use the existing post-Gateway cleanup phase, ensuring the Gateway is stopped before its lease is released.
User Impact
Maturity and live Slack QA runs can finish after their last scenario instead of stalling during cleanup. This has no product-runtime behavior change.
AI-assisted: yes.
Evidence
Thread and top-level session isolationsummary (wallMs: 30783) but the parent never received completion before the job timeout.node scripts/run-vitest.mjs extensions/qa-lab/src/live-transports/slack/adapter.runtime.test.ts— 3 tests passed.git diff --check— passed..agents/skills/autoreview/scripts/autoreview --mode uncommitted --stream-engine-output— clean; no accepted/actionable findings.