Skip to content

chore(tui): add Gateway boundary PTY coverage - #119191

Merged
vincentkoc merged 11 commits into
mainfrom
qa-t02-tui-gateway-boundary-20260804
Aug 4, 2026
Merged

vincentkoc merged 11 commits into
mainfrom
qa-t02-tui-gateway-boundary-20260804

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 4, 2026 •

Copy link
Copy Markdown
Member
Additional instructions

Allow edits from maintainers is enabled.

What Problem This Solves

The TUI's real Gateway boundary did not have one durable built-CLI scenario proving connection, authentication isolation, attach history, reconnect visibility, and command RPC behavior through an actual WebSocket and PTY.

Why This Change Was Made

This adds QA-only shared-Gateway PTY cases plus one mapped QA scenario for the five approved coverage IDs. It uses the canonical synchronized final-screen oracle for attach history, authoritative Gateway history/session reads for lifecycle invariants, isolated model fixtures, and redacted token-leak checks. Production code is unchanged.

User Impact

No production behavior changes. Maintainers gain exact built-CLI regression evidence for the TUI/Gateway ownership boundary.

Evidence

  • Exact signed head: 222d09dbaee6b00199610e1ee4fd04bb9aeefd00
  • Single fresh-PR checkout: run_050a5560414c; the raw image lacked dependencies before build, so the same lease and checkout continued without sync or source changes
  • Exact private-QA build: run_719bd298d59d, build status 0; dist/build-info.json was not emitted
  • Exact suite and validation: run_84aab0825e6f, final status 0
  • Producer result: built mode, 5 passed / 0 failed / 11 skipped
  • Proof matrix: all five approved IDs, exactly one matched assertion per ID
  • Evidence ref: 222d09dbaee6b00199610e1ee4fd04bb9aeefd00
  • Current-main refresh: origin/main@b4f01afa861be479fe5bb7922e19f29582d1e9e0, zero touched-path drift and a conflict-free merge tree from merge-base b6a445c393ec378d066ced0d31b679ad4c6c2f72; no rebase for unrelated movement
  • Failure-revealing focused order and full PTY file: run_3c582b27e42f; 3 passed / 0 failed / 13 skipped, then 16 passed / 0 failed
  • git diff --check, exact type/format/oxlint gates, and targeted static checks passed
  • Sol/high autoreview: no P0-P2 findings, patch correct, confidence 0.98
  • Lorentz final-head behavior/best-fix review: no actionable P0-P2
  • Ohm final-head architecture/best-fix review: no actionable P0-P2
  • Diff: two QA files; test file +270/-6, scenario +40/-0; production LOC +0
  • Screenshots: not applicable; this is headless PTY/Gateway test coverage
  • AI-assisted: yes; the final diff and evidence were reviewed directly

