Skip to content

qa-lab: add evidence artifact gallery#94283

Merged
RomneyDa merged 6 commits into
openclaw:mainfrom
Solvely-Colin:codex/qa-lab-evidence-gallery-main
Jun 18, 2026
Merged

qa-lab: add evidence artifact gallery#94283
RomneyDa merged 6 commits into
openclaw:mainfrom
Solvely-Colin:codex/qa-lab-evidence-gallery-main

Conversation

@Solvely-Colin

@Solvely-Colin Solvely-Colin commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds a QA Lab evidence gallery for existing qa-evidence.json outputs.

  • Adds a server-side evidence model that loads QA evidence entries, declared artifacts, status counts, coverage IDs, text/json previews, and optional producer context.
  • Adds /api/evidence and /api/evidence/artifact routes so the QA Lab web app can inspect artifacts without exposing arbitrary repo files.
  • Adds an Evidence Archive tab in the QA Lab web app with filters, artifact previews, downloadable declared artifacts, and drill-down details.
  • Hardens artifact resolution and artifact responses after review: missing bundle-local artifacts no longer fall back to repo-root files, malformed optional matrix cells are ignored, artifact responses are no-store/nosniff, and undeclared/outside artifacts return controlled client errors.
  • Intentionally does not add the UX matrix runner, UX matrix scenario, or GitHub Action wiring. Those are follow-up PR slices.

Success looks like maintainers can open a QA Lab evidence artifact from a suite run and inspect screenshots, videos, logs, json validation output, coverage IDs, and run context from the web app.

Reviewers should focus on path containment/artifact authorization, the evidence model shape, and whether the UI is generic enough for QA Lab evidence beyond the UX matrix producer.

Linked context

Related #94276
Related #94273

This split follows maintainer feedback to pull the original combined QA Lab / UX matrix work apart:

  • PR 1: script-backed QA scenarios
  • PR 2: QA web app evidence gallery
  • PR 3: UX matrix test/scenario
  • possible PR 4: GitHub Action/smoke profile wiring

Real behavior proof (required for external PRs)

  • Behavior or issue addressed: QA Lab can load and inspect a QA evidence artifact bundle through the web server instead of requiring people to read raw qa-evidence.json directly.
  • Real environment tested: local macOS OpenClaw checkout, branch codex/qa-lab-evidence-gallery-main, head c0cfa19422.
  • Exact steps or command run after this patch:
node --import tsx -e "import fs from 'node:fs/promises'; import path from 'node:path'; import { chromium } from 'playwright'; import { startQaLabServer } from './extensions/qa-lab/src/lab-server.ts'; const repoRoot = process.cwd(); const evidencePath = '.artifacts/ux-matrix/20260617T203150Z-8ac4664d16/qa-evidence.json'; const proofDir = path.join(repoRoot, '.artifacts', 'qa-lab-evidence-gallery-proof', '20260617T2258Z-142f7b234d'); await fs.mkdir(proofDir, { recursive: true }); const server = await startQaLabServer({ repoRoot, host: '127.0.0.1', port: 0, embeddedGateway: 'disabled' }); let browser; try { browser = await chromium.launch({ headless: true }); const context = await browser.newContext({ viewport: { width: 1440, height: 1050 }, recordVideo: { dir: proofDir, size: { width: 1440, height: 1050 } } }); const page = await context.newPage(); const url = server.baseUrl + '/evidence?path=' + encodeURIComponent(evidencePath); await page.goto(url, { waitUntil: 'networkidle' }); await page.getByText('Evidence Archive').first().waitFor({ state: 'visible', timeout: 10000 }); await page.locator('.evidence-entry-card').first().waitFor({ state: 'visible', timeout: 10000 }); await page.locator('.evidence-artifact-card').first().waitFor({ state: 'visible', timeout: 10000 }); const screenshotPath = path.join(proofDir, 'evidence-archive-loaded.png'); await page.screenshot({ path: screenshotPath, fullPage: true }); const entryCount = await page.locator('.evidence-entry-card').count(); const artifactCount = await page.locator('.evidence-artifact-card').count(); const matrixCellCount = await page.locator('.evidence-matrix-cell').count(); const title = await page.title(); await context.close(); const videos = (await fs.readdir(proofDir)).filter((file) => file.endsWith('.webm')); console.log(JSON.stringify({ baseUrl: server.baseUrl, url, title, evidencePath, screenshotPath, videos: videos.map((file) => path.join(proofDir, file)), entryCount, artifactCount, matrixCellCount }, null, 2)); } finally { if (browser) await browser.close().catch(() => {}); await server.stop(); }"
  • Evidence after fix:
{
  "baseUrl": "http://127.0.0.1:62325",
  "url": "http://127.0.0.1:62325/evidence?path=.artifacts%2Fux-matrix%2F20260617T203150Z-8ac4664d16%2Fqa-evidence.json",
  "title": "QA Lab",
  "evidencePath": ".artifacts/ux-matrix/20260617T203150Z-8ac4664d16/qa-evidence.json",
  "screenshotPath": ".artifacts/qa-lab-evidence-gallery-proof/20260617T2258Z-142f7b234d/evidence-archive-loaded.png",
  "videos": [
    ".artifacts/qa-lab-evidence-gallery-proof/20260617T2258Z-142f7b234d/[email protected]"
  ],
  "entryCount": 4,
  "artifactCount": 5,
  "matrixCellCount": 135
}
  • Observed result after fix: QA Lab opened the Evidence Archive route in a real browser, loaded a saved UX Matrix qa-evidence.json, rendered evidence entries, artifact cards, producer context, a scorecard preview, artifact links, and the UX matrix mini-grid.
  • What was not tested: the future UX matrix scenario PR and GitHub Actions wiring.
  • Proof limitations or environment constraints: this proof used an existing local QA evidence artifact generated by earlier UX matrix work; it did not generate a fresh suite run as part of this PR, and the screenshot/video artifacts are local proof outputs rather than committed repo files.
  • Before evidence: before this PR, QA Lab did not expose a generic Evidence Archive tab/API for loading and browsing QA evidence artifacts from the web app.

Tests and validation

Commands run:

pnpm run lint:tmp:no-raw-channel-fetch
node scripts/run-vitest.mjs extensions/qa-lab/src/evidence-gallery.test.ts extensions/qa-lab/src/lab-server.test.ts extensions/qa-lab/web/src/ui-render.test.ts
pnpm qa:lab:build
node scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental false
pnpm lint --threads=8
git diff --check origin/main...HEAD

Regression coverage added:

  • Evidence model tests for loading summaries, declared artifacts, producer files, missing artifacts, path containment, missing bundle-local artifacts, undeclared artifacts, symlink escapes, and malformed optional matrix cells.
  • Lab server tests for artifact HEAD/GET, no-store/nosniff response headers, undeclared artifacts, and outside artifact requests.
  • Web UI render tests for evidence filters, artifact cards, deferred media previews, blocked/skipped statuses, and drill-down state.

Risk checklist

Did user-visible behavior change? Yes

Did config, environment, or migration behavior change? No

Did security, auth, secrets, network, or tool execution behavior change? Yes

Highest-risk area: serving local artifact files through the QA Lab server.

Mitigation: artifact downloads are constrained to declared artifacts from the selected qa-evidence.json, resolved inside the repo/evidence roots, served with no-store and nosniff, and covered by path containment/negative HTTP tests.

Current review state

Next action: CI rerun and ClawSweeper/reviewer re-review.

Waiting on: GitHub CI and reviewer feedback after c0cfa19422.

Bot/reviewer comments addressed: raw fetch boundary line drift, artifact response hardening, missing bundle-local artifact fallback, malformed matrix cell parsing, controlled API status mapping, canonical evidence path URLs, noopener noreferrer artifact links, producer-file manifest duplication, shared toRepoRelativePath, bounded artifact view concurrency, shared Evidence DTO type aliases, and cheap Evidence Archive IA label/subtitle.

Copilot AI review requested due to automatic review settings June 17, 2026 22:03
@openclaw-barnacle openclaw-barnacle Bot added the proof: supplied External PR includes structured after-fix real behavior proof. label Jun 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a QA Lab “Evidence” gallery that can load existing qa-evidence.json bundles, summarize entries/artifacts/coverage, and serve declared artifacts via constrained server routes for safe inspection in the QA Lab web UI.

Changes:

  • Add server-side evidence gallery model + artifact resolution constrained to declared evidence artifacts.
  • Add /api/evidence and /api/evidence/artifact endpoints to load evidence and stream artifacts.
  • Add a new “Evidence” tab UI (filters, entry drilldown, artifact previews/links) plus styling and render tests.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
extensions/qa-lab/src/evidence-gallery.ts Builds evidence gallery DTOs, resolves evidence + declared artifacts, and derives optional producer context.
extensions/qa-lab/src/evidence-gallery.test.ts Coverage for evidence parsing, declared artifact gating, and containment behaviors.
extensions/qa-lab/src/lab-server.ts Adds Evidence API routes and artifact streaming.
extensions/qa-lab/src/lab-server.test.ts Adds tests for evidence artifact HEAD/GET behavior.
extensions/qa-lab/web/src/app.ts Adds client-side evidence state, URL handling, and evidence load actions.
extensions/qa-lab/web/src/ui-render.ts Adds Evidence tab rendering (filters, entry list, artifact cards, producer context).
extensions/qa-lab/web/src/ui-render.test.ts Render tests for evidence statuses and UX Matrix linkage behavior.
extensions/qa-lab/web/src/styles.css Evidence tab layout/styles and evidence-focus shell styling.

Comment thread extensions/qa-lab/web/src/ui-render.ts Outdated
Comment thread extensions/qa-lab/web/src/ui-render.ts Outdated
Comment thread extensions/qa-lab/web/src/ui-render.ts Outdated
Comment thread extensions/qa-lab/web/src/ui-render.ts Outdated
Comment thread extensions/qa-lab/src/lab-server.ts
Comment thread extensions/qa-lab/src/lab-server.ts
Comment thread extensions/qa-lab/web/src/ui-render.ts Outdated
Comment thread extensions/qa-lab/web/src/app.ts
Comment thread extensions/qa-lab/src/evidence-gallery.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 142f7b234d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread extensions/qa-lab/src/evidence-gallery.ts Outdated
Comment thread extensions/qa-lab/src/evidence-gallery.ts
@clawsweeper

clawsweeper Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 18, 2026, 10:15 AM ET / 14:15 UTC.

Summary
This PR adds a QA Lab Evidence Archive model, /api/evidence and /api/evidence/artifact routes, web UI state/rendering, shared gallery DTOs, and focused tests for browsing existing qa-evidence.json bundles.

PR surface: Source +2177, Tests +890, Other 0. Total +3067 across 10 files.

Reproducibility: not applicable. as a bug reproduction because this is a feature PR. The PR body includes after-change live browser output showing /evidence loading a saved bundle with entries, artifact cards, and matrix cells.

Review metrics: 1 noteworthy metric.

  • Local evidence routes: 2 added. One route returns preview-bearing evidence JSON and one streams declared local artifacts, so maintainers should focus review on that file-serving boundary.

Stored data model
Persistent data-model change detected: database schema: extensions/qa-lab/src/evidence-gallery.test.ts, database schema: extensions/qa-lab/src/lab-server.test.ts, serialized state: extensions/qa-lab/src/evidence-gallery.test.ts, serialized state: extensions/qa-lab/src/lab-server.test.ts, vector/embedding metadata: extensions/qa-lab/src/lab-server.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: canonical
Canonical: #94283
Summary: This PR is the current QA Lab evidence-gallery slice split from the closed combined UX Matrix/evidence spike; the related open PRs are producer/workflow follow-ups, not replacements.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Mantis proof suggestion
A short browser proof would help maintainers inspect the visible QA Lab Evidence Archive workflow and artifact-opening path. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: verify QA Lab Evidence Archive loads a sample qa-evidence.json and opens declared artifact previews.

Risk before merge

  • [P1] Merging adds localhost QA Lab routes that load preview data and stream declared local artifact files from a selected evidence bundle, so maintainers need to accept the realpath containment and declared-artifact allowlist as the security boundary.
  • [P1] This branch is intentionally only the gallery/browser slice; the UX Matrix scenario and GitHub Actions wiring remain in separate open follow-up PRs.

Maintainer options:

  1. Accept the declared-artifact boundary (recommended)
    Maintainers can accept the current realpath containment, declared-artifact allowlist, no-store, and nosniff design as the local QA Lab artifact-serving boundary once checks finish.
  2. Request a narrower artifact contract
    If the local file-serving boundary is too broad, ask for a narrower artifact-root contract before merge.
  3. Pause until the follow-up slices settle
    Maintainers can pause this branch if they want the UX Matrix scenario and workflow slices reviewed together before accepting the gallery API shape.

Next step before merge

  • [P2] The remaining action is maintainer review of the security boundary and current-head checks, not a narrow automated code repair.

Security
Cleared: No concrete security defect was found in the latest diff; the remaining security question is maintainer acceptance of the declared-artifact local file-serving design.

Review details

Best possible solution:

Land this gallery slice after maintainers accept the declared-artifact local file-serving boundary and current-head checks finish, while keeping the UX Matrix scenario and workflow wiring in their separate follow-up PRs.

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

Not applicable as a bug reproduction because this is a feature PR. The PR body includes after-change live browser output showing /evidence loading a saved bundle with entries, artifact cards, and matrix cells.

Is this the best way to solve the issue?

Yes, this is the best scoped solution for the gallery slice: it stays inside the QA Lab plugin and reuses existing qa-evidence.json output instead of adding core config or a parallel artifact format. The remaining decision is maintainer acceptance of the artifact-serving boundary, not a narrow code repair.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a normal-priority QA Lab feature with limited blast radius outside QA tooling, but it changes a real local artifact inspection workflow.
  • merge-risk: 🚨 security-boundary: The PR intentionally adds routes that read and stream local files selected through QA evidence, so merge safety depends on the containment and allowlist boundary.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Sufficient: the PR body includes copied Playwright/headless-browser live output showing the Evidence Archive route loading a saved bundle and rendering entries, artifact cards, and matrix cells.
  • proof: sufficient: Contributor real behavior proof is sufficient. Sufficient: the PR body includes copied Playwright/headless-browser live output showing the Evidence Archive route loading a saved bundle and rendering entries, artifact cards, and matrix cells.
Evidence reviewed

PR surface:

Source +2177, Tests +890, Other 0. Total +3067 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 6 2181 4 +2177
Tests 3 895 5 +890
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 3 3 0
Total 10 3079 12 +3067

What I checked:

  • Repository policy read: Root AGENTS.md plus scoped extensions/ and scripts/ guides were read and applied because this PR touches bundled plugin code, a local QA Lab server route, artifact serving, and a script allowlist. (AGENTS.md:1, 55750f7c6dd6)
  • Current main behavior: Current main has QA Lab state/report/outcomes/capture routes but no /api/evidence or /api/evidence/artifact route, so the central feature is not already implemented on main. (extensions/qa-lab/src/lab-server.ts:386, 55750f7c6dd6)
  • PR route implementation: The PR head adds /api/evidence and /api/evidence/artifact, builds the evidence model before success headers, and streams artifacts with no-store plus nosniff. (extensions/qa-lab/src/lab-server.ts:431, 911a2aafba4d)
  • Artifact containment: The PR resolves evidence files under the repo root, resolves artifact realpaths against allowed roots, and requires served artifacts to be declared by the selected evidence summary. (extensions/qa-lab/src/evidence-gallery.ts:83, 911a2aafba4d)
  • Server coverage: The server test covers evidence response cache headers, controlled missing-evidence errors, artifact HEAD/GET streaming, undeclared artifacts, outside artifacts, no-store, and nosniff. (extensions/qa-lab/src/lab-server.test.ts:453, 911a2aafba4d)
  • Model coverage: The model test covers declared artifacts, missing bundle-local artifacts, repo-root collision avoidance, undeclared artifacts, and symlink escapes without leaking outside content. (extensions/qa-lab/src/evidence-gallery.test.ts:424, 911a2aafba4d)

