Skip to content

fix(qa): preserve denial warnings during A2A finalization - #150556

Merged
vincentkoc merged 4 commits into
mainfrom
fix/qa-a2a-finalization-mock-publication-20260917
Sep 18, 2026
Merged

vincentkoc merged 4 commits into
mainfrom
fix/qa-a2a-finalization-mock-publication-20260917

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes A2A QA scenarios losing the expected denial warning when a tool-free finalization request makes the mock provider forget its original fixture.

User Impact

Internal QA-only change: disabled and allowlist-denied cross-agent sends retain the Gateway-owned warning instead of receiving an unrelated mock reply. There is no shipped Gateway, configuration, or protocol change.

Why This Change Was Made

Reuse the continuation-aware scenario selector in the mock input owner. Keep the source fixture active through finalization, stop at a new user or target turn, and prevent projected history from reviving an older fixture. The Gateway remains the owner of denial warnings.

The focused A2A regression family has its own test file and shared request helpers with per-file cleanup. This fixes the PR-only line-cap failure without dropping assertions, compressing code, or changing cap baselines. Relative to the integrated main base, production is +48/-39 lines (net +9); tests/helpers are +365/-210 (net +155). Production growth preserves the fixture-lifetime boundary and centralizes the existing selector.

The latest checkpoint renames the byte-identical helper to server.test-harness.ts and updates its two test imports. This follows the existing test-only naming contract; the raw-fetch guard, allowlist, runtime code, cleanup, and assertions are unchanged.

Evidence

Candidate head: 46ad9d0d27955cc871fd1c3234c63bd3c8a30555 (H4), based on 7048f8ce4d06d2df5809060f114e3d0e8a72718c (H3), which integrates frozen main 22d4773dd12481c746b84eda85e7907ca76281b6.

H4 checks: native formatting and signed commit hooks passed. Fresh native autoreview of the exact H3-to-H4 rename, with complete affected source and guard/test-discovery context, completed three passes with no actionable findings.

The following H4 execution gates remain required, not waived or claimed passed:

  • The previously failing raw-fetch guard: node --import ./scripts/tsx.mjs scripts/check-no-raw-channel-fetch.mts.
  • Both full affected test files, without a test-name filter: node scripts/run-vitest.mjs extensions/qa-lab/src/providers/mock-openai/server.a2a.test.ts extensions/qa-lab/src/providers/mock-openai/server.test.ts.
  • Every native-selected changed/static, import, production/test type, lint, and line-cap check, plus exact-head hosted CI, refreshed ClawSweeper review, and native prepare/merge gates. Exact-H4 hosted results will be used where available; selected lanes will not be skipped.

H3 CI 35361264989 ended with 33 successful and 17 skipped jobs. Its only originating failure was the helper filename exposing test-only fetch calls to the runtime guard; the aggregate CI gate also failed. The H3 review identified the same repair and requested the guard and both test files. H4 uses the equally recognized .test-harness.ts suffix.

Historical H3 behavior proof, not H4 execution: native run 35357431145 passed on exact H3:

  • Fresh selected-source frozen install and 512 composition tests across 13 mock-provider files.
  • Native changed checks against the frozen main base, including the five-path line-cap guard, production/test typechecks, formatting, and targeted lint.
  • Full OPENCLAW_BUILD_PRIVATE_QA=1 pnpm build, including SDK export checks and Control UI hard budgets.
  • Four canonical A2A scenarios, with zero failed or skipped cases; fresh H3 native autoreview also completed three clean passes.
Scenario H3 observed result
a2a-allowlist-denied-cross-agent-send Forbidden tool result and Gateway-owned warning; no target model run or target session.
a2a-default-cross-agent-send Accepted send, correlated tool result, and target model run/session.
a2a-disabled-cross-agent-send Disabled-send forbidden result and Gateway-owned warning; no target model run or target session.
a2a-message-tool-mirror-dedupe Exactly-once mirror delivery and the expected delivered terminal receipt.

Four distinct Bun 1.4.2 Gateway processes were verified in eight before/after observations. The controller and mock provider ran on Node 24.19.0. This is isolated QA-channel proof, not authenticated external-channel or live-model proof. Independent verification checked schema-3 evidence, all 29 archive members, and the full source/install/build/runtime receipt chain. All recorded Lab, Gateway process/group/listener, native command, and lease cleanup completed; driver/native exit and close were 0, final resource/source checks passed, and the outer proof passed.

H4 changes no production bytes, so that H3 behavior evidence remains relevant historical evidence; no H4 build or Bun rerun is claimed. The review proxy could not access detailed linked logs; independent verification used the retained complete receipts. A stopped one-shot lease is not the ordinary PR CI verdict. Older H0 proof and its disclosed disk-reserve failure remain separate history.

Non-blocking follow-ups: H3 composition emitted Vite optimizeDeps.include resolution warnings for mdast-util-from-markdown, mdast-util-gfm-table, and micromark-extension-gfm-table. Its build separately emitted node:path browser-externalization warnings in media-core, an unresolved optional sharp import in Baileys, third-party direct-eval warnings, and a startup-CSS advisory below its hard ceiling. These surfaces were not repaired or independently qualified by this A2A change.

@vincentkoc vincentkoc self-assigned this Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 12:17 PM ET / 16:17 UTC (Revision 5).

ClawSweeper review

What this changes

QA Lab keeps agent-to-agent test scenarios active through finalization so Gateway denial warnings survive, and separates their regression tests into a dedicated file with shared helpers.

Merge readiness

✅ Ready for maintainer review

The previous filename finding is resolved, with no remaining actionable findings. Current main still needs this QA correction, and the unchanged production code preserves the relevance of the recorded H3 behavior proof.

Priority: P2
Reviewed head: 46ad9d0d27955cc871fd1c3234c63bd3c8a30555

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with relevant retained runtime proof, meaningful regression coverage, and the prior actionable finding resolved.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): Recorded H3 QA-channel runs exercised the changed mock provider through real Bun Gateways, preserving both denial warnings, preventing denied target work, and retaining accepted-send and exactly-once delivery behavior. H4 leaves production bytes unchanged; detailed linked logs were inaccessible to this reviewer, and no H4 runtime rerun is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Recorded H3 QA-channel runs exercised the changed mock provider through real Bun Gateways, preserving both denial warnings, preventing denied target work, and retaining accepted-send and exactly-once delivery behavior. H4 leaves production bytes unchanged; detailed linked logs were inaccessible to this reviewer, and no H4 runtime rerun is claimed.
Evidence reviewed 9 items Previous finding resolved: GitHub’s exact-head commit diff contains only the helper rename and its two import updates. Both helper paths have blob 10dfa565e408f506005b9ae96114e8ff4adf4362, confirming identical contents.
Recognized test-only boundary: The shared scanner excludes .test-harness.ts through baseTestSuffixes; the raw-fetch guard uses that scanner without enabling test files. No guard or allowlist relaxation was introduced.
Current main still needs the fix: Fetched main selects the A2A fixture using only the latest prompt. A settled-tool finalization prompt therefore falls outside that fixture. The branch instead follows recognized continuations while stripping projected history and stopping at a new request.
Findings None None.
Security None None.

How this fits together

QA Lab’s mock model receives scenario prompts and tool results from an isolated Gateway. Its responses let QA scenarios verify denied sends, successful target runs, and exactly-once message delivery.

flowchart TD
  A[QA scenario prompt] --> B[Gateway tool execution]
  B --> C[Tool result and finalization request]
  C --> D[Mock scenario selector]
  D --> E[Continue active scenario]
  D --> F[Stop at a new user request]
  E --> G[Gateway warning or delivery result]
  F --> H[Reply to current request]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +9, Tests +155. Total +164 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 2 48 39 +9
Tests 3 365 210 +155
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 413 249 +164

Review metrics

Metric Value Why it matters
Production versus test growth Production +9 net lines; tests/helpers +155 net lines Production growth has a stated fixture-lifetime justification, while most added code protects finalization and request boundaries.

Technical review

Best possible solution:

Keep fixture lifetime in the existing mock-input owner while leaving authorization decisions and denial warnings with the Gateway.

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

Yes, source establishes the trigger: a denied A2A tool call followed by the settled-tool continuation loses the fixture on current main. The focused HTTP regressions exercise that sequence; this review did not execute it locally.

Is this the best way to solve the issue?

Yes. Reusing the continuation-aware selector repairs fixture lifetime without duplicating Gateway warning logic, and the helper rename resolves the earlier guard failure without weakening it.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b73277191cf5.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): Recorded H3 QA-channel runs exercised the changed mock provider through real Bun Gateways, preserving both denial warnings, preventing denied target work, and retaining accepted-send and exactly-once delivery behavior. H4 leaves production bytes unchanged; detailed linked logs were inaccessible to this reviewer, and no H4 runtime rerun is claimed.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This repairs a bounded internal QA failure without changing shipped Gateway authorization or configuration.
  • 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): Recorded H3 QA-channel runs exercised the changed mock provider through real Bun Gateways, preserving both denial warnings, preventing denied target work, and retaining accepted-send and exactly-once delivery behavior. H4 leaves production bytes unchanged; detailed linked logs were inaccessible to this reviewer, and no H4 runtime rerun is claimed.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded H3 QA-channel runs exercised the changed mock provider through real Bun Gateways, preserving both denial warnings, preventing denied target work, and retaining accepted-send and exactly-once delivery behavior. H4 leaves production bytes unchanged; detailed linked logs were inaccessible to this reviewer, and no H4 runtime rerun is claimed.

Evidence

What I checked:

  • Previous finding resolved: GitHub’s exact-head commit diff contains only the helper rename and its two import updates. Both helper paths have blob 10dfa565e408f506005b9ae96114e8ff4adf4362, confirming identical contents. (extensions/qa-lab/src/providers/mock-openai/server.test-harness.ts:1, 46ad9d0d2795)
  • Recognized test-only boundary: The shared scanner excludes .test-harness.ts through baseTestSuffixes; the raw-fetch guard uses that scanner without enabling test files. No guard or allowlist relaxation was introduced. (scripts/lib/ts-guard-utils.mts:16, 46ad9d0d2795)
  • Current main still needs the fix: Fetched main selects the A2A fixture using only the latest prompt. A settled-tool finalization prompt therefore falls outside that fixture. The branch instead follows recognized continuations while stripping projected history and stopping at a new request. (extensions/qa-lab/src/providers/mock-openai/server.ts:1897, b73277191cf5)
  • Behavioral regression coverage: The HTTP-boundary tests cover disabled and allowlist-denied sends through repeated finalization, fresh user turns, projected historical prompts, and the successful target message path. Extracted helpers retain per-file cleanup. (extensions/qa-lab/src/providers/mock-openai/server.a2a.test.ts:87, 46ad9d0d2795)
  • Retained production-path proof: The captured PR body records four H3 scenarios through actual Bun Gateway processes: both denials preserved Gateway warnings without target work, the allowed send created target work, and mirror delivery occurred exactly once. Tree inspection confirms both changed production files have identical H3 and H4 blobs. The linked Testbox lease run is cancelled, as distinguished in the body from its completed inner proof; detailed logs could not be reopened because their storage host is blocked. No H4 runtime rerun is claimed. (7048f8ce4d06)
  • Exact-head validation progress: Live GitHub reads show check-guards and all five changed-extension test shards succeeded for H4. The overall CI run remained in progress. This review executed no repository tests or builds. (46ad9d0d2795)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

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-09-17T03:40:14.804Z sha 0a6f61e :: blocked before merge. :: none
  • reviewed 2026-09-17T04:23:56.415Z sha 0a6f61e :: needs changes before merge. :: none
  • reviewed 2026-09-17T04:32:15.134Z sha 0a6f61e :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T15:23:46.190Z sha 7048f8c :: blocked before merge. :: [P2] [P2] Give the shared HTTP helpers a recognized test-only filename

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 17, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 17, 2026 04:27
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 7048f8ce4d06d2df5809060f114e3d0e8a72718c. The body now records the line-cap repair, integrated-main composition/static/build results, and all four canonical Bun Gateway outcomes from native run 35357431145, including runtime limits and non-blocking follow-ups. Earlier-head review and CI are historical only.

@clawsweeper

clawsweeper Bot commented Sep 18, 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. 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. labels Sep 18, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Please review exact head 46ad9d0d27955cc871fd1c3234c63bd3c8a30555. Relative to H3, the shared HTTP helper now uses the recognized .test-harness.ts suffix with identical bytes; only its two imports changed. H4 guard, full-file tests, and CI remain pending. The PR body keeps H3 build/Bun proof historical.

@clawsweeper

clawsweeper Bot commented Sep 18, 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: 🐚 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: 🦐 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 Sep 18, 2026
@vincentkoc
vincentkoc merged commit 235292b into main Sep 18, 2026
115 checks passed
@vincentkoc
vincentkoc deleted the fix/qa-a2a-finalization-mock-publication-20260917 branch September 18, 2026 16:56
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 18, 2026
…49090-prep

* 'main' of https://github.com/openclaw/openclaw: (1719 commits)
  test: remove redundant catalog benchmark gate (#151892)
  improve(ai): speed up Unicode message preparation (#151950)
  improve(logging): reduce filesystem work when polling logs (#151961)
  fix(cron): preserve scheduled work after creator turns end (#151919)
  improve(telegram): avoid rescanning expired rich-text spans (#151965)
  refactor(testing): share plugin assertion file scanner (#151960)
  fix: publish acknowledged managed task receipts (#151590)
  fix(qa): preserve denial warnings during A2A finalization (#150556)
  fix(subagents): clear expired blocks after successful delivery (#151949)
  test: share fresh CLI output fixtures (#151954)
  refactor: reuse channel status preparation (#151906)
  fix(plugins): avoid duplicate initialization and mixed registrations (#151927)
  fix: updates fail for plugins selected from local load paths (#151851)
  fix(msteams): reactions target the current inbound message (#151382)
  fix(state): keep the meeting transcript migration result when stage cleanup fails (#151370)
  improve(gateway): reduce allocations when selecting sessions by store (#151940)
  fix: finish Crabbox wrapper cancellation cleanup (#151862)
  fix(discord): preserve text when replying to bot messages (#151821)
  perf(fleet): run registry operations in SQLite workers (#148290)
  fix: keep I/O responsive across busy agent databases (#151909)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
…50556)

* fix(qa): preserve A2A denial finalization fixtures

* refactor(qa): separate A2A mock coverage and input selection

* test(qa): classify mock HTTP helpers as test harness
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: L 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