Skip to content

test(tui): prove editor input through PTY - #118982

Merged
vincentkoc merged 1 commit into
mainfrom
t04-tui-editor-input-20260803
Aug 3, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
t04-tui-editor-input-20260803

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

OpenClaw's TUI editor behavior had focused helper coverage, but no primary QA
evidence running message composition, input history, keyboard shortcuts, paste
admission, and IME/AltGr bytes through the real terminal loop.

Why This Change Was Made

This adds four focused real-PTY assertions to the existing runTui() harness
and a producer-backed QA scenario. The evidence producer remains unchanged and
authenticates one independently matched assertion for each coverage ID.

User Impact

No production behavior changes. Maintainers gain durable primary evidence for
five TUI editor-input contracts.

Evidence

  • Producer-backed real TUI PTY lane: 5 passed, 51 skipped.
  • Authenticated qa-evidence.json: pass at
    d6b9971f94174b1ad9735be53ec6c6df860b9350.
  • proof-matrix.json: five configured cases, each matched to one passed
    assertion in src/tui/tui-pty-harness.e2e.test.ts.
  • Private-QA qaRuntime build passed with
    OPENCLAW_BUILD_PRIVATE_QA=1 OPENCLAW_BUILD_ALL_NO_PNPM=1.
  • Literal bytes cover terminal history navigation, Ctrl+E and Ctrl+C,
    bracketed paste, fragmented committed CJK input, and Kitty AltGr CSI-u.
  • Fresh exact-head branch autoreview found no actionable findings (0.99).
  • Exact-head hosted CI: 78 successful, 40 skipped, 0 failing or pending,
    including Real behavior proof, lint, build artifacts, QA smoke, and the
    max-lines ratchet.
  • Formatting, type-aware oxlint, max-lines ratchet, git diff --check,
    forbidden-scope, and privacy scans pass with no new suppression.
  • Crabbox/Testbox routing was unavailable; trusted-source local fallback ran
    without dependency reconciliation, as allowed by repository policy.
  • Production LOC: zero.
  • Prerequisite producer: test(tui): add reusable PTY evidence producer #118902

Primary coverage:

  • tui.message-composition
  • tui.input-history
  • tui.keyboard-shortcuts
  • tui.paste-and-busy-submit-handling
  • tui.ime-and-altgr-handling

@vincentkoc vincentkoc self-assigned this Aug 3, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

@vincentkoc
vincentkoc marked this pull request as ready for review August 3, 2026 21:46
@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 force-pushed the t04-tui-editor-input-20260803 branch from 6fdf9cf to b563fe0 Compare August 3, 2026 21:53
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

Exact head: b563fe07aaa0453e917aed2088925758a97874e4

@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 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. 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: found issues before merge. Reviewed August 3, 2026, 6:13 PM ET / 22:13 UTC.

ClawSweeper review

What this changes

This PR adds a QA Lab scenario and four real-PTY editor-input assertions for TUI history, shortcuts, paste admission, IME, and AltGr handling.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: the exact head provides useful TUI PTY coverage and resolves the prior max-lines suppression, but it has not applied the requested structural split and replaces it with unreadable formatter-ignored test code.

Priority: P3
Reviewed head: d6b9971f94174b1ad9735be53ec6c6df860b9350

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The real-PTY evidence is strong, but the remaining structural blocker prevents a higher readiness rating.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; supporting exact-head Real behavior proof is reported as successful.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; supporting exact-head Real behavior proof is reported as successful.
Evidence reviewed 5 items Exact-head structure: The added cases remain in a 1,097-line harness and use three formatter-ignore directives around a compressed action DSL; this does not implement the prior requested sibling-file extraction.
Prior blocker partially addressed: The exact-head check context reports checks-fast-max-lines-ratchet successful; the old suppression is gone, but the structural rank-up move to split independent cases remains unmet.
QA contract: The merged producer requires declared primary coverage to map to allowlisted, passed assertions, and the new scenario supplies five matching patterns.
Findings 1 actionable finding [P1] Extract editor-input PTY cases into a sibling test file
Security None None.

How this fits together

The TUI converts terminal bytes into editor actions and submitted messages; the PTY harness drives that loop against a fake backend, while QA Lab authenticates selected assertions as scenario evidence.

flowchart LR
  A[Terminal input] --> B[PTY harness]
  B --> C[TUI terminal loop]
  C --> D[Editor and submission]
  D --> E[Fake backend log]
  B --> F[QA evidence producer]
  F --> G[QA scenario result]
Loading

Before merge

  • Extract editor-input PTY cases into a sibling test file (P1) - The earlier max-lines suppression is gone, but these independent cases still live in the 1,097-line harness through formatter-ignored compressed data and dispatch code. This leaves failed-step diagnostics opaque and does not complete the prior requested split; move the cases to a focused sibling PTY file using the existing fixture support, then update the producer mapping.
  • Complete next step (P2) - The required change is mechanically clear, but this maintainer-authored, maintainer-labeled PR stays in normal human-owned review rather than repair dispatch.

Findings

  • [P1] Extract editor-input PTY cases into a sibling test file — src/tui/tui-pty-harness.e2e.test.ts:347-367
Agent review details

Security

None.

PR surface

Tests +27, Other +52. Total +79 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 28 1 +27
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 52 0 +52
Total 2 80 1 +79

Review metrics

Metric Value Why it matters
Production vs test/QA LOC production +0; tests/QA +80/-1 The PR is test-only; its remaining blocker is the maintainability of the added test structure rather than production behavior.

Technical review

Best possible solution:

Extract the independent editor-input flows into a focused sibling PTY test file, reuse the fixture support, and update the producer allowlist and scenario patterns without changing the tested runtime behavior.

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

Not applicable: this PR adds coverage rather than fixing a reported production failure; its exact-head real-PTY check is supplied as supporting evidence.

Is this the best way to solve the issue?

No. Removing the max-lines suppression is insufficient because the independent cases remain compressed in the oversized harness; a sibling test file is the clearer, maintainable solution.

Full review comments:

  • [P1] Extract editor-input PTY cases into a sibling test file — src/tui/tui-pty-harness.e2e.test.ts:347-367
    The earlier max-lines suppression is gone, but these independent cases still live in the 1,097-line harness through formatter-ignored compressed data and dispatch code. This leaves failed-step diagnostics opaque and does not complete the prior requested split; move the cases to a focused sibling PTY file using the existing fixture support, then update the producer mapping.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • remove proof: sufficient: Current real behavior proof status is not_applicable, not sufficient.

Label justifications:

  • P3: This is valuable but non-user-facing TUI test and QA coverage with no production-path change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; supporting exact-head Real behavior proof is reported as successful.

Evidence

What I checked:

  • Exact-head structure: The added cases remain in a 1,097-line harness and use three formatter-ignore directives around a compressed action DSL; this does not implement the prior requested sibling-file extraction. (src/tui/tui-pty-harness.e2e.test.ts:347, d6b9971f9417)
  • Prior blocker partially addressed: The exact-head check context reports checks-fast-max-lines-ratchet successful; the old suppression is gone, but the structural rank-up move to split independent cases remains unmet. (config/max-lines-baseline.txt:1, d6b9971f9417)
  • QA contract: The merged producer requires declared primary coverage to map to allowlisted, passed assertions, and the new scenario supplies five matching patterns. (test/e2e/qa-lab/tui/tui-pty-evidence-producer.ts:182, 99926b732346)
  • Current-main necessity: The PR head is not an ancestor of the supplied current main SHA, so its scenario and added assertions are not already implemented on main. (d6b9971f9417)
  • TUI history provenance: Recent harness history includes session and terminal-path maintenance by Peter Steinberger; the existing Unicode PTY case is attributed to Yiğit ERDOĞAN. (src/tui/tui-pty-harness.e2e.test.ts:334, 08ea9cc31d8e)

Likely related people:

  • Peter Steinberger: Recent TUI harness history includes multiple TUI terminal-path fixes, including scoped session handling. (role: recent area contributor; confidence: high; commits: 08ea9cc31d8e, c656e73065a3; files: src/tui/tui-pty-harness.e2e.test.ts, src/tui/tui.ts)
  • vincentkoc: Authored the merged PTY evidence producer that this scenario uses, establishing direct ownership of the adjacent QA contract. (role: QA evidence-contract contributor; confidence: high; commits: 99926b732346; files: test/e2e/qa-lab/tui/tui-pty-evidence-producer.ts)
  • Yiğit ERDOĞAN: Git blame attributes the pre-existing real-loop Unicode assertion adjacent to this change to this contributor. (role: existing harness coverage contributor; confidence: medium; commits: 38aa704a313a; files: src/tui/tui-pty-harness.e2e.test.ts)

Rank-up moves

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

  • Move the four editor-input cases into a sibling PTY test file and remove the formatter-ignore directives.
  • Keep the existing producer-backed scenario patterns aligned with the new test file and exact assertion names.

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-03T22:03:03.779Z sha b563fe07aaa0453e917aed2088925758a97874e4 :: needs changes before merge. :: [P1] Split the added PTY cases instead of suppressing max-lines

@vincentkoc
vincentkoc force-pushed the t04-tui-editor-input-20260803 branch from b563fe0 to d6b9971 Compare August 3, 2026 22:07
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

Exact head: d6b9971f94174b1ad9735be53ec6c6df860b9350

@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 removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Aug 3, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

ClawSweeper disposition for exact head d6b9971f94174b1ad9735be53ec6c6df860b9350:

  • Extract to a sibling PTY test file: skipped. The reviewed T04 contract
    allows only src/tui/tui-pty-harness.e2e.test.ts and
    qa/scenarios/ui/tui-editor-input-pty.yaml, and explicitly forbids touching
    other PTY test files. The final head keeps isolated real PTY fixtures in the
    owning harness, removes the rejected max-lines suppression, and passes both
    type-aware oxlint and hosted checks-fast-max-lines-ratchet.
  • Keep producer mappings aligned: applied. The unchanged T00 producer maps
    all five exact primary IDs to independently matched assertion names through
    execution.config.tuiPtyCases; final evidence is 5 passed, 0 failed.

No production code or additional files are in scope. The maintainer review
artifact recommends READY FOR /prepare-pr, and the exact-head hosted matrix
has no failures.

@vincentkoc
vincentkoc merged commit 57a1cbb into main Aug 3, 2026
134 of 135 checks passed
@vincentkoc
vincentkoc deleted the t04-tui-editor-input-20260803 branch August 3, 2026 22:18
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 3, 2026
…r-admin-20260803

* origin/main: (89 commits)
  fix(googlechat): align doctor policy ownership with canonical account configuration (#118972)
  test(tui): prove editor input through PTY (#118982)
  fix(memory): persist trusted owner provenance at canonical transcript boundary (#118987)
  test(qa): cover health monitor and cache boundaries (#118961)
  fix(macos): restore dashboard frame double-click zoom (#118976)
  fix(googlechat): recover durable lanes after oversized attachments (#118986)
  test(qa): cover runtime telemetry evidence (#118950)
  fix(gateway): resolve SQLite usage details (#118918)
  test(cron): cover durable scheduler state (#118981)
  test(gateway): cover node exec approval relay (#118825)
  test(qa): add Active Memory recall coverage (#118963)
  test(qa): promote package-backed Docker artifact proof (#118826)
  test(qa): cover diagnostic event boundary (#118844)
  test(gateway): cover WebSocket runtime contracts (#118797)
  fix(signal): drain accepted websocket messages before shutdown (#118975)
  fix(plugins): remove stale load paths during uninstall (#118930)
  test(qa): cover bundled runtime discovery (#118922)
  chore(clawhub): cover plugin release policy contracts (#118971)
  test(qa): cover support export and stability (#118956)
  fix(feishu): enforce exact signed webhook request boundaries (#118758)
  ...
vincentkoc added a commit that referenced this pull request Aug 3, 2026
…ansports-20260803

* origin/main: (120 commits)
  test(ui): add service-worker update primary QA proof (#118805)
  test(qa): cover CLI onboarding and plugin install sources (#118882)
  test(qa): cover remote logging boundaries (#118951)
  fix(sms): retry transient MMS failures before durable adoption (#118994)
  test(qa): cover video generation invocation (#118864)
  test(qa): cover media reference intake (#118858)
  test(qa): cover image generation task lifecycle (#118915)
  feat(sms): track Twilio delivery status (#118665)
  test(tasks): cover TaskFlow registry lifecycle (#118983)
  test(gateway): verify SSH tunnel fallback (#118818)
  fix(security): harden network tool output at canonical owner boundaries (#118984)
  fix(googlechat): align doctor policy ownership with canonical account configuration (#118972)
  test(tui): prove editor input through PTY (#118982)
  fix(memory): persist trusted owner provenance at canonical transcript boundary (#118987)
  test(qa): cover health monitor and cache boundaries (#118961)
  fix(macos): restore dashboard frame double-click zoom (#118976)
  fix(googlechat): recover durable lanes after oversized attachments (#118986)
  test(qa): cover runtime telemetry evidence (#118950)
  fix(gateway): resolve SQLite usage details (#118918)
  test(cron): cover durable scheduler state (#118981)
  ...
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: 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.

1 participant