Skip to content

test(tui): add reusable PTY evidence producer - #118902

Merged
vincentkoc merged 1 commit into
mainfrom
t00-tui-pty-producer-20260803
Aug 3, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
t00-tui-pty-producer-20260803

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

QA coverage slices that rely on the TUI PTY tests lacked a reusable producer that authenticates exact Vitest file and assertion results and emits QA Lab evidence.

Why This Change Was Made

Adds a strict script evidence producer over existing public QA seams and a secondary-only contract scenario. The producer accepts only the two documented CLI arguments, allowlists exactly the three existing PTY test files, validates scenario coverage-to-case ownership, requires a fresh successful Vitest JSON report, and emits bounded redacted evidence artifacts.

No production code, dependency, lockfile, plugin SDK, protocol, channel, taxonomy, or TUI runtime files change.

User Impact

No direct user-facing behavior changes. QA scenario authors can reuse authenticated PTY evidence without claiming primary product coverage in this infrastructure slice.

Evidence

  • Exact pushed head: 8d5c1a86803468d470b19d51c879749647afcc6b
  • Focused producer tests: 1 file, 7 tests passed.
  • Root test typecheck: passed.
  • Private-QA build: passed, including all 149 public plugin SDK subpaths and Control UI performance checks.
  • QA Suite tui-pty-evidence-producer-contract: passed at exact head after rebuilding private-QA CLI artifacts.
  • Fresh evidence: one passed configured assertion in src/tui/tui-pty-harness.e2e.test.ts, secondary-only tui.message-composition, with vitest-report.json, proof-matrix.json, latest-run.json, and qa-evidence.json.
  • Formatting, diff check, import-cycle check, dependency pins, plugin boundaries, script declarations, storage guards, and privacy scrub passed.
  • Fresh Sol high autoreview: clean, patch correctness 0.87; TruffleHog clean.
  • ClawSweeper's canonical record-guard move is applied; command construction also explicitly clears the local-PTY opt-in for non-local cases.
  • Blacksmith Testbox was unavailable because local authentication is missing; AWS Crabbox was unavailable because broker login is missing. Trusted-source heavy proof used the repository-approved local fallback.
  • pnpm-lock.yaml was restored after a sparse-checkout install artifact and has no final diff; no dependency change is required.

AI-assisted implementation and review.

@vincentkoc vincentkoc self-assigned this Aug 3, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 3, 2026 19:28
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 3, 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 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 5:14 PM ET / 21:14 UTC.

ClawSweeper review

What this changes

The PR adds a QA Lab scenario and reusable script that runs allowlisted TUI pseudo-terminal assertions, verifies their Vitest JSON result, and emits bounded evidence artifacts.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

This maintainer-authored, maintainer-labeled PR remains necessary as a coherent QA Lab addition. The patch stays within existing QA evidence seams, validates only allowlisted TUI PTY cases, and adds focused contract coverage; no concrete correctness or security defect was found in the proposed change.

Priority: P3
Reviewed head: a6ac1ff194b23dea51f7758724136a5394cb6dc4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable QA-only patch with targeted contract coverage and no supported correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a member-authored PR, so the external-contributor proof gate does not apply; the PR body nevertheless reports focused producer and QA-suite validation.
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 member-authored PR, so the external-contributor proof gate does not apply; the PR body nevertheless reports focused producer and QA-suite validation.
Evidence reviewed 7 items Allowlisted test invocation: The producer derives a deterministic test-file set from configured cases, builds a fixed scripts/run-vitest.mjs command, and removes the local-PTY opt-in unless the one allowlisted local test is requested.
Authenticated fresh evidence: The patch deletes prior report artifacts, requires a successful fresh JSON report with a passed configured assertion, then writes only the sanitized report and proof matrix through the existing writer.
Existing QA Lab owner contract: Current main clears each script scenario’s artifact root before execution and requires producer evidence afterward; the new scenario uses that canonical script path rather than creating a parallel runner.
Findings None None.
Security None None.

How this fits together

QA Lab executes declared scenarios and converts their results into maintainable evidence bundles. This producer sits between a TUI PTY test scenario and the existing script-evidence writer, authenticating the selected test result before QA Lab consumes the bundle.

flowchart LR
  A[QA Lab scenario] --> B[PTY evidence producer]
  B --> C[Allowlisted TUI PTY tests]
  C --> D[Vitest JSON report]
  D --> E[Report validation]
  E --> F[QA evidence bundle]
Loading

Before merge

  • Complete next step (P2) - This member-authored PR carries the protected maintainer label, so it needs explicit maintainer review rather than automated repair or cleanup.
Agent review details

Security

None.

PR surface

Tests +826, Other +33. Total +859 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 826 0 +826
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 33 0 +33
Total 3 859 0 +859

Review metrics

Metric Value Why it matters
Production versus test LOC production +0, tests/QA +859 All additions are a QA scenario and test infrastructure; the substantial test-only growth implements the stated reusable evidence boundary without changing TUI runtime behavior.

Technical review

Best possible solution:

Land the producer as QA-only infrastructure after final maintainer inspection of the GitHub merge result, preserving its fixed allowlist, scenario-owned coverage, and existing QA evidence-writer contract.

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

Not applicable as a defect report: this PR introduces QA infrastructure. Its producer path is source-verifiable through the scenario, fixed command construction, report checks, and focused contract tests, but this read-only review did not execute the PTY suite.

Is this the best way to solve the issue?

Yes. The patch uses the established QA Lab script runner and script-evidence writer, then validates the real PTY assertion at the producer boundary instead of adding a competing runner or modifying TUI runtime code.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: The patch adds internal QA evidence infrastructure and does not alter a user-facing TUI, channel, provider, or runtime workflow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; 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 member-authored PR, so the external-contributor proof gate does not apply; the PR body nevertheless reports focused producer and QA-suite validation.

Evidence

What I checked:

Likely related people:

  • steipete: Current-main history attributes the shared TUI PTY configuration and QA script-evidence seam to the explicit-model PTY scenario change. (role: adjacent feature owner; confidence: high; commits: 5a65c96fc708; files: test/e2e/qa-lab/runtime/script-evidence.ts, test/vitest/vitest.tui-pty.config.ts, src/tui/tui-pty-harness.e2e.test.ts)

Rank-up moves

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

  • Complete the normal maintainer review on GitHub’s current clean merge result.

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 (5 earlier review cycles)
  • reviewed 2026-08-03T20:02:18.425Z sha d24becee4f7748533f9bce20e8b8de6699b468e0 :: found issues before merge. :: [P3] Use the canonical non-array record guard
  • reviewed 2026-08-03T20:09:09.758Z sha d24becee4f7748533f9bce20e8b8de6699b468e0 :: needs changes before merge. :: [P3] Import the canonical non-array record guard
  • reviewed 2026-08-03T20:19:18.220Z sha 116386b6fac98a2e00526edea1e1412679447368 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-03T20:26:50.035Z sha 4bd3d20 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-03T21:02:37.224Z sha 8d5c1a86803468d470b19d51c879749647afcc6b :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc force-pushed the t00-tui-pty-producer-20260803 branch from d24bece to 116386b Compare August 3, 2026 20:11
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 3, 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:

@vincentkoc
vincentkoc force-pushed the t00-tui-pty-producer-20260803 branch from 116386b to 4bd3d20 Compare August 3, 2026 20:21
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 3, 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:

@vincentkoc
vincentkoc force-pushed the t00-tui-pty-producer-20260803 branch from 4bd3d20 to 8d5c1a8 Compare August 3, 2026 20:37
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 3, 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:

@vincentkoc
vincentkoc force-pushed the t00-tui-pty-producer-20260803 branch from 8d5c1a8 to a6ac1ff Compare August 3, 2026 21:08
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 3, 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:

@vincentkoc
vincentkoc merged commit 99926b7 into main Aug 3, 2026
94 checks passed
@vincentkoc
vincentkoc deleted the t00-tui-pty-producer-20260803 branch August 3, 2026 21:19
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

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: 🐚 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