Skip to content

test(qa): retain mock provider request artifacts - #190753

Open
RomneyDa wants to merge 4 commits into
mainfrom
tideclaw/rri-573-qa-request-artifact
Open

RomneyDa wants to merge 4 commits into
mainfrom
tideclaw/rri-573-qa-request-artifact

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • retain the mock OpenAI /debug/requests snapshot in QA artifacts
  • capture after Gateway teardown and before the mock provider stops
  • keep live providers out of this diagnostic path

The artifact is written atomically with mode 0600 at artifacts/mock-openai-requests.json. Cleanup continues even if capture fails.

Testing

  • pnpm test extensions/qa-lab/src/suite-provider-artifacts.test.ts extensions/qa-lab/src/suite.test.ts --maxWorkers=1 (29 tests)
  • type-aware oxlint on the new helper and cleanup owner
  • formatting and git diff --check

Repair sweep — 2026-11-25

Integrated main ba6d94e to pick up current qualification. Addressed both test-review findings: the SSRF runtime mock now preserves real exports, and the no-provider live-mode negative case was removed because it did not prove live-provider isolation. The mock-export guard fails on the old factory and passes with the correction; all25 artifact/suite tests, focused type-aware lint, formatting, and diff checks pass. Independent source review found no actionable findings in this correction. Exact-head hosted CI is green; the local correction review is complete as detailed below.

Published head: 663510dc0ca14f5e54e4df6ac3b1c6f9544cf4c1. No merge or deployment is claimed.

Current correction review

Local ClawSweeper completed its normal committed-range code/security review of d8501ac4cd775f06b29fc4b0a3b351890da1206c..663510dc0ca14f5e54e4df6ac3b1c6f9544cf4c1 with no actionable findings. This covers the repair correction, not a new full review of the historical PR. No GitHub review or approval was posted by the local runner.

@clawsweeper

clawsweeper Bot commented Nov 2, 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.

Route mock-provider request artifact collection through the plugin SSRF guard, with bounded loopback access and deterministic resource release.

Co-authored-by: RomneyDa <[email protected]>
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 2, 2026
@clawsweeper

clawsweeper Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR saves mock OpenAI request snapshots as QA artifacts before stopping the provider.

Example: A mock-openai QA suite records a request with cursor 1 and model fixture-model.

  • Before: The request snapshot disappears when the mock provider stops.
  • After: The snapshot remains in artifacts/mock-openai-requests.json.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful and focused, with unit-level evidence and one source-verified CI blocker.
Proof confidence 🦐 gold shrimp (3/6) This MEMBER-authored PR is outside the ordinary contributor proof gate; its supplied evidence covers unit checks rather than a running QA suite.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: QA operators lose mock provider request details when the suite stops its provider.
Reason: Retained diagnostics have clear debugging value, and the maintainer-authored direction adds no configuration or public API.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this useful, maintainer-authored diagnostic improvement open; the new test mock introduces a concrete CI gate failure.

Priority: P3
Reviewed head: bfa3e10a348d6ff0ebb9e42f8654624d0af9b585

Before merge

Findings

  • [P2] Preserve real exports in the new SSRF module mock — extensions/qa-lab/src/suite-provider-artifacts.test.ts:12-14

Tests

  • Low-value test extensions/qa-lab/src/suite-provider-artifacts.test.ts: Remove or replace the live-provider case: it supplies no provider, so the missing-provider guard makes it pass even if the provider-mode check is removed.
  • Missing end-to-end proof: No supplied source-checkout QA run demonstrates the retained artifact after actual provider teardown, and base-red/head-green regression execution is not shown.
Agent review details

How this fits together

QA Lab starts an isolated Gateway and mock provider, runs scenarios, then tears down resources; the added capture reads the provider's debug endpoint and publishes a diagnostic file through the existing artifact writer.

flowchart TD
  A[QA suite scenarios] --> B[Isolated Gateway]
  B --> C[Mock OpenAI provider]
  A --> D[Suite cleanup owner]
  D --> E[Stop Gateway]
  E --> F[Capture request artifact]
  C --> F
  F --> G[Stop mock provider]
Loading

Technical review

Best possible solution:

Retain the focused capture helper and existing cleanup owner, and repair the new test mock so the export-completeness gate passes.

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

Source inspection establishes both the missing request-retention path on main and the new mock's rejection by the export guard; no target code was executed.

Is this the best way to solve the issue?

The capture uses the existing provider endpoint, cleanup sequence, and atomic writer, making it a focused implementation without a competing state owner.

Full review comments:

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Suite cleanup ordering and failure reporting keeps the original intent (fix(qa-lab): close transport before gateway teardown #106027: Drain transport work before Gateway teardown and continue cleanup through resource failures; later lifecycle repairs preserve credential-release safety and truthful completion.)
  • Cleanup completion ownership keeps the original intent (7b8bba2: Publish terminal completion only after cleanup succeeds and retain phase-specific failures.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

Acceptance criteria:

  • pnpm check:test-mock-exports
  • pnpm test extensions/qa-lab/src/suite-provider-artifacts.test.ts extensions/qa-lab/src/suite.test.ts --maxWorkers=1
  • git diff --check

What I checked:

  • Exact introduced change: The pinned introduction adds a capture helper and inserts it into the existing cleanup plan after harness disposal and before provider shutdown. (extensions/qa-lab/src/suite-run-standard.ts:416, bfa3e10a348d)
  • Existing artifact owner: The helper reuses publishQaSuiteArtifactFiles, which performs atomic replacement and creates files with mode 0600. (extensions/qa-lab/src/suite-artifacts.ts:19, bfa3e10a348d)
  • Mock export gate violation: The newly added closed SSRF mock has neither real-module pass-through nor an isolation annotation and has no baseline entry; the guard rejects this exact pattern. (extensions/qa-lab/src/suite-provider-artifacts.test.ts:12, bfa3e10a348d)
  • Current-head CI attribution: The failed baseline-ratchets check explicitly annotates mock-exports as failed; ci-gate also fails. Detailed job logs redirect to a host blocked by the allowlist, so no additional failure is attributed. (bfa3e10a348d)
  • Direction and discussion: The MEMBER-authored PR requests mock-only capture; its full body lists unit checks, and the discussion contains only bot status comments. (bfa3e10a348d)
  • Current main and history: Fetched main lacks the new helper and cleanup callback. Feature history identifies prior artifact, cleanup-ordering, and Gateway-lifetime contributors; some older blob reads failed in the partial clone, without affecting the reviewed hunks. (extensions/qa-lab/src/suite.ts:187, cd2f589dfe4c)

Likely related people:

  • Dallin Romney: Raw commit 59f709f adds extensions/qa-lab/src/suite-run-standard.ts:412 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 59f709f8f145; files: extensions/qa-lab/src/suite-run-standard.ts)
  • Peter Steinberger: Raw commit 6e6a0e5 adds extensions/qa-lab/src/suite.ts:286 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6e6a0e59fde0; files: extensions/qa-lab/src/suite.ts)
  • Vincent Koc: Raw commit 7b8bba2 adds extensions/qa-lab/src/suite.ts:313 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7b8bba26c953; files: extensions/qa-lab/src/suite.ts)

PR surface

Source +56, Tests +58. Total +114 across 5 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 3 56 0 +56
Tests 2 58 0 +58
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 114 0 +114

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This improves source-checkout QA diagnostics with limited user-facing impact.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 1, 2026, 8:23 PM ET / November 2, 2026, 01:23 UTC.

This branch has not been deployed

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

Labels

extensions: qa-lab P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants