Skip to content

fix(ci): keep PTY tests observable and wait for completed turns - #117405

Merged
steipete merged 1 commit into
mainfrom
codex/ci-tui-pty-progress
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/ci-tui-pty-progress

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve real progress output for the TUI PTY shard and apply the existing long-running watchdog budget to that project.
  • Wait for the second embedded response and idle state before exiting the real local TUI.
  • Set the already-supported shutdown grace override only in the isolated local-PTY test child; production defaults are unchanged.

This repairs the shared required TUI CI failure currently blocking otherwise reviewed changes, including #117355 and #117381. The original commit author, author date, and commit subject are preserved.

Real failure and verification

  • Current-main watchdog regression reproduced against the real runner: the PTY project inherited a 120000 ms silent-output timeout instead of the required 300000 ms.
  • Before the isolated fixture correction, the actual full local-backend PTY case failed after 133826 ms with timed out waiting for PTY exit: the fixture allowed 4 seconds, while the normal local shutdown grace is 120 seconds plus its 2-second hard-exit allowance.
  • The same previously failing real PTY case passed in 8576 ms after setting the existing test-child-only OPENCLAW_TUI_LOCAL_RUN_SHUTDOWN_GRACE_MS=500.
  • Trusted remote proof then passed the complete three-file real local/Gateway/harness PTY project, the complete test/scripts/run-vitest.test.ts watchdog suite, core-test and root-test typechecks, all core and script lint shards, and the complete scoped changed/security/plugin/dependency/dead-code gates.
  • Two independent source reviews and a separately invoked authenticated Codex review approved exact four-file patch SHA-256 a1a0a1bc4905f0cdc582c17357613866507c95f151e348a2c827fe32008850cd; complete final remote proof exited successfully.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Aug 1, 2026
@steipete
steipete force-pushed the codex/ci-tui-pty-progress branch from b4d02b1 to b9d20a3 Compare August 1, 2026 13:08
@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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 10:40 AM ET / 14:40 UTC.

ClawSweeper review

What this changes

This PR gives the TUI pseudo-terminal test project the established long-running watchdog budget, emits GitHub Actions annotations alongside verbose output, and shortens shutdown only for the isolated local-TUI test child.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

The patch is a focused, source-backed repair for the TUI PTY CI project: current main still falls back to a 120-second silent-output watchdog, while this branch applies the existing 300-second long-running budget, preserves visible reporting, and bounds only the isolated test child’s shutdown grace. No correctness or security finding was identified; keep it open for the already-requested maintainer merge review and exact-head CI completion.

Priority: P2
Reviewed head: ab37627415f3fe0d12531c71cf874a51278380b1

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A compact owner-boundary patch with source-backed regression coverage and credible real-run proof; only normal exact-head CI and maintainer merge handling remain.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): The PR body provides before/after real local-PTY timings and reports trusted remote execution of the complete PTY project and scoped gates on the reviewed head; this is adequate real behavior proof for a CI fixture repair.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): The PR body provides before/after real local-PTY timings and reports trusted remote execution of the complete PTY project and scoped gates on the reviewed head; this is adequate real behavior proof for a CI fixture repair.
Evidence reviewed 7 items Current watchdog behavior: On current main, the wrapper resolves a selected config through a timeout map and otherwise uses the 120,000 ms default; the TUI PTY config is absent from that map, so the reported fallback is source-reproducible.
Focused branch repair and regression assertion: The branch adds only the TUI PTY config to the existing 300,000 ms long-running group, and extends the watchdog test’s existing project-config table with that exact config.
Test-child-only lifecycle scope: The production TUI computes local-mode hard exit as the normal hard-exit allowance plus an environment-controlled local-run grace; the branch sets the 500 ms override only in the spawned local PTY fixture environment, not in production configuration.
Findings None None.
Security None None.

How this fits together

The Vitest wrapper selects a project config and injects watchdog settings into the test process. The TUI PTY project runs real terminal fixtures; its reporter output and child-only shutdown behavior determine whether CI exposes progress and finishes the fixture promptly.

flowchart LR
  A[CI TUI PTY job] --> B[Vitest wrapper]
  B --> C[Project timeout selection]
  C --> D[TUI PTY test project]
  D --> E[Verbose and GitHub reporting]
  D --> F[Local TUI child fixture]
  F --> G[Bounded shutdown]
  E --> H[Observable CI outcome]
  G --> H
Loading

Before merge

  • Resolve merge risk (P1) - Merging intentionally increases the maximum time before a genuinely silent TUI PTY project fails from 120 seconds to 300 seconds; this delays diagnosis of a true hang, although the maintained verbose and GitHub Actions reporters make ordinary progress visible and the supplied maintainer comment explicitly accepts that tradeoff.
  • Complete next step (P2) - The patch has no actionable repair finding, but the protected maintainer label, explicit accepted timeout tradeoff, and still-running exact-head checks require ordinary maintainer merge handling.
Agent review details

Security

None.

PR surface

Tests +2, Other +1. Total +3 across 4 files.

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

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Merge with the accepted TUI PTY budget (recommended)
    After the required checks finish on the current head, accept the explicitly approved 300-second silent-output ceiling for this one long-running test project.
  2. Retain the 120-second ceiling
    Decline the CI reliability repair if maintainers prefer faster failure of a genuinely silent PTY hang over supporting the project’s allowed long-running cases.

Technical review

Best possible solution:

Keep the config-specific 300-second watchdog and child-only shutdown override, then merge only after the exact head has completed its required CI gates.

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

Yes, from source: invoking scripts/run-vitest.mjs with test/vitest/vitest.tui-pty.config.ts on current main selects the 120-second fallback because that config is missing from the long-running timeout map. The PR body also records a real-run reproduction and an after-fix local PTY pass, but this read-only review did not rerun it.

Is this the best way to solve the issue?

Yes. Adding the already-established long-running budget at the wrapper’s project-selection owner and keeping the shutdown grace inside the isolated fixture is narrower and safer than changing global timeouts or production shutdown defaults.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded CI test-project reliability repair that can block reviewed changes but does not alter runtime user behavior.
  • merge-risk: 🚨 automation: The patch changes CI watchdog duration and reporter selection for the TUI PTY test project.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): The PR body provides before/after real local-PTY timings and reports trusted remote execution of the complete PTY project and scoped gates on the reviewed head; this is adequate real behavior proof for a CI fixture repair.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides before/after real local-PTY timings and reports trusted remote execution of the complete PTY project and scoped gates on the reviewed head; this is adequate real behavior proof for a CI fixture repair.

Evidence

What I checked:

  • Current watchdog behavior: On current main, the wrapper resolves a selected config through a timeout map and otherwise uses the 120,000 ms default; the TUI PTY config is absent from that map, so the reported fallback is source-reproducible. (scripts/run-vitest.mjs:403, 133a8a627429)
  • Focused branch repair and regression assertion: The branch adds only the TUI PTY config to the existing 300,000 ms long-running group, and extends the watchdog test’s existing project-config table with that exact config. (scripts/run-vitest.mjs:43, ab37627415f3)
  • Test-child-only lifecycle scope: The production TUI computes local-mode hard exit as the normal hard-exit allowance plus an environment-controlled local-run grace; the branch sets the 500 ms override only in the spawned local PTY fixture environment, not in production configuration. (src/tui/tui-pty-local.e2e.test.ts:576, ab37627415f3)
  • Reporting and existing lifecycle coverage: The branch keeps the verbose reporter and conditionally adds the supported GitHub Actions reporter. Current main’s local PTY suite already waits for response output followed by an idle redraw before exit, so this patch does not add a parallel lifecycle path. (test/vitest/vitest.tui-pty.config.ts:46, ab37627415f3)
  • Area provenance: The local PTY lifecycle path appears to date to Peter Steinberger’s merged TUI lifecycle work, while the current wrapper timeout map is attributed to Vincent Koc’s current-main validation work. (src/tui/tui-pty-local.e2e.test.ts:530, 339b8270bbe3)
  • Current-main and release position: The PR head has current main as its direct parent, so main does not already contain this change. The latest release commit predates this August 1, 2026 branch, and the open PR head is not release provenance. (ab37627415f3)

Likely related people:

  • Peter Steinberger: Recent merged history on the local PTY fixture includes the TUI lifecycle/progress work that established the response-and-idle behavior this repair exercises. (role: recent TUI lifecycle contributor; confidence: high; commits: 339b8270bbe3, cd4bd7c6c0ca; files: src/tui/tui-pty-local.e2e.test.ts, src/tui/tui.ts)
  • Vincent Koc: Current-main blame and file history attribute the wrapper timeout-map surface to this validation-focused commit. (role: recent test-runner contributor; confidence: medium; commits: f5a8cb02ea0a; files: scripts/run-vitest.mjs, test/scripts/run-vitest.test.ts)

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-01T13:12:39.647Z sha b9d20a3de98a37d01b5d9373c6bd067fd0332d99 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T13:36:29.849Z sha 65065241682cb069f013875640c8a6e9f5350c85 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/ci-tui-pty-progress branch from b9d20a3 to 6506524 Compare August 1, 2026 13:31
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 1, 2026
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer decision: accept the TUI-PTY-only no-output watchdog increase from 120s to 300s. This project permits 150s tests, 300s matches the existing GitHub CI budget, and verbose per-case/GitHub annotation reporting plus completed-turn/idle waits preserve progress and hang visibility. The bounded 500ms child-process grace fixes the reproduced local shutdown hang. On the exact current head, check-test-types and the required openclaw/ci-gate are green.

@steipete
steipete force-pushed the codex/ci-tui-pty-progress branch from 6506524 to ab37627 Compare August 1, 2026 14:36
@steipete
steipete merged commit deabae4 into main Aug 1, 2026
119 checks passed
@steipete
steipete deleted the codex/ci-tui-pty-progress branch August 1, 2026 14:46
wingwkyuen pushed a commit to tcgoidc/openclaw that referenced this pull request Aug 1, 2026
…up-ownership-20260801

* origin/main:
  fix(gateway): trim audit.list exact-match filter ids (openclaw#110847)
  fix: harden plugin import-boundary guards and remove dead scanner (openclaw#117386)
  fix(ci): keep PTY tests observable and wait for completed turns (openclaw#117405)
  fix(plugins): resolve marketplace aliases without recursive cycles (openclaw#117440)
  fix: break command recovery import cycle (openclaw#116947)
  fix: clear offscreen command recovery
  fix: fence command recovery ownership
  fix: scope failed command recovery
  fix(plugins): fail closed on ambiguous uninstall targets (openclaw#117406)
w3evolutions pushed a commit to W3EvolutionsLLC/openclaw that referenced this pull request Aug 1, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
…up-ownership-20260801

* origin/main:
  fix(gateway): trim audit.list exact-match filter ids (openclaw#110847)
  fix: harden plugin import-boundary guards and remove dead scanner (openclaw#117386)
  fix(ci): keep PTY tests observable and wait for completed turns (openclaw#117405)
  fix(plugins): resolve marketplace aliases without recursive cycles (openclaw#117440)
  fix: break command recovery import cycle (openclaw#116947)
  fix: clear offscreen command recovery
  fix: fence command recovery ownership
  fix: scope failed command recovery
  fix(plugins): fail closed on ambiguous uninstall targets (openclaw#117406)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: XS 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