Likely related people:

  • RomneyDa: Recent history shows repeated QA evidence/schema/suite commits, and this PR branch includes maintainer repair commits on evidence artifact resolution and /api/evidence header behavior. (role: recent QA evidence area contributor and repair author; confidence: high; commits: 4809ac70fa5a, 561b293c7a96, e32929e12cd4; files: extensions/qa-lab/src/evidence-summary.ts, extensions/qa-lab/src/evidence-gallery.ts, extensions/qa-lab/src/lab-server.ts)
  • Solvely-Colin: The PR author also authored the merged script-backed evidence scenario prerequisite, so they have relevant recent merged QA Lab evidence context beyond this branch proposal. (role: recent adjacent contributor; confidence: high; commits: 591313e80a5e, 142f7b234d83, c0cfa194229c; files: extensions/qa-lab/src/evidence-gallery.ts, extensions/qa-lab/src/test-file-scenario-runner.ts, extensions/qa-lab/web/src/ui-render.ts)
  • steipete: History for the QA Lab UI shows the interactive suite runner and several UI iterations came from this account, making them a likely reviewer for the new Evidence Archive tab shape. (role: introduced and shaped QA Lab UI; confidence: medium; commits: 350238d40226, a47c49bbf363, f2494aa33f51; files: extensions/qa-lab/web/src/ui-render.ts)
  • vincentkoc: Recent commits touched QA Lab server readiness, bootstrap token privacy, and suite isolation in the same server/runtime area this PR extends. (role: recent QA Lab server hardening contributor; confidence: medium; commits: 1ee2733b2fe4, beccdde5bfd5, d3a7348ad9e6; files: extensions/qa-lab/src/lab-server.ts)
  • Takhoffman: The proxy capture stack and QA Lab inspector commit is adjacent to the lab-server and web inspection surface now gaining evidence-artifact browsing. (role: adjacent QA Lab inspector contributor; confidence: medium; commits: 958c34e82cdb; files: extensions/qa-lab/src/lab-server.ts, extensions/qa-lab/web/src/ui-render.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@RomneyDa

Copy link
Copy Markdown
Member

Review: evidence gallery — maintainability + IA notes

Nice, well-scoped feature and the path-containment design is solid (realpath + isInside + declared-artifact allowlist is good defense-in-depth). 20 targeted tests pass locally. No blocker. Findings below lean toward maintainability, lossless diff reduction, and one information-architecture question.

Maintainability

  • M1 — duplicate toRepoRelativePath. evidence-gallery.ts:708 redefines a helper that already exists and is exported from cli-paths.ts:10. The shared one normalizes separators via toRepoPath; the local copy is raw path.relative, so it can leak \ into hrefs on Windows. Import the shared one and delete the local def.
  • M2 — two sources of truth for the producer-file set. The download allowlist (collectDeclaredQaEvidenceArtifactFiles, evidence-gallery.ts:234-243) hardcodes the producer filenames, and buildProducerContext (:601-607) lists the same files again for display. Adding/renaming a producer file in one place but not the other silently breaks either download authorization or the UI. Define the producer-file manifest once and derive both.
  • M3 — evidence file re-resolved/re-read O(N) per artifact request. resolveQaEvidenceArtifactFile re-runs resolveQaEvidenceFile (realpath+stat) and re-reads+re-validates the whole evidence JSON directly, again inside resolveExistingQaEvidenceArtifactFile, and once per declared artifact in collectDeclaredQaEvidenceArtifactFiles. Resolve the path + parse the summary once and thread them through.

Security (design is sound; test gaps)

  • T1 — add a declared-artifact symlink-escape test. The isInside(repoRoot)||isInside(evidenceDir) guard in resolveExistingQaEvidenceArtifactFile (evidence-gallery.ts:194-206) is the most load-bearing auth branch, but symlink-escape is only covered for producer-context files, not declared artifacts.
  • T2 — add a negative HTTP test + reconsider status code. The new lab-server test is happy-path only. An undeclared/.. artifactPath should be asserted to return non-200. Today all rejections funnel to writeError(res, 500, …) (lab-server.ts:73); undeclared/outside-repo are client errors, so 400/404 would be more honest and let the UI distinguish not-found from server error.

Lossless diff reduction (~150+ LOC, no behavior change)

  • Core: collapse readTextPreviewIfExists/readJsonPreviewIfExists into one previewKind helper (buildProducerContextFile also double-resolves the file — pass the resolved file through); table-drive the 6 near-identical buildProducerContextFile calls (evidence-gallery.ts:611-661).
  • Web: drop the dead statusDotTone wrapper (ui-render.ts:1075); merge renderEvidenceMetric/renderProducerContextMetric + their duplicated CSS; dedupe the byte-identical image/video deferred branches (ui-render.ts:1737-1758, keep the Open media/video artifact strings); the profile field is parsed into the model but never rendered (surface it in the meta line or drop it); confirm whether evidence-producer-links (ui-render.ts:1837-1845) is intentional — it re-lists the six paths already shown in the drilldowns above.
  • Tests: evidence-gallery.test.ts hand-rolls the full execution envelope in tests 2 & 3 — reuse buildVitestEvidenceSummary (already used in test 1) for the vitest summaries, factor test 3's two near-identical summaries into one helper, and hoist the byte-identical runner literal to a shared const (~65-90 LOC).

Information architecture: Results / Report / Evidence (conceptual, not data)

The three tabs are genuinely different data sources, but to a user they all read as "the outcome of the run," and the tab names don't signal the distinction that actually matters. Today the split is along an engineering axis (data source/format) rather than a user-task axis:

  • Results → "how did each scenario do" (live, in-memory, this run)
  • Report → "the written summary" (same run, just markdown — really a view mode, not a destination)
  • Evidence → "the proof/screenshots" (a saved on-disk bundle, any run)

Results vs Evidence are near-synonyms in plain English, both per-scenario/status-keyed/drill-downable, and the only real difference (live vs saved-on-disk) is the part a user shouldn't have to hold in their head. The new "Open evidence" cross-link from the Results inspector (ui-render.ts:1566) makes the same run appear in two tabs, which sharpens the overlap.

This PR introduces the third overlapping name, so it's a good moment to at least disambiguate. Options, cheap → ambitious:

  • (D, fits this PR) Keep three tabs but rename/subtitle so each states its axis — e.g. Evidence → "Evidence Archive" / "Artifacts" with a subtitle like "saved artifact bundles," so it clearly reads as historical rather than competing with "Results."
  • (B, follow-up) Fold Report into Results as a List ⟷ Report toggle (3→2); Report is just a re-render of the same run.
  • (C, separate slice) Unify Results+Evidence behind a source picker (live run = "current bundle", saved bundles selectable) — the real fix, but its own product slice.

Suggest doing D here (label/subtitle only) and filing B/C as the IA cleanup alongside PR 3/4. Not a merge blocker.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 17, 2026
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Jun 17, 2026
@Solvely-Colin
Solvely-Colin force-pushed the codex/qa-lab-evidence-gallery-main branch from 62179b6 to c0cfa19 Compare June 17, 2026 23:02
@Solvely-Colin

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 17, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@RomneyDa RomneyDa self-assigned this Jun 17, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 18, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 18, 2026
@Solvely-Colin

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Applied the recommended no-store fix for /api/evidence preview responses and added a focused lab-server.test.ts assertion covering the cache header.

Proof run locally on 5872d55ed7:

  • node scripts/run-vitest.mjs extensions/qa-lab/src/evidence-gallery.test.ts extensions/qa-lab/src/lab-server.test.ts extensions/qa-lab/web/src/ui-render.test.ts --reporter=verbose -> 3 files / 20 tests passed
  • pnpm qa:lab:build -> passed
  • git diff --check origin/main...HEAD -> passed

@clawsweeper

clawsweeper Bot commented Jun 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 repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Jun 18, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 18, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Jun 18, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 18, 2026
@RomneyDa

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 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 repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Jun 18, 2026
@RomneyDa
RomneyDa merged commit c677424 into openclaw:main Jun 18, 2026
186 of 195 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 19, 2026
* qa-lab: add evidence artifact gallery

* qa-lab: harden evidence gallery artifacts

* qa-lab: share evidence gallery view types

* qa-lab: disable evidence preview caching

* refactor(qa-lab): resolve evidence artifacts once and trim gallery render/test duplication

* fix(qa-lab): build evidence model before sending /api/evidence success headers

---------

Co-authored-by: Dallin Romney <[email protected]>
cxbAsDev pushed a commit to cxbAsDev/openclaw that referenced this pull request Jun 23, 2026
* qa-lab: add evidence artifact gallery

* qa-lab: harden evidence gallery artifacts

* qa-lab: share evidence gallery view types

* qa-lab: disable evidence preview caching

* refactor(qa-lab): resolve evidence artifacts once and trim gallery render/test duplication

* fix(qa-lab): build evidence model before sending /api/evidence success headers

---------

Co-authored-by: Dallin Romney <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: qa-lab merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL 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.

3 participants