Skip to content

chore(gateway): add HTTP API QA coverage - #118809

Merged
vincentkoc merged 1 commit into
mainfrom
qa-gateway-b1-http-apis
Aug 3, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
qa-gateway-b1-http-apis

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The canonical QA portfolio did not have first-class product proof for the Gateway's OpenAI-compatible HTTP APIs, tool invocation endpoint, or hook ingress boundary.

Why This Change Was Made

Adds one full-Gateway TCP test and one QA scenario claiming exactly:

  • gateway.openai-compatible-apis
  • gateway.tool-invocation-api
  • gateway.hook-ingress

The proof uses deterministic agent responses, a real local OpenAI-compatible embedding fixture, the real agents_list tool, and the real system-event queue. It changes no production code.

User Impact

No runtime behavior changes. Maintainers gain executable regression coverage for the public Gateway HTTP boundaries.

Evidence

  • Exact head: 0b0f1052788d3dc2bd9b0e70d23bc6d8f6f1356d
  • Blacksmith Testbox: tbx_01kz4epa6rh91kxhwz00vwpe8p (harbor-krill-55eb)
  • Run: https://github.com/openclaw/openclaw/actions/runs/30842143890
  • Focused Gateway HTTP E2E: 1 file, 1 test passed
  • Private QA build: passed
  • QA scenario gateway-http-apis: passed
  • Evidence schema: openclaw.qa.evidence-summary v2
  • Evidence source ref: exact head
  • Evidence counts: total 1, passed 1, failed 0, skipped 0
  • Primary coverage: exactly the three IDs listed above
  • Path-scoped pnpm check:changed: passed, including tsgo, all lint shards, formatting, guards, and import cycles
  • Autoreview: clean, no accepted/actionable findings, overall 0.99
  • git diff --check: passed
  • Production LOC delta: +0/-0

AI-assisted.

@vincentkoc vincentkoc self-assigned this Aug 3, 2026
@vincentkoc
vincentkoc force-pushed the qa-gateway-b1-http-apis branch from d2d38d2 to 0b0f105 Compare August 3, 2026 18:37
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 3:13 PM ET / 19:13 UTC.

ClawSweeper review

What this changes

This PR adds a QA scenario and an end-to-end Gateway test that exercises OpenAI-compatible model, chat, responses, embedding, tool-invocation, and wake-hook HTTP routes over local TCP.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this maintainer-authored, maintainer-labeled draft open. Static review found a focused full-Gateway TCP QA test and matching scenario for the declared HTTP boundaries, with no discrete patch defect; the remaining gate is exact-head focused test evidence after the in-progress check completes.

Priority: P3
Reviewed head: 0b0f1052788d3dc2bd9b0e70d23bc6d8f6f1356d

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and statically consistent with the current Gateway contracts, but its exact-head runtime proof is still pending.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: This maintainer-authored QA-only draft is exempt from the external-contributor real-behavior-proof gate; the focused exact-head Gateway test output remains the relevant validation evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored QA-only draft is exempt from the external-contributor real-behavior-proof gate; the focused exact-head Gateway test output remains the relevant validation evidence.
Evidence reviewed 6 items Focused end-to-end coverage: The proposed test starts the Gateway on loopback TCP, enables the OpenAI-compatible and Responses routes, then verifies models, chat, responses, embeddings, tools, and authenticated/unauthenticated wake-hook behavior.
Scenario matches the executable proof: The added QA scenario declares the three Gateway coverage claims and points its Vitest execution path at the added TCP test.
Test isolation contract: The shared Gateway test hooks create an isolated test home before each test and clean it afterward; their reset path also drains system events for the configured main sessions.
Findings None None.
Security None None.

How this fits together

Gateway exposes HTTP endpoints that authenticate callers, dispatch agent and tool work, call configured embedding providers, and enqueue authenticated hook events. This PR adds QA-Lab metadata and a test that sends HTTP requests through that public boundary and checks the observable responses and event queue.

flowchart LR
  Client[HTTP client] --> Auth[Gateway authentication]
  Auth --> Routes[Gateway HTTP routes]
  Routes --> Agents[Agent and tool dispatch]
  Routes --> Embeddings[Embedding provider]
  Routes --> Hooks[Wake hook event queue]
  Agents --> Responses[HTTP JSON responses]
  Embeddings --> Responses
  Hooks --> Responses
  Routes --> QA[QA-Lab TCP regression proof]
Loading

Before merge

  • Resolve merge risk (P1) - The focused exact-head check is still in progress, so this review cannot yet confirm runtime execution time, cleanup behavior, or stability in the configured QA lane.
  • Complete next step (P2) - Keep the maintainer-authored draft open for its in-progress exact-head QA result and ordinary maintainer review; there is no discrete repair finding for an automated worker.
Agent review details

Security

None.

PR surface

Tests +278, Other +32. Total +310 across 2 files.

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

Review metrics

Metric Value Why it matters
Production vs QA LOC production +0, tests +278, QA scenario metadata +32 The branch adds regression coverage and catalog metadata only; no shipped runtime behavior or configuration surface changes.

Stored data model

Persistent data-model change detected: serialized state: test/e2e/qa-lab/runtime/gateway-http-apis.e2e.test.ts, vector/embedding metadata: qa/scenarios/runtime/gateway-http-apis.yaml, vector/embedding metadata: test/e2e/qa-lab/runtime/gateway-http-apis.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the dedicated TCP coverage after the focused exact-head QA run demonstrates the scenario is discovered, passes reliably, and leaves no Gateway test-state residue.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the dedicated TCP coverage after the focused exact-head QA run demonstrates the scenario is discovered, passes reliably, and leaves no Gateway test-state residue.

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

Not applicable: this PR adds regression coverage rather than repairing a reported user-visible failure. The source provides a clear local TCP exercise path, but it was not executed in this read-only review.

Is this the best way to solve the issue?

Yes. A dedicated QA scenario plus a full-Gateway loopback test is the maintainable place to prove the three HTTP boundaries, while existing scenarios retain their narrower secondary OpenAI-compatible coverage.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is low-risk regression-coverage and QA-catalog work with no claimed runtime behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored QA-only draft is exempt from the external-contributor real-behavior-proof gate; the focused exact-head Gateway test output remains the relevant validation evidence.

Label justifications:

  • P3: This is low-risk regression-coverage and QA-catalog work with no claimed runtime behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 maintainer-authored QA-only draft is exempt from the external-contributor real-behavior-proof gate; the focused exact-head Gateway test output remains the relevant validation evidence.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs test/e2e/qa-lab/runtime/gateway-http-apis.e2e.test.ts.
  • [P1] git diff --check 2b3351a..0b0f105.

What I checked:

Likely related people:

  • vincentkoc: Current Gateway test-helper lifecycle and the hook enqueue lines trace to Vincent Koc's recent merged commit, and the proposed branch extends that same harness and behavior. (role: recent Gateway QA and test-harness contributor; confidence: high; commits: f9baa3e89421; files: src/gateway/test-helpers.server.ts, src/gateway/server/hooks.ts, test/e2e/qa-lab/runtime/gateway-http-apis.e2e.test.ts)

Rank-up moves

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

  • Post the focused exact-head Gateway test result or a redacted validation transcript once the in-progress check finishes.
  • Refresh review after the draft is ready for merge so the exact head and completed checks can be evaluated together.

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.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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 3, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 3, 2026 19:42
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact-head focused Testbox, canonical QA evidence, path-scoped changed gate, and autoreview are now complete and recorded in the PR body.

@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper automerge

Exact-head focused Testbox proof, canonical QA evidence, path-scoped changed gate, autoreview, and current CI are green. The focused-proof rank-up move is complete. The optional re-review move was requested and remains queued; the existing exact-head review reports no findings and labels the refresh non-blocking.

@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@vincentkoc
vincentkoc merged commit 317320a into main Aug 3, 2026
146 of 150 checks passed
@vincentkoc
vincentkoc deleted the qa-gateway-b1-http-apis branch August 3, 2026 20:00
vincentkoc added a commit that referenced this pull request Aug 3, 2026
…outing-20260803

* origin/main: (34 commits)
  fix(config): reject unsupported diagnostics otel grpc (#93087)
  fix(providers): recognize configured media credentials across provider boundaries (#118761)
  refactor: delete dead post-landing plugin/hooks scaffolding (#118920)
  fix(cron): deliver child results after heartbeat-only parent responses (#118743)
  fix(ci): keep Matrix chunk tests aligned with inventory (#118917)
  fix(tts): preserve hidden speech answers when synthesis fails (#118690)
  test(gateway): add HTTP API QA coverage (#118809)
  test(qa): cover Control UI sessions and cron (#118838)
  fix(macos): preserve native command ownership and consent (#118914)
  test(qa): cover OpenClaw exec process lifecycle (#118819)
  test(ui): cover diagnostic operator flows (#118837)
  fix(search): propagate cancellation through provider-owned requests (#118895)
  test(gateway): cover loopback and LAN access (#118824)
  refactor(channels): own the lifecycle status contract in SDK patch factories (#118795)
  test(ui): add guarded config QA coverage (#118814)
  fix(feishu): fence external collaboration tool results (#118877)
  test(qa): cover Plugin SDK import topology (#118878)
  test(qa): register external app SDK proof (#118829)
  fix(gateway): expire temporal rows in cached session lists (#118875)
  test(matrix): isolate runtime state (#118892)
  ...
vincentkoc added a commit that referenced this pull request Aug 3, 2026
…te-dry-run-no-state-mutation

* commit '682f60ce56b37c5cd3205fdcbbf25b21d48708f2': (28 commits)
  fix(config): reject unsupported diagnostics otel grpc (#93087)
  fix(providers): recognize configured media credentials across provider boundaries (#118761)
  refactor: delete dead post-landing plugin/hooks scaffolding (#118920)
  fix(cron): deliver child results after heartbeat-only parent responses (#118743)
  fix(ci): keep Matrix chunk tests aligned with inventory (#118917)
  fix(tts): preserve hidden speech answers when synthesis fails (#118690)
  test(gateway): add HTTP API QA coverage (#118809)
  test(qa): cover Control UI sessions and cron (#118838)
  fix(macos): preserve native command ownership and consent (#118914)
  test(qa): cover OpenClaw exec process lifecycle (#118819)
  test(ui): cover diagnostic operator flows (#118837)
  fix(search): propagate cancellation through provider-owned requests (#118895)
  test(gateway): cover loopback and LAN access (#118824)
  refactor(channels): own the lifecycle status contract in SDK patch factories (#118795)
  test(ui): add guarded config QA coverage (#118814)
  fix(feishu): fence external collaboration tool results (#118877)
  test(qa): cover Plugin SDK import topology (#118878)
  test(qa): register external app SDK proof (#118829)
  fix(gateway): expire temporal rows in cached session lists (#118875)
  test(matrix): isolate runtime state (#118892)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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