Skip to content

fix(qa): restore prerelease validation - #118255

Merged
vincentkoc merged 2 commits into
mainfrom
fix/beta8-native-i18n-20260802
Aug 3, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/beta8-native-i18n-20260802

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 2, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Resolves two deterministic prerelease validation failures that blocked the
Beta 8 candidate lane:

  • WhatsApp inbox fixtures returned an unaccepted send result.
  • QA Lab did not recognize the successful structured Code Mode write result,
    so the Anthropic compaction retry scenario timed out after the write.

The separate OpenAI realtime teardown failure was fixed on main by #118204
and is intentionally not duplicated here.

Why This Change Was Made

The production contracts are correct. This updates the owning WhatsApp fixture
and QA mock-provider recognition without weakening send acceptance or replay
safety.

Direct inspection of openai/codex@bb5054fe47ab confirms that dynamic-tool
responses preserve client inputText through the app-server and core tool
handler, including structured JSON text. OpenClaw's Code Mode adapter sends the
tool result text through that contract unchanged.

User Impact

No runtime user behavior changes. Prerelease validation now exercises the
current production contracts without deterministic fixture failures.

Evidence

AI-assisted: yes. The changes and proof were reviewed directly.

@vincentkoc vincentkoc self-assigned this Aug 2, 2026
@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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 10:05 PM ET / August 3, 2026, 02:05 UTC.

ClawSweeper review

What this changes

The PR updates QA Lab’s mock provider to recognize structured Code Mode write results and makes WhatsApp monitor test fixtures return accepted send results so prerelease scenarios match current production contracts.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this maintainer-authored PR open: current main still only recognizes the legacy text write result, while the branch adds deterministic recognition for the structured completed, replay-unsafe write envelope and accepted WhatsApp fixture sends. The proposed change is narrow and covered by focused regressions, but this review cannot complete the repository-required direct Codex source check because the sibling ../codex checkout is absent and network access is unavailable.

Priority: P2
Reviewed head: a5d768667b6c6439a1ff552a1aef175c791b1c99

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and regression-tested, but the repository-required direct Codex contract check could not be completed in this review environment.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a maintainer-authored PR, so the external-contributor proof gate does not apply; its body nevertheless links focused Testbox and CI evidence for the repaired scenarios.
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 maintainer-authored PR, so the external-contributor proof gate does not apply; its body nevertheless links focused Testbox and CI evidence for the repaired scenarios.
Evidence reviewed 8 items Current main still misses the structured result: Current main accepts only the legacy human-readable “Successfully wrote …” string, so it does not recognize the structured envelope exercised by this PR.
OpenClaw owns the structured write fields: The Code Mode execution path returns the completed value and replay-safety fact, while the write tool produces created, changed, patch, and firstChangedLine fields for small created files.
WhatsApp fixture change follows the accepted-send invariant: The WhatsApp send path requires an accepted result before persisting delivery facts; the proposed socket doubles now provide a stable message key instead of undefined.
Findings None None.
Security None None.

How this fits together

QA Lab drives prerelease scenarios through mock provider responses, and WhatsApp monitor fixtures emulate channel socket sends. These components feed release-validation checks that must distinguish completed writes and accepted message sends from failed or replay-safe outcomes.

flowchart LR
  Scenario[Prerelease scenario] --> MockProvider[QA mock provider]
  MockProvider --> ResultMatcher[Structured write-result matcher]
  ResultMatcher --> RetryFlow[Compaction retry response]
  SocketFixture[WhatsApp socket fixture] --> SendResult[Accepted send result]
  SendResult --> LifecycleTest[Monitor lifecycle test]
  RetryFlow --> ReleaseValidation[Prerelease validation]
  LifecycleTest --> ReleaseValidation
Loading

Before merge

  • Resolve merge risk (P1) - The repository’s Code Mode review gate remains incomplete: a reviewer must directly inspect the sibling Codex transport source before treating the structured envelope assumption as merge-ready.
  • Resolve merge risk (P1) - Hosted checks are still in progress in the supplied PR state; merge should use the final exact-head CI result rather than only the earlier linked runs.
Agent review details

Security

None.

PR surface

Source +50, Tests +173. Total +223 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 53 3 +50
Tests 2 175 2 +173
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 228 5 +223

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Complete the transport-contract check (recommended)
    Inspect the required sibling Codex dynamic-tool transport source, confirm it does not redefine the OpenClaw result envelope, then rely on the exact-head prerelease proof before merging.
  2. Pause for a fresh review environment
    Hold the PR until a reviewer has a checkout that includes both OpenClaw and the required sibling Codex source.

Technical review

Best possible solution:

Make the sibling Codex source available for the required transport-boundary inspection, then merge this focused QA-only repair once the current merge head has green prerelease validation.

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

Yes, at source level: current main accepts only a legacy text write result, while the branch supplies a deterministic structured completion scenario and regression cases. The PR body also reports successful after-fix CI/Testbox runs, but this read-only review did not execute them.

Is this the best way to solve the issue?

Yes, conditionally: the patch updates the QA and fixture owners rather than weakening production acceptance or replay policy, and it preserves negative cases. Direct Codex transport-source inspection is still required by repository policy before a merge-ready verdict.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded repair for deterministic prerelease validation rather than a reported user-runtime regression.
  • merge-risk: 🚨 automation: The changed matcher and channel fixtures decide whether release-validation automation recognizes successful operations.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; 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 maintainer-authored PR, so the external-contributor proof gate does not apply; its body nevertheless links focused Testbox and CI evidence for the repaired scenarios.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Current-main blame assigns the existing QA matcher and the nearby WhatsApp/write-contract paths to the recent fixture compaction commit. (role: recent current-main area contributor; confidence: medium; commits: 4276c0e774e3; files: extensions/qa-lab/src/providers/mock-openai/mock-openai-assistant-text.ts, extensions/whatsapp/src/send.ts, src/agents/sessions/tools/write.ts)

Rank-up moves

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

  • Inspect the sibling Codex dynamic-tool transport source before granting a merge-ready verdict.
  • Wait for the supplied in-progress checks to finish on the exact head.

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 (4 earlier review cycles)
  • reviewed 2026-08-02T22:26:58.198Z sha 973ecfc76ed973646de95dcb0a5e8de581a24875 :: found issues before merge. :: [P2] Verify the structured write envelope against Codex
  • reviewed 2026-08-02T22:40:36.577Z sha 4baccb88c2d1609c9a4eef735a4e2e4c6c78a2ea :: found issues before merge. :: [P2] Verify the Code Mode result contract before matching its full patch
  • reviewed 2026-08-02T22:55:28.374Z sha a5d7686 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-02T23:00:21.728Z sha a5d7686 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc force-pushed the fix/beta8-native-i18n-20260802 branch from 973ecfc to 4baccb8 Compare August 2, 2026 22:35
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Addressed the prior P2 at head a5d768667b6c6439a1ff552a1aef175c791b1c99.

  • OpenClaw owns this envelope: src/agents/code-mode-execution.ts:500 returns the worker status/value plus host-owned replaySafe; src/agents/code-mode-bridge.ts:433 obtains the write value through the OpenClaw tool runtime.
  • The write owner declares changed, created, patch, and optional firstChangedLine in src/agents/sessions/tools/write.ts:42, and creates those details in src/agents/sessions/tools/write.ts:390.
  • Direct sibling Codex inspection confirms Codex is only the transport boundary here: codex-rs/app-server/src/dynamic_tools.rs:16 decodes and forwards content_items plus success, matching codex-rs/protocol/src/dynamic_tools.rs:58. It does not define the OpenClaw Code Mode result envelope.
  • The matcher now checks completed, replay-unsafe creation semantics and verifies the expected added line within the target file's patch section. It no longer exact-matches display diff text, hunk headers, line endings, or trailing newline.
  • Regression coverage accepts representation changes and rejects failed, replay-safe, unchanged, wrong-target, and cross-file false-positive results.
  • Fresh autoreview on the exact formatted patch: clean, no actionable findings, confidence 0.97.

The linked-worktree local test could not load because its existing native binding is stale (configureFsSafeNative is not a function); no dependency reconciliation was attempted there. Exact Testbox proof follows through the native prepare gate.

@clawsweeper

clawsweeper Bot commented Aug 2, 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 status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 2, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 3, 2026 02:00
@vincentkoc
vincentkoc merged commit f5637c0 into main Aug 3, 2026
191 of 197 checks passed
@vincentkoc
vincentkoc deleted the fix/beta8-native-i18n-20260802 branch August 3, 2026 02:09
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 3, 2026
* origin/main:
  refactor(agents): centralize terminal lifecycle outcomes (#118254)
  fix(scripts): warm gateway concurrency probes (#118364)
  test(discord): consolidate activity HTTP fixtures (#118314)
  fix(qa): restore prerelease validation (#118255)
  improve(tests): focus overflow compaction owner coverage (#118351)
  test(telegram): deduplicate dispatch fixtures (#118319)
  test(xai): consolidate realtime voice fixtures (#118318)
  fix(telegram): prevent durable ingress lane spins (#118357)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
* test(whatsapp): return accepted monitor send results

* fix(qa): recognize Code Mode write results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: whatsapp-web Channel integration: whatsapp-web extensions: qa-lab 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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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