* origin/main: (53 commits)
  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)
  fix(test): isolate shared state between test files (#118781)
  fix(telegram): use monotonic polling liveness
  fix(setup): keep compatible Claude wrappers selectable
  fix(agents): gate Claude live session protocol
  fix(agents): preserve Claude fork successor on stalls
  fix(agents): preserve Claude follow-up replies after background tasks
  fix: unblock macOS release validation (#119110)
  improve(qa): cover vision channel offload (#118862)
  test(qa): cover sandboxed exec behavior (#119053)
  ...
@vincentkoc vincentkoc self-assigned this Aug 4, 2026
@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 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, 9:15 AM ET / 13:15 UTC.

ClawSweeper review

What this changes

Adds a QA scenario and built-CLI PTY tests for TUI Gateway connection, authentication, history attach, reconnect, and command RPC behavior.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No blocking correctness finding. This maintainer-owned QA-only PR should remain open for exact-head CI completion and normal maintainer review.

Priority: P3
Reviewed head: 222d09dbaee6b00199610e1ee4fd04bb9aeefd00

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused real-boundary coverage, assertion-level producer checks, and no correctness finding support a normal mergeable-quality rating once CI finishes.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This maintainer-authored QA-only PR reports built-CLI real Gateway/PTY validation; the external-contributor proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored QA-only PR reports built-CLI real Gateway/PTY validation; the external-contributor proof gate does not apply.
Evidence reviewed 5 items Scenario contract: The new scenario maps five declared TUI Gateway coverage IDs to anchored assertions in the allowlisted local PTY test file.
Boundary assertions: The exact head isolates explicit token input, checks token redaction, verifies ordered Gateway history in a completed terminal frame, and checks Gateway-backed command and reconnect outcomes.
Producer enforcement: The QA producer requires each primary coverage ID to have an allowlisted case and verifies a passed assertion-name match rather than accepting a passing test file alone.
Findings None None.
Security None None.

How this fits together

The TUI CLI connects to the Gateway over WebSocket and renders session state in a terminal. The added QA producer runs that real Gateway/PTY boundary and records assertion-level evidence.

flowchart LR
  Scenario[QA scenario] --> Producer[Evidence producer]
  Producer --> BuiltCli[Built TUI CLI]
  BuiltCli --> Gateway[Gateway WebSocket]
  Gateway --> Sessions[Session and model state]
  BuiltCli --> Assertions[PTY assertions]
Loading

Before merge

  • Resolve merge risk (P1) - GitHub reports the PR as mergeable but behind current main, and exact-head CI is still in progress; land only after those gates complete.
  • Complete next step (P2) - The maintainer-labeled PR has no mechanical repair finding; wait for exact-head CI and normal maintainer merge review.
Agent review details

Security

None.

PR surface

Tests +264, Other +40. Total +304 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 270 6 +264
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 40 0 +40
Total 2 310 6 +304

Review metrics

Metric Value Why it matters
Production vs test LOC production +0, tests/QA +310/-6 The added surface is regression coverage and scenario metadata, with no runtime behavior change.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the real Gateway/PTY coverage and land it after the exact-head merge and CI gates are green.
  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 real Gateway/PTY coverage and land it after the exact-head merge and CI gates are green.

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

Not applicable: this PR adds durable regression coverage rather than reporting a user-facing failure; its stated path is a real Gateway plus built CLI and PTY.

Is this the best way to solve the issue?

Yes: extending the shared real-Gateway fixture with isolated client/session assertions tests the owner boundary without duplicating runtime behavior or mocking transport.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is a QA-only coverage improvement with no claimed production behavior change.
  • 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. Not applicable: This maintainer-authored QA-only PR reports built-CLI real Gateway/PTY validation; the external-contributor proof gate does not apply.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Authored the current-main shared-Gateway PTY fixture and adjacent QA scenario work, as well as this exact-head extension. (role: recent TUI PTY and QA coverage contributor; confidence: high; commits: 67d67b5ca95f, 222d09dbaee6; files: src/tui/tui-pty-local.e2e.test.ts, qa/scenarios/ui/tui-entrypoints-pty.yaml)
  • steipete: Feature-history shortlog and recent TUI lifecycle commits show sustained ownership of the surrounding PTY and Gateway behavior. (role: long-term TUI PTY contributor; confidence: high; commits: deabae48d3, 339b8270bb, 319fd692d1; files: src/tui/tui-pty-local.e2e.test.ts, src/tui/gateway-chat.ts)

Rank-up moves

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

  • Wait for exact-head CI and merge gating to complete.

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 (2 earlier review cycles)
  • reviewed 2026-08-04T11:07:38.392Z sha 7da5a0d :: needs maintainer review before merge. :: none
  • reviewed 2026-08-04T13:05:58.859Z sha 222d09d :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review August 4, 2026 13:08
@vincentkoc
vincentkoc merged commit 52954a1 into main Aug 4, 2026
188 of 190 checks passed
@vincentkoc
vincentkoc deleted the qa-t02-tui-gateway-boundary-20260804 branch August 4, 2026 13:25
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 4, 2026
* origin/main:
  chore(tui): add Gateway boundary PTY coverage (#119191)
  fix(telegram): route reactions to their originating forum topics
  test(gateway): isolate scheduled service timers (#119218)
vincentkoc added a commit that referenced this pull request Aug 4, 2026
* origin/main:
  chore(tui): add Gateway boundary PTY coverage (#119191)
  fix(telegram): route reactions to their originating forum topics
  test(gateway): isolate scheduled service timers (#119218)
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
* origin/main:
  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)
vincentkoc added a commit that referenced this pull request Aug 4, 2026
* origin/main:
  chore(tui): add Gateway boundary PTY coverage (#119191)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 2026
* test(tui): prove gateway boundary flows

* test(tui): tighten gateway boundary assertions

* test(tui): satisfy gateway boundary lint

* test(tui): harden gateway boundary PTY proof

* test(tui): strengthen gateway lifecycle proof

* test(tui): validate gateway history metadata

* test(tui): isolate gateway model proof

* test(tui): isolate gateway model replies

* test(tui): isolate gateway boundary fixtures

* test(tui): settle gateway session adoption
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