Skip to content

fix(ci): repair release E2E regressions - #117656

Merged
vincentkoc merged 4 commits into
mainfrom
fix/release-validation-e2e-20260801-b
Aug 1, 2026
Merged

vincentkoc merged 4 commits into
mainfrom
fix/release-validation-e2e-20260801-b

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

  • update nested subagent completion E2E fixtures to the canonical execution state shape
  • return an actionable HTTP 409 when session history encounters duplicate canonical rows that require openclaw doctor --fix
  • align the stale session-history E2E expectation with the runtime migration contract

Testing

  • node scripts/run-vitest.mjs src/agents/subagent-announce.format.e2e.test.ts --reporter=dot
  • node scripts/run-vitest.mjs src/gateway/sessions-history-http.test.ts --reporter=dot
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --codex-bin /opt/homebrew/bin/codex

Context

Full release validation at exact SHA 77796591370df043cb3228d0e24d0f1077bdf2d6 exposed these deterministic repo E2E failures. The remaining live-provider and Docker failures are being classified separately and are not hidden or weakened by this patch.

@vincentkoc vincentkoc self-assigned this Aug 1, 2026
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Aug 1, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 1, 2026 21: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. P2 Normal backlog priority with limited blast radius. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 6:22 PM ET / 22:22 UTC.

ClawSweeper review

What this changes

The PR updates nested-subagent announcement fixtures to use canonical execution state and returns a migration-required HTTP 409 when gateway history requests encounter duplicate canonical session rows.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for normal maintainer review. The prior release-note finding is resolved, and the current patch correctly exposes the already fail-closed canonical-session migration conflict as an actionable HTTP 409 while updating the stale agent fixtures to the persisted execution shape.

Priority: P2
Reviewed head: 4426f0a6eb1aac4d0bea3e49ac5e37e122726880
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with matching regression coverage; the prior changelog finding has been addressed.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a repository-member PR, so the external-contributor real-behavior-proof gate does not apply; the branch nevertheless includes focused gateway-harness regression coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a repository-member PR, so the external-contributor real-behavior-proof gate does not apply; the branch nevertheless includes focused gateway-harness regression coverage.
Evidence reviewed 6 items Current failure mechanism: Current main's session-history test still expects the fresher of two alias/canonical rows, while the canonical resolver rejects any second matching row and directs the operator to run Doctor. This makes the release E2E mismatch source-reproducible.
Canonical owner contract: The session-store owner throws the typed canonical-key migration error for duplicate or non-canonical persisted entries; it does not select a freshest-row fallback.
Boundary-level repair and regression coverage: The PR catches only the known canonical-key migration error at the HTTP boundary, returns the established JSON error envelope with status 409, and drives that path through the gateway harness.
Findings None None.
Security None None.

How this fits together

The Gateway session-history endpoint authenticates a client, resolves its session key against the local session store, and returns transcript history. Subagent announcement tests model persisted child-run execution state so parent agents receive the correct completion results.

flowchart LR
  A[Authenticated gateway client] --> B[Session-history endpoint]
  B --> C[Session-key resolution]
  C --> D[Canonical session store]
  D --> E{Duplicate canonical rows?}
  E -->|No| F[Transcript history response]
  E -->|Yes| G[Migration-required HTTP 409]
  H[Subagent execution records] --> I[Completion announcement formatting]
Loading

Decision needed

Question Recommendation
Does a maintainer approve exposing the existing canonical-session migration failure to HTTP clients as a 409 response once the current-head checks finish? Approve after checks: Land the focused error-boundary repair after required checks complete, preserving Doctor as the only migration mechanism.

Why: The author is a repository member and this PR carries the protected maintainer label, so automated cleanup must not make the final landing decision even though the source-level repair is sound.

Before merge

  • Complete next step (P2) - This PR already owns the narrow repair; it only needs normal member/maintainer review and current-head check completion, not a replacement repair job.
Agent review details

Security

None.

PR surface

