Skip to content

fix(ci): align lifecycle retry fixtures with terminal replies - #127295

Merged
vincentkoc merged 1 commit into
mainfrom
fix/gateway-shard1-fixture-current
Aug 21, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/gateway-shard1-fixture-current

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Resolves a release-validation failure where the Gateway shard's lifecycle-retry fixtures still modeled required subagent completions without producer-owned terminal replies.

Why This Change Was Made

Required-success events now carry the terminal reply owned by the producer, retry synchronization waits for the durable pending delivery payload, and the transcript-cap case is explicitly modeled as an optional completion-message fallback. Production behavior and refresh expectations are unchanged.

User Impact

No runtime behavior changes. Maintainers get an accurate Gateway release-validation signal instead of fixture failures caused by the newer terminal-reply contract.

Evidence

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts src/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.ts - 12/12 passed on rebased head.
  • Historical shard order: subagent-announce.format.e2e.test.ts, gateway.test.ts, then subagent-registry.lifecycle-retry-grace.e2e.test.ts - 109/109 passed.
  • git diff --check passed.
  • node scripts/check-changed.mjs -- src/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.ts passed all guards through the core-test typecheck; that lane then hit an unrelated isolated-install baseline error because ui/vite.config.ts could not resolve declarations for existing dependency pako.

@vincentkoc vincentkoc self-assigned this Aug 21, 2026
@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 agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Aug 21, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 21, 2026 16:58
@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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 21, 2026, 1:36 PM ET / 17:36 UTC.

ClawSweeper review

What this changes

The PR updates the subagent lifecycle-retry E2E fixture so successful required completions include terminal replies, retry waits observe durable pending payloads, and the capped transcript case is modeled as optional delivery.

Regression provenance

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

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No blocking patch findings: the fixture now matches the current producer-owned terminal-reply contract and changes only test code. This MEMBER-authored, maintainer-labeled PR should remain open for maintainer review after the incomplete exact-head CI rollup finishes.

Priority: P3
Reviewed head: 5fbc6d6702332827156383955ccf87992c0bc07f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, contract-aligned test repair with reported targeted validation and no identified correctness or security defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored, test-only PR is outside the external-contributor real-behavior-proof gate; its focused test transcript remains supplemental validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored, test-only PR is outside the external-contributor real-behavior-proof gate; its focused test transcript remains supplemental validation.
Evidence reviewed 5 items Current completion contract: A required successful subagent completion without producer terminal-reply evidence is converted to an error before transcript fallback; supplied terminal replies become the frozen completion result.
Lifecycle ingress: The registry listener normalizes the lifecycle event terminal reply and passes it into successful completion handling.
Focused diff: The PR changes only the lifecycle-retry E2E fixture relative to current main; it adds terminal-reply fixtures and keeps the oversized transcript case as an optional completion-message path.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts src/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.ts

Result: FAIL (partial) — step 2 expect_output 12 passed: expected terminal output was not visible within 30 seconds: "12 passed"

node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts src/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-127295-AEiQgA/target$ node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts src/agents/suba
gents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-127295-AEiQgA/target

node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts src/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.ts
[openclaw] Building TypeScript (dist is stale: missing_private_qa_dist - private QA dist entry missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
  - tsdown:deps (45%)
  - rolldown-plugin-dts:fake-js (24%)
  - rolldown-plugin-dts:generate (20%)
See https://rolldown.rs/reference/InputOptions.checks#plugintimings for more details.

[tsdown-build] invocation 1/11 finished in 4.7s
[tsdown-build] invocation 2/11 finished in 22.1s































Assertions:

  • FAIL expect_output: 12 passed

How this fits together

The subagent registry receives Gateway lifecycle events, records a child run’s terminal reply, and delivers its completion to the requester with retry handling. This E2E fixture drives that lifecycle through a mocked Gateway to keep release-validation behavior aligned with the runtime contract.

flowchart LR
A[Gateway lifecycle event] --> B[Terminal reply snapshot]
B --> C[Subagent registry completion]
C --> D[Durable delivery payload]
D --> E[Retry and cleanup]
E --> F[Lifecycle retry E2E fixture]
F --> G[Release validation signal]
Loading

Before merge

  • Resolve merge risk (P1) - GitHub reports the branch as clean but behind current main, and the exact-head check rollup is incomplete; wait for required checks to finish before merging.
  • Complete next step (P2) - This protected maintainer item has no mechanical repair finding; wait for exact-head CI completion and perform the normal maintainer merge review.
Agent review details

Security

None.

PR surface

Tests +76. Total +76 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 108 32 +76
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 108 32 +76

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; tests +108/-32 (net +76) All growth is in one E2E fixture; no runtime, configuration, dependency, or persisted-state surface changes.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Merge the focused fixture alignment once exact-head CI completes and a maintainer confirms the test remains the canonical coverage for lifecycle retry delivery.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Merge the focused fixture alignment once exact-head CI completes and a maintainer confirms the test remains the canonical coverage for lifecycle retry delivery.

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

Yes, from source: a required successful plain end event reaches completion without terminal-reply evidence and is converted to an error; the old fixture modeled exactly that state. The reviewer did not execute the failing pre-patch test locally.

Is this the best way to solve the issue?

Yes. Supplying producer-owned terminal replies to required-success fixtures follows the current completion boundary, while marking the transcript-cap scenario optional preserves its distinct fallback coverage.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is a focused release-validation fixture repair with no user-facing runtime behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored, test-only PR is outside the external-contributor real-behavior-proof gate; its focused test transcript remains supplemental validation.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Recent history touched the lifecycle-retry fixture immediately before this PR’s contract-alignment work. (role: recent area contributor; confidence: medium; commits: 498471396fed; files: src/agents/subagents/registry/subagent-registry.lifecycle-retry-grace.e2e.test.ts)

Rank-up moves

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

  • Let the remaining exact-head CI rollup complete 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 (1 earlier review cycle)
  • reviewed 2026-08-21T17:03:55.781Z sha 5fbc6d6 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc merged commit 52371a9 into main Aug 21, 2026
238 checks passed
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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