Skip to content

fix(qa): wait for the selected channel account to become ready - #119431

Merged
steipete merged 1 commit into
mainfrom
codex/autoqa-transport-readiness-20260805
Aug 5, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/autoqa-transport-readiness-20260805

Conversation

@steipete

@steipete steipete commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where QA operators running synthetic or Crabline channel scenarios could receive a false-ready status while the selected account was still disconnected, unauthenticated, blocked, restarting, or entirely absent.

Why This Change Was Made

Both transports now share the actual channel lifecycle readiness contract: the exact selected account must be running, connected, ready, and free of a pending restart. Consolidating the duplicate pollers also preserves bounded deadlines and useful account diagnostics.

User Impact

Channel QA starts only after the intended account can receive traffic; broken startup fails with actionable lifecycle and account evidence instead of opaque scenario timeouts.

Evidence

  • Authentic pre-fix regressions failed for disconnected, starting, blocked, wrong-account, and pending-restart states; all pass after the repair.
  • Focused Crabline boundary suites: 20 passing tests, including the new readiness cases.
  • Real mock-provider QA Channel and Crabline Telegram channel-message-flows scenarios each passed 1/1.
  • Full pnpm check:changed passed, including five typecheck lanes, formatting, lint, import-cycle, and architecture guards.
  • Fresh isolated autoreview of this exact branch: clean.
  • Production code decreases by 32 lines while preserving sibling transport behavior.

Inspectable exact-head runtime proof

Exact-head required CI and all four real QA smoke profiles passed: https://github.com/openclaw/openclaw/actions/runs/30970403520

The downloadable profile-2 runtime artifact is https://github.com/openclaw/openclaw/actions/runs/30970403520/artifacts/8916344287. Its unmodified primary/qa-suite-summary.json records the actual started Gateway, Crabline transport, mock provider, and six successful user-facing scenarios:

{
  "head": "76c0d8b6d2817d45994ae74067a4f74682d201da",
  "providerMode": "mock-openai",
  "channelDriver": "crabline",
  "scenarioIds": ["subagent-completion-direct-fallback", "group-visible-reply-tool", "telegram-help-command", "telegram-tools-compact-command", "memory-dreaming-sweep", "personal-task-followthrough-status"],
  "counts": {"total": 6, "passed": 6, "failed": 0, "skipped": 0}
}

The same exact-head CI profile-4 runtime artifact https://github.com/openclaw/openclaw/actions/runs/30970403520/artifacts/8916337226 records three real Matrix Crabline restart scenarios, all passing. The patch-identical owner-boundary run also produced this captured terminal verdict:

✓ extension-qa extensions/qa-lab/src/crabline-transport-readiness.test.ts (2 tests)
✓ extension-qa extensions/qa-lab/src/crabline-transport.test.ts (18 tests)
Test Files  2 passed (2)
Tests       20 passed (20)

@steipete
steipete marked this pull request as ready for review August 5, 2026 02:48
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 11:22 PM ET / August 5, 2026, 03:22 UTC.

ClawSweeper review

What this changes

QA Lab’s synthetic and Crabline transports now wait for their selected channel account to be connected, lifecycle-ready, and not restarting before a scenario begins.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No blocking correctness finding: the PR replaces two permissive QA startup loops with one exact-account lifecycle check that matches the Gateway contract. The protected maintainer label requires explicit human clearance before normal merge gating.

Priority: P2
Reviewed head: 76c0d8b6d2817d45994ae74067a4f74682d201da
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a clean owner-boundary consolidation with focused regression coverage and credible exact-head Gateway runtime proof.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The supplied exact-head action artifact summary shows an ephemeral Gateway, Crabline transport, mock provider, and successful after-fix QA scenarios; it is appropriate proof for this QA-only transport path.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The supplied exact-head action artifact summary shows an ephemeral Gateway, Crabline transport, mock provider, and successful after-fix QA scenarios; it is appropriate proof for this QA-only transport path.
Evidence reviewed 7 items Current-main defect: Current main declares the QA-channel account ready when it is only running and not restarting, without requiring connection or recorded lifecycle readiness.
Gateway lifecycle contract: The shared ready-status factory records running, connected, and lifecycle ready together; qa-channel emits that patch only after its first successful bus poll.
Canonical repair: The PR’s shared helper requires the exact account, running, connected, lifecycle ready, and no pending restart; it also bounds each status request and sleep by the remaining deadline.
Findings None None.
Security None None.

How this fits together

QA Lab starts channel scenarios through an ephemeral Gateway and reads its channel-status snapshot before sending traffic. This check determines whether the selected transport account can receive the scenario’s messages or should return diagnostics instead.

flowchart LR
  A[QA scenario start] --> B[Selected transport]
  B --> C[Gateway channel status]
  C --> D[Selected account lifecycle]
  D -->|running connected ready| E[Run scenario traffic]
  D -->|not ready| F[Wait with diagnostics]
Loading

Decision needed

Question Recommendation
Does the protected maintainer label represent an intentional hold, or may this proven QA readiness repair proceed through the normal exact-head merge gate? Clear the hold and continue: Confirm the label is not blocking this narrowly scoped, proof-backed QA repair and allow normal merge gating.

