Skip to content

test(release): require live channel after restart - #127013

Merged
steipete merged 6 commits into
mainfrom
codex/release-journey-channel-health
Aug 26, 2026
Merged

steipete merged 6 commits into
mainfrom
codex/release-journey-channel-health

Conversation

@steipete

@steipete steipete commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The packaged release journey could pass after restarting the Gateway without proving that its configured ClickClack channel was actually running. A stricter first repair exposed a second issue: after restart, the journey waited only for Gateway readiness and could sample channel status before the restarted channel runtime had connected.

Why This Change Was Made

The journey now separates configuration proof from runtime proof:

  • before startup, it verifies ClickClack is configured;
  • after restart, it requires channelAccounts.clickclack.default.running === true;
  • the restart path waits for the ClickClack fixture's second socket generation before sampling status, so a cumulative first-generation connection cannot satisfy the post-restart wait.

The runtime invariant remains strict. The repair changes synchronization at the fixture owner rather than weakening the assertion or adding a timeout.

User Impact

Release validation now fails when a packaged upgrade leaves a configured channel stopped, and it does not false-fail merely because channel startup trails Gateway readiness. This protects the install → configure → restart → outbound/inbound journey that release users depend on.

Evidence

Exact rebased head: 46f15e4dd3e13d7dc26d0b6f17a9a8addcef4e48. The patch is byte-identical to the previously reviewed repair after rebasing onto current main.

  • node scripts/run-vitest.mjs run test/scripts/release-user-journey-assertions.test.ts — 19/19 passed.
  • node scripts/check-changed.mjs — passed on the exact rebased head.
  • Autoreview — clean, 0.99 confidence.
  • TruffleHog exact-patch scan — 0 findings.
  • Initial exact-head Testbox tbx_01m0hg2vxenhnya00wvcjng02d completed a real outbound/inbound round trip and then reproduced the post-restart startup race under the strict assertion.
  • Repair Testbox tbx_01m0hk4xbw4cqvm0f6789tsst8 passed before the rebase.
  • Rebased exact-head Testbox tbx_01m0yqksy3ny0qf1a0gkbf6hyv passed package build/integrity, the bare Docker image build, and release-user-journey in 76s; the delegated run completed in 8m37s.
  • Passing rebased-head Blacksmith run. The one-shot Testbox owns its delegated session shutdown, so its backing lifecycle step may appear cancelled after the successful lease exits.
  • Remote command: CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TESTBOX=1 OPENCLAW_TESTBOX_REMOTE_RUN=1 OPENCLAW_DOCKER_ALL_LANES=release-user-journey pnpm test:docker:all.

Authored by @steipete with Amp.

@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Aug 21, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 21, 2026
@clawsweeper

clawsweeper Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 6:08 AM ET / 10:08 UTC.

ClawSweeper review

What this changes

The PR updates packaged release journeys to distinguish configured channels from running channels, wait for a new fixture WebSocket generation after restart, and preserve runtime fields in the fixture plugin’s status snapshot.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: current main still permits the post-restart check to pass from configuration alone, while this PR repairs that gap with a fixture-owned reconnect generation and a runtime-state assertion. No blocking defect was found in the patch; exact-head CI remains the normal merge gate.

Priority: P2
Reviewed head: 46f15e4dd3e13d7dc26d0b6f17a9a8addcef4e48

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, owner-boundary repair with real packaged-flow proof and credible regression coverage; it awaits normal exact-head CI completion.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The PR body provides exact-head packaged Testbox evidence of the repaired restart plus outbound/inbound journey, with a linked Actions run for the rebased head.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The PR body provides exact-head packaged Testbox evidence of the repaired restart plus outbound/inbound journey, with a linked Actions run for the rebased head.
Evidence reviewed 7 items Current-main gap: Current main checks only that ClickClack is configured or has a positive summary after restart; it does not require a running account.
Current-main entry path: After Gateway readiness, current main immediately queries channel status and invokes the loose assertion, so channel startup can trail the check.
Head repair: The PR waits for fixture generation two after restart, then requires the default account’s recorded runtime state to be running.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs run test/scripts/release-user-journey-assertions.test.ts

Result: FAIL (failed) — step 1 run node scripts/run-vitest.mjs run test/scripts/release-user-journey-assertions.test.ts: previous terminal command was still running after 30 seconds: "node scripts/run-vitest.mjs run test/scripts/release-user-journey-assertions.test.ts"

[test] starting test/vitest/vitest.tooling.config.ts

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-127013-7mdIt1/target

 ✓  tooling  test/scripts/release-user-journey-assertions.test.ts (19 tests) 698ms

 Test Files  1 passed (1)
      Tests  19 passed (19)
   Start at  10:09:00
   Duration  1.22s (transform 282ms, setup 61ms, import 89ms, tests 698ms, environment 0ms)

[test] passed 1 Vitest shard in 7.87s

Assertions:

  • FAIL expect_output: 19 passed

How this fits together

The packaged release journey installs a temporary ClickClack channel plugin, starts and restarts the Gateway, and validates outbound and inbound messaging. The fixture exposes its connection generation so the journey can wait for the restarted channel before querying Gateway channel status.

flowchart LR
A[Packaged release journey] --> B[ClickClack fixture]
A --> C[Gateway restart]
C --> D[New fixture connection]
D --> E[Channel status request]
E --> F[Running-account assertion]
F --> G[Release journey result]
Loading

Before merge

  • Resolve merge risk (P1) - This intentionally makes the packaged release journey fail when a configured channel has not reached the required post-restart runtime state, so exact-head release CI should complete successfully before merge.
  • Complete next step (P2) - No discrete repair remains for automation; this active maintainer-owned PR needs the ordinary exact-head CI and merge review path.
Agent review details

Security

None.

PR surface

Tests +186, Other +48. Total +234 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 208 22 +186
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 5 69 21 +48
Total 6 277 43 +234

Review metrics

Metric Value Why it matters
Production versus test delta production 0; release-test support +69/-21; regression tests +208/-22 All added behavior is confined to the packaged release harness, fixture, and focused regression coverage; no product runtime surface grows.

Stored data model

Persistent data-model change detected: serialized state: scripts/e2e/lib/release-user-journey/assertions.mjs. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Finish exact-head release validation (recommended)
    Merge after the active exact-head checks confirm the stricter packaged release journey remains stable.

Technical review

Best possible solution:

Retain the fixture-owned generation synchronization and strict default-account runtime assertion, then merge after the exact-head release validation confirms the stronger invariant is stable.

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

Yes. Current main starts the Gateway, then immediately accepts configured-channel status after restart; the PR body also records a packaged Testbox reproduction of the startup race.

Is this the best way to solve the issue?

Yes. Recording the connection generation at the fixture owner avoids both a fixed delay and the old cumulative socket-count false positive, while Gateway status supplies the runtime fact being asserted.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides exact-head packaged Testbox evidence of the repaired restart plus outbound/inbound journey, with a linked Actions run for the rebased head.

Label justifications:

  • P2: The patch improves release-validation reliability and has no demonstrated live-user outage.
  • merge-risk: 🚨 automation: It changes the synchronization and pass/fail assertion of the packaged release CI journey.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR body provides exact-head packaged Testbox evidence of the repaired restart plus outbound/inbound journey, with a linked Actions run for the rebased head.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides exact-head packaged Testbox evidence of the repaired restart plus outbound/inbound journey, with a linked Actions run for the rebased head.

Evidence

What I checked:

Likely related people:

  • steipete: Recent history on the release-journey assertion path and the active PR both connect this contributor to the release-validation surface. (role: recent area contributor; confidence: high; commits: 95f496004287; files: scripts/e2e/lib/release-user-journey/assertions.mjs, scripts/e2e/lib/release-user-journey/scenario.sh)
  • vincentkoc: History shows extensive prior work across the ClickClack fixture and release-journey assertions, including bounded fixture-response repairs. (role: feature-history contributor; confidence: high; commits: fc1bdecf0829, de10eca7d607; files: scripts/e2e/lib/release-user-journey/clickclack-fixture.mjs, scripts/e2e/lib/release-user-journey/assertions.mjs, test/scripts/release-user-journey-assertions.test.ts)

Rank-up moves

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

  • Let the active exact-head checks finish before merge.

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 (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-21T06:33:17.954Z sha 885f027 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-21T07:44:05.119Z sha f91ac12 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-21T08:27:31.576Z sha f91ac12 :: needs changes before merge. :: [P1] Track connection generations rather than live socket count
  • reviewed 2026-08-22T12:00:41.527Z sha f91ac12 :: needs changes before merge. :: [P1] Track connection generations instead of live socket count
  • reviewed 2026-08-24T18:47:24.724Z sha f91ac12 :: needs changes before merge. :: [P1] Track connection generations instead of live socket count
  • reviewed 2026-08-26T07:09:01.892Z sha 8e4c55fe12eee1f0b7acd9a3971e1805dd8ef536 :: needs changes before merge. :: [P1] Publish a monotonic socket generation
  • reviewed 2026-08-26T08:05:08.812Z sha 44c3d8bc07196b32f42c2a720a2ee9b6f32b3c62 :: needs changes before merge. :: [P1] Preserve runtime state in the ClickClack status snapshot
  • reviewed 2026-08-26T08:28:10.889Z sha cb5ed0221e775efa80f3701ff1fe5a9daaa683b9 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added 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 proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact-head Testbox now passes after repairing the deterministic restart race without weakening the running === true invariant. The PR body includes the failing proof, root cause, current-head passing Testbox ID, Actions URL, and timings.

@clawsweeper

clawsweeper Bot commented Aug 21, 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 exact_review_queue).
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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed 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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 21, 2026
@steipete
steipete force-pushed the codex/release-journey-channel-health branch from f91ac12 to 8e4c55f Compare August 26, 2026 07:02

Copy link
Copy Markdown
Contributor Author

Rebased onto current frozen origin/main baseline 0229fe7a2a90341b73aa21c895b98e650b4bd4de; current exact head is 8e4c55fe12eee1f0b7acd9a3971e1805dd8ef536.

Post-rebase evidence:

  • 18/18 focused release-journey assertion tests pass
  • full pnpm check:changed testRoot/tooling plan passes
  • fresh branch autoreview clean at 0.99 confidence
  • TruffleHog clean
  • branch diff remains confined to the four release-journey QA files

The prior unrelated compact-shard console-routing race is fixed on the rebased base. @clawsweeper re-review

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 26, 2026
@steipete
steipete force-pushed the codex/release-journey-channel-health branch from 8e4c55f to 44c3d8b Compare August 26, 2026 07:58
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 26, 2026
@steipete
steipete force-pushed the codex/release-journey-channel-health branch from 44c3d8b to cb5ed02 Compare August 26, 2026 08:22

Copy link
Copy Markdown
Contributor Author

Rebased onto current origin/main and force-with-lease updated exact head to cb5ed0221e775efa80f3701ff1fe5a9daaa683b9. The repaired fixture now preserves its last runtime-status snapshot across disconnects while exposing a separate monotonic WebSocket generation; the regression test uses a real close/reopen lifecycle. Post-rebase: 19/19 focused tests pass, TruffleHog is clean, and fresh branch autoreview is clean at 0.99 confidence. The exact-head remote Testbox package journey is running on fresh lease tbx_01m0yjgq8qcwdy5q31vw5trr4r. @clawsweeper re-review

@clawsweeper clawsweeper Bot added 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 26, 2026
@steipete
steipete force-pushed the codex/release-journey-channel-health branch from cb5ed02 to 46f15e4 Compare August 26, 2026 10:01
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact rebased head 46f15e4dd3e13d7dc26d0b6f17a9a8addcef4e48:

  • Blacksmith Testbox tbx_01m0yqksy3ny0qf1a0gkbf6hyv passed package build/integrity, the bare Docker image, Gateway restart, and the complete release-user-journey; the lane took 76s and the delegated run 8m37s.
  • Exact-head Blacksmith run.
  • 19 focused regressions and check:changed passed.
  • Exact-head required CI and the repo-native hosted/Testbox prepare gate passed.
  • Fresh autoreview was clean at 0.99 confidence; TruffleHog found no secrets.
  • ClawSweeper verified the packaged proof and found no actionable patch defect.

The journey now distinguishes configuration from runtime health, waits for the restarted fixture's second WebSocket generation, and requires the default channel account to be running.

@steipete
steipete merged commit a842ad3 into main Aug 26, 2026
124 checks passed
@steipete
steipete deleted the codex/release-journey-channel-health branch August 26, 2026 10:27

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
* test(release): require live channel after restart

* test(release): migrate upgrade channel assertion

* test(release): assert channel runtime after restart

* test(release): await restarted channel runtime

* test(release): prove ClickClack reconnect generation

* test(release): preserve fixture runtime status

---------

Co-authored-by: Amp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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. scripts Repository scripts 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.

2 participants