Source +16, Tests -12. Total +4 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 18 2 +16
Tests 2 33 45 -12
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 51 47 +4

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/gateway/sessions-history-http.test.ts, serialized state: src/gateway/sessions-history-http.test.ts, serialized state: src/gateway/sessions-history-http.ts. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Technical review

Best possible solution:

Keep duplicate canonical rows fail-closed in the session-store resolver, return the typed migration-required response at the authenticated HTTP boundary, and let openclaw doctor --fix perform the sole repair path.

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

Yes, from source: seed both alias and canonical rows for the same resolved key, then request session history. Current main's resolver throws the canonical migration-required error while the stale E2E expectation still asks for the freshest row.

Is this the best way to solve the issue?

Yes. The resolver remains the authoritative fail-closed owner for duplicate stored state; this PR only translates its typed error into an actionable HTTP response and updates tests to the canonical persisted execution shape.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a focused repair for deterministic gateway and agent release-validation failures, with bounded operator impact.
  • 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 is a repository-member PR, so the external-contributor real-behavior-proof gate does not apply; the branch nevertheless includes focused gateway-harness regression coverage.

Evidence

What I checked:

  • Current failure mechanism: Current main's session-history test still expects the fresher of two alias/canonical rows, while the canonical resolver rejects any second matching row and directs the operator to run Doctor. This makes the release E2E mismatch source-reproducible. (src/gateway/sessions-history-http.test.ts:804, d03a43a820d0)
  • Canonical owner contract: The session-store owner throws the typed canonical-key migration error for duplicate or non-canonical persisted entries; it does not select a freshest-row fallback. (src/gateway/session-utils-store.ts:174, d03a43a820d0)
  • Boundary-level repair and regression coverage: The PR catches only the known canonical-key migration error at the HTTP boundary, returns the established JSON error envelope with status 409, and drives that path through the gateway harness. (src/gateway/sessions-history-http.ts:135, 4426f0a6eb1a)
  • Agent fixture alignment: The PR's nested-child fixtures now place terminal timestamps and outcomes under execution, matching the canonical execution-state shape used across subagent announcement coverage. (src/agents/subagent-announce.format.e2e.test.ts:56, 4426f0a6eb1a)
  • Feature provenance: Blame attributes both the current endpoint call site and the duplicate-row canonical resolver to the recent canonical-session work, so the PR addresses the responsible runtime boundary rather than adding a downstream workaround. (src/gateway/session-utils-store.ts:187, ace5d9ada7ad)
  • Prior review follow-up: The earlier P3 request concerned a release-owned changelog entry. The current head includes the follow-up commit removing that entry, and the supplied current PR file list contains only the two focused test files and the gateway endpoint. (CHANGELOG.md, 4426f0a6eb1a)

Likely related people:

  • vincentkoc: Current-main blame ties the canonical resolver, the session-history call site, and the stale regression expectation to the recent canonical-session work; the PR continues that same repair. (role: recent area contributor; confidence: high; commits: ace5d9ada7ad, a2d8b7f59701; files: src/gateway/sessions-history-http.ts, src/gateway/session-utils-store.ts, src/gateway/sessions-history-http.test.ts)
  • steipete: Recent history identifies this contributor with the SQLite session/transcript refactor that established the storage neighborhood this endpoint reads. (role: major session-storage refactor contributor; confidence: medium; commits: 0a8e3604ba24, 7d71d7cf6b3c; files: src/gateway/session-utils-store.ts, src/gateway/sessions-history-http.ts)

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-01T22:09:34.274Z sha 0bddc83 :: found issues before merge. :: [P3] Remove the release-owned changelog entry

@vincentkoc
vincentkoc merged commit b84d7e3 into main Aug 1, 2026
120 checks passed
@vincentkoc
vincentkoc deleted the fix/release-validation-e2e-20260801-b branch August 1, 2026 22:27
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* test(agents): use canonical subagent execution fixtures

* fix(gateway): surface session migration conflicts

* test(gateway): remove stale history helper

* chore(release): leave changelog generation to release flow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. 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