Why: The code and supplied runtime proof support the repair, but the protected label requires explicit maintainer handling under repository policy.

Before merge

  • Resolve merge risk (P1) - The protected maintainer label requires explicit maintainer clearance before this otherwise clean PR proceeds through normal merge gates.
  • Complete next step (P2) - No mechanical repair remains; a maintainer must resolve the protected-label hold before normal merge gating.
Agent review details

Security

None.

PR surface

Source -32, Tests +140. Total +108 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 3 94 126 -32
Tests 3 155 15 +140
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 249 141 +108

Review metrics

Metric Value Why it matters
Production vs test LOC production +94/-126 (net -32); tests +155/-15 (net +140) The shared helper removes duplicate production polling logic while adding focused lifecycle and selected-account regression coverage.

Stored data model

Persistent data-model change detected: serialized state: extensions/qa-lab/src/qa-channel-transport.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the shared QA-local readiness predicate, preserving the exact-account diagnostics and bounded deadline behavior, then merge after the maintainer hold is clarified.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the shared QA-local readiness predicate, preserving the exact-account diagnostics and bounded deadline behavior, then merge after the maintainer hold is clarified.

Do we have a high-confidence way to reproduce the issue?

Yes—source-reproducible with high confidence: current main accepts a merely running selected qa-channel account and Crabline can fall back to another account, while the Gateway lifecycle contract distinguishes starting, blocked, and ready states.

Is this the best way to solve the issue?

Yes. Centralizing the two identical QA transport pollers at their shared transport boundary is the narrowest maintainable repair; live-channel adapters retain their intentionally different owner-specific readiness rules.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a8caab5c3d3c.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The supplied exact-head action artifact summary shows an ephemeral Gateway, Crabline transport, mock provider, and successful after-fix QA scenarios; it is appropriate proof for this QA-only transport path.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The supplied exact-head action artifact summary shows an ephemeral Gateway, Crabline transport, mock provider, and successful after-fix QA scenarios; it is appropriate proof for this QA-only transport path.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This corrects bounded QA scenario startup behavior with limited blast radius outside the normal operator runtime.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The supplied exact-head action artifact summary shows an ephemeral Gateway, Crabline transport, mock provider, and successful after-fix QA scenarios; it is appropriate proof for this QA-only transport path.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied exact-head action artifact summary shows an ephemeral Gateway, Crabline transport, mock provider, and successful after-fix QA scenarios; it is appropriate proof for this QA-only transport path.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Current-main blame attributes both former readiness loops to the commit that added these QA transport files. (role: introduced behavior; confidence: high; commits: 6293b54250fc; files: extensions/qa-lab/src/qa-channel-transport.ts, extensions/qa-lab/src/crabline-transport.ts)
  • steipete: Recent merged QA transport work and this exact-head repair place this contributor on the transport-readiness boundary beyond the proposed branch alone. (role: recent area contributor; confidence: high; commits: 82231b425b7f, 2073371f8097, 76c0d8b6d281; files: extensions/qa-lab/src/qa-transport.ts, extensions/qa-lab/src/qa-channel-transport.ts)
  • Dallin Romney: Authored the earlier QA transport-adapter refactor used by the surrounding transport boundary. (role: adjacent transport-contract contributor; confidence: medium; commits: 04601ae81a6d; files: extensions/qa-lab/src/qa-transport.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Clarify the protected maintainer label, then apply the normal exact-head merge gate.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-05T03:04:22.179Z sha 76c0d8b :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-05T03:10:57.403Z sha 76c0d8b :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 5, 2026
@steipete
steipete merged commit bf1bdb4 into main Aug 5, 2026
204 of 223 checks passed
@steipete
steipete deleted the codex/autoqa-transport-readiness-20260805 branch August 5, 2026 03:23
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@clawsweeper

clawsweeper Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(qa): wait for the selected channel account to become ready This is item 3/3 in the current shard. Shard 5/37.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

vincentkoc added a commit that referenced this pull request Aug 5, 2026
* origin/main:
  fix(channels): honor explicit preview streaming settings
  refactor(telegram): consolidate outbound contracts and targets (#119438)
  fix(qa): retry transport cleanup and always stop owned labs (#119442)
  fix(mcp): guard stdio stdout frame parsing against oversized-buffer crash (#119379)
  refactor(auto-reply): centralize delivery deduplication and routing (#119436)
  fix(qa): preserve scenario isolation in serial suites (#119439)
  perf(xai): lazy-load optional capability runtimes (#119374)
  refactor(browser): consolidate browser CLI and normalization helpers (#119432)
  fix(qa): require ready transport accounts (#119431)
  refactor(media): share image and video geometry normalization (#119416)
  fix(config): preserve plugin metadata for missing config (#119421)
  fix: retry delivery when outbound adapter is unavailable (#119371)
  fix(cli): retire invalid secret flags and prove doctor recovery (#118926)
  refactor(signal): share outbound and reaction transport (#119415)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant