Skip to content

chore(tui): add PTY command surface coverage - #119165

Merged
vincentkoc merged 1 commit into
mainfrom
t04b-tui-command-surfaces-20260804
Aug 4, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
t04b-tui-command-surfaces-20260804

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The TUI command surfaces lacked primary real-PTY QA evidence for slash commands, model and session pickers, and settings updates.

Why This Change Was Made

Adds one QA scenario with exact anchored cases through the fake-backend runTui() PTY harness. The assertions reuse the landed synchronized final-screen oracle, preserve the existing slash-help markers, and add authenticated final-frame and backend-execution proof without changing production behavior.

User Impact

No runtime behavior changes. Regressions in slash command listing and execution, picker selection, and settings updates now fail through the real terminal boundary.

Evidence

  • Signed exact head: 942e50121934f17407479a17d48b3443a166dd81
  • Exact-head artifact: .artifacts/qa-e2e/tui-command-surfaces-pty-exact-head-942e50121934f17407479a17d48b3443a166dd81-20260804/qa-evidence.json
  • Producer result: 3 passed, 0 failed; exact primary coverage for tui.slash-commands, tui.pickers, and tui.settings
  • Slash proof retains Slash commands:, /help, /verbose, /reasoning, /goal, /goal start, /btw, /queue, /stop, and /exit; authenticated final rows include /settings and /exit; /gateway-status executes against the fixture backend
  • Picker proof selects a model and session through literal PTY input and verifies the selected session on the subsequent backend call
  • Settings proof shows Tool output causes zero additional loadHistory calls, then Show thinking causes exactly one
  • Authenticated row materialization rejects stale pre-frame cells; focused assertion unit tests: 2 passed
  • Focused PTY tests: 3 passed, 57 skipped
  • Pinned Knip production, full-tree, and script unused-export scans passed with zero entries
  • Targeted oxfmt, scoped oxlint, scenario parsing, git diff --check, privacy scan, signature verification, and artifact reference validation passed
  • AWS changed gate run_0d629c09cbeb passed all earlier guards, then stopped only on a pre-existing src/config/** dead-export inventory; no T04b path or symbol was listed
  • Sol autoreview (gpt-5.6-sol, high): no accepted/actionable findings; patch correct at 0.91
  • Diff: production +0; QA/test +180/-29; no docs, taxonomy, changelog, dependency, or T02 local-Gateway changes

@vincentkoc vincentkoc self-assigned this Aug 4, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Aug 4, 2026
@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 6:05 AM ET / 10:05 UTC.

ClawSweeper review

What this changes

This PR adds three QA Lab scenarios and real-PTY assertions for TUI slash commands, model/session pickers, and settings changes.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open: the updated head resolves both prior PTY-proof blockers and adds useful fake-backend terminal coverage without changing production behavior; no actionable patch finding remains.

Priority: P3
Reviewed head: 942e50121934f17407479a17d48b3443a166dd81
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A clean, focused test-only patch with source-audited fixes for the prior findings and strong exact-head CI context.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored, test-only PR is not subject to the external-contributor proof gate; its claimed artifact was not present in the supplied scratch directory, so this review relies on source and exact-head CI context rather than treating that artifact as independently inspected.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored, test-only PR is not subject to the external-contributor proof gate; its claimed artifact was not present in the supplied scratch directory, so this review relies on source and exact-head CI context rather than treating that artifact as independently inspected.
Evidence reviewed 6 items Prior polling blocker resolved: The settings assertion now uses asynchronous Vitest polling for the log-file count; the prior helper accepts only synchronous non-null results and would otherwise resolve on a Promise.
Prior frame-authentication blocker resolved: Authenticated row reconstruction now excludes stale cells, and the adjacent regression test covers stale pre-frame text followed by an empty synchronized frame.
Coverage follows the owning command paths: The model and session selectors call the backend and apply the selected value, while the settings handler reloads history only when Show thinking changes; the new PTY cases assert those boundaries.
Findings None None.
Security None None.

How this fits together

The TUI turns terminal input into command, picker, and settings actions through runTui(). Its fake-backend PTY harness records terminal frames and backend calls, then QA Lab authenticates the focused test results as evidence.

flowchart LR
  A[Terminal input] --> B[TUI command handlers]
  B --> C[PTY harness]
  C --> D[Fake backend calls]
  C --> E[Authenticated terminal frames]
  D --> F[Focused assertions]
  E --> F
  F --> G[QA evidence scenario]
Loading

Decision needed

Question Recommendation
Should this maintainer-owned coverage PR be accepted after its clean merge result is refreshed against current main? Refresh and merge: Revalidate the clean current-main merge result, then accept the focused PTY coverage.

Why: The protected maintainer label requires an explicit human merge judgment even though the exact reviewed head has no actionable finding.

Before merge

  • Resolve merge risk (P1) - The branch is behind current main; refresh the merge result or rebase before landing so the final combined head receives the usual exact-head check.
  • Complete next step (P2) - No repair job is warranted; this protected maintainer-owned PR needs an explicit merge judgment after its current-main merge state is refreshed.
Agent review details

Security

None.

PR surface

Source +109, Tests +2, Other +40. Total +151 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 2 130 21 +109
Tests 2 10 8 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 40 0 +40
Total 5 180 29 +151

Review metrics

Metric Value Why it matters
Production versus QA LOC production +0; QA/test +180/-29 The added surface is confined to PTY harness coverage and its QA scenario, with no runtime behavior change.
Authenticated coverage cases 3 primary cases One bounded scenario now requires independently named slash-command, picker, and settings assertions to pass.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the canonical fake-backend PTY harness, land the three focused cases after a current-main refresh, and avoid claiming that they prove Gateway, provider, persistence, or live-streaming behavior.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the canonical fake-backend PTY harness, land the three focused cases after a current-main refresh, and avoid claiming that they prove Gateway, provider, persistence, or live-streaming behavior.

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

Not applicable: this PR adds regression coverage rather than repairing a separately reported runtime failure; its focused PTY paths are source-traceable.

Is this the best way to solve the issue?

Yes. Reusing the existing fake-backend runTui() harness and QA producer is the narrowest maintainable way to protect these interactive contracts.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored, test-only PR is not subject to the external-contributor proof gate; its claimed artifact was not present in the supplied scratch directory, so this review relies on source and exact-head CI context rather than treating that artifact as independently inspected.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is low-risk regression coverage with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored, test-only PR is not subject to the external-contributor proof gate; its claimed artifact was not present in the supplied scratch directory, so this review relies on source and exact-head CI context rather than treating that artifact as independently inspected.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Authored the exact head and the earlier merged terminal-frame hardening that this coverage extends. (role: recent TUI PTY contributor; confidence: high; commits: 942e50121934, 4bdf9ca789b5; files: src/tui/tui-pty-command-surfaces-test-support.ts, src/tui/tui-pty-harness-assertion-test-support.ts)
  • steipete: Has the strongest sampled history on the central harness files and authored the recent session-mode TUI repair. (role: major TUI/PTy history contributor; confidence: high; commits: 08ea9cc31d8e; files: src/tui/tui-pty-harness.e2e.test.ts, src/tui/tui-pty-harness-assertion-test-support.ts)
  • dallinromney: Introduced the earlier TUI PTY integration coverage lineage. (role: PTY integration coverage introducer; confidence: medium; commits: 0a50cbdf345d; files: src/tui/tui-pty-harness.e2e.test.ts)

Rank-up moves

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

  • Refresh the clean merge result against current main before landing.

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 (1 earlier review cycle)
  • reviewed 2026-08-04T09:13:25.811Z sha 8e44f45 :: found issues before merge. :: [P2] Poll the settings history reload | [P2] Preserve authentication when checking frame rows

@vincentkoc
vincentkoc force-pushed the t04b-tui-command-surfaces-20260804 branch from 8e44f45 to 942e501 Compare August 4, 2026 09:39
@vincentkoc
vincentkoc marked this pull request as ready for review August 4, 2026 09:40
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 4, 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Aug 4, 2026
@vincentkoc
vincentkoc merged commit 121c6c1 into main Aug 4, 2026
265 of 277 checks passed
@vincentkoc
vincentkoc deleted the t04b-tui-command-surfaces-20260804 branch August 4, 2026 10:08
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 4, 2026
…checkpoint

* origin/main: (46 commits)
  fix(agents): recover from invalid compaction summaries (#119137)
  fix(gateway): expose OAuth-backed tools to CLI agents (#119166)
  fix(plugins): preserve metadata reloads during models status (#119183)
  fix(test): bound direct gateway server runs (#119184)
  test(tui): prove command surfaces through PTY (#119165)
  fix(testbox): restore claims across path aliases (#119170)
  fix(message): preserve sends with incidental Telegram locations
  fix(perf): give each concurrency sample a full deadline (#119164)
  fix(testbox): remove changed-gate sync residue (#119163)
  fix(telegram): preserve later chunks after rejected sends
  fix(tui): block terminal controls in system messages (#118998)
  fix(auto-reply): suppress false no-reply fallback during continuations (#119154)
  fix(scripts): prevent gateway benchmarks from stalling on probes (#119063)
  test(channels): verify built sanitizer semantics (#119151)
  fix: prevent live updater from leaving Gateway offline indefinitely (#119116)
  test(qa): restore memory tools primary ownership (#119142)
  fix(agents): settle yielded fanout at harness boundary (#118703)
  fix(codex): cap compaction override warning cache via createDedupeCache (#101745)
  fix(daemon): skip unlabeled launchd plists (#119091)
  test(qa): repair QA catalog integrity (#119140)
  ...
vincentkoc added a commit that referenced this pull request Aug 4, 2026
* origin/main: (208 commits)
  fix(telegram): route reactions to their originating forum topics
  test(gateway): isolate scheduled service timers (#119218)
  test(qa): cover Canvas agent and node controls (#119047)
  fix(cli): avoid repeated migration scans during local agent turns (#119051)
  fix(gateway): keep agents list on prepared model facts (#119208)
  fix(telegram): retry update offset persistence
  fix(ci): accept profiled partial Kova gates (#119121)
  fix(qqbot): keep channel API calls on the active account [AI] (#118575)
  fix(agents): recover from invalid compaction summaries (#119137)
  fix(gateway): expose OAuth-backed tools to CLI agents (#119166)
  fix(plugins): preserve metadata reloads during models status (#119183)
  fix(test): bound direct gateway server runs (#119184)
  test(tui): prove command surfaces through PTY (#119165)
  fix(testbox): restore claims across path aliases (#119170)
  fix(message): preserve sends with incidental Telegram locations
  fix(perf): give each concurrency sample a full deadline (#119164)
  fix(testbox): remove changed-gate sync residue (#119163)
  fix(telegram): preserve later chunks after rejected sends
  fix(tui): block terminal controls in system messages (#118998)
  fix(auto-reply): suppress false no-reply fallback during continuations (#119154)
  ...
vincentkoc added a commit that referenced this pull request Aug 4, 2026
* origin/main: (23 commits)
  chore(tui): add Gateway boundary PTY coverage (#119191)
  fix(telegram): route reactions to their originating forum topics
  test(gateway): isolate scheduled service timers (#119218)
  test(qa): cover Canvas agent and node controls (#119047)
  fix(cli): avoid repeated migration scans during local agent turns (#119051)
  fix(gateway): keep agents list on prepared model facts (#119208)
  fix(telegram): retry update offset persistence
  fix(ci): accept profiled partial Kova gates (#119121)
  fix(qqbot): keep channel API calls on the active account [AI] (#118575)
  fix(agents): recover from invalid compaction summaries (#119137)
  fix(gateway): expose OAuth-backed tools to CLI agents (#119166)
  fix(plugins): preserve metadata reloads during models status (#119183)
  fix(test): bound direct gateway server runs (#119184)
  test(tui): prove command surfaces through PTY (#119165)
  fix(testbox): restore claims across path aliases (#119170)
  fix(message): preserve sends with incidental Telegram locations
  fix(perf): give each concurrency sample a full deadline (#119164)
  fix(testbox): remove changed-gate sync residue (#119163)
  fix(telegram): preserve later chunks after rejected sends
  fix(tui): block terminal controls in system messages (#118998)
  ...
vincentkoc added a commit that referenced this pull request Aug 4, 2026
…time

* origin/main: (177 commits)
  fix(telegram): route reactions to their originating forum topics
  test(gateway): isolate scheduled service timers (#119218)
  test(qa): cover Canvas agent and node controls (#119047)
  fix(cli): avoid repeated migration scans during local agent turns (#119051)
  fix(gateway): keep agents list on prepared model facts (#119208)
  fix(telegram): retry update offset persistence
  fix(ci): accept profiled partial Kova gates (#119121)
  fix(qqbot): keep channel API calls on the active account [AI] (#118575)
  fix(agents): recover from invalid compaction summaries (#119137)
  fix(gateway): expose OAuth-backed tools to CLI agents (#119166)
  fix(plugins): preserve metadata reloads during models status (#119183)
  fix(test): bound direct gateway server runs (#119184)
  test(tui): prove command surfaces through PTY (#119165)
  fix(testbox): restore claims across path aliases (#119170)
  fix(message): preserve sends with incidental Telegram locations
  fix(perf): give each concurrency sample a full deadline (#119164)
  fix(testbox): remove changed-gate sync residue (#119163)
  fix(telegram): preserve later chunks after rejected sends
  fix(tui): block terminal controls in system messages (#118998)
  fix(auto-reply): suppress false no-reply fallback during continuations (#119154)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 6, 2026
* origin/main: (23 commits)
  chore(tui): add Gateway boundary PTY coverage (openclaw#119191)
  fix(telegram): route reactions to their originating forum topics
  test(gateway): isolate scheduled service timers (openclaw#119218)
  test(qa): cover Canvas agent and node controls (openclaw#119047)
  fix(cli): avoid repeated migration scans during local agent turns (openclaw#119051)
  fix(gateway): keep agents list on prepared model facts (openclaw#119208)
  fix(telegram): retry update offset persistence
  fix(ci): accept profiled partial Kova gates (openclaw#119121)
  fix(qqbot): keep channel API calls on the active account [AI] (openclaw#118575)
  fix(agents): recover from invalid compaction summaries (openclaw#119137)
  fix(gateway): expose OAuth-backed tools to CLI agents (openclaw#119166)
  fix(plugins): preserve metadata reloads during models status (openclaw#119183)
  fix(test): bound direct gateway server runs (openclaw#119184)
  test(tui): prove command surfaces through PTY (openclaw#119165)
  fix(testbox): restore claims across path aliases (openclaw#119170)
  fix(message): preserve sends with incidental Telegram locations
  fix(perf): give each concurrency sample a full deadline (openclaw#119164)
  fix(testbox): remove changed-gate sync residue (openclaw#119163)
  fix(telegram): preserve later chunks after rejected sends
  fix(tui): block terminal controls in system messages (openclaw#118998)
  ...
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: 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