Skip to content

test(tui): tighten regression coverage and release fixture leases - #157292

Draft
vincentkoc wants to merge 8 commits into
mainfrom
test/tui-regression-oracles-20260924
Draft

vincentkoc wants to merge 8 commits into
mainfrom
test/tui-regression-oracles-20260924

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

TUI tests repeated weaker assertions, and fixture cleanup could be skipped when an assertion failed.

This tightens forbidden-command, ordering and hyperlink checks, reuses the canonical deferred helper, and removes assertions already covered by stronger expectations. Autocomplete setup retains its cleanup boundary. Prepared-runtime reuse now releases its first lease in finally while preserving assertion-before-disposal and disposal-before-second-admission ordering.

Thirteen test files; actual +37/−58 (net −21). Production, support and CI routing are unchanged. All 375 registrations and 532 statically counted cases remain; collection has not run.

Validation: source/history review, independent review, and exact forward/inverse reconstruction are complete. Qualified standalone formatting passed with no byte or mtime changes; all six native source-review passes completed with no P0–P2 findings. Each pass saw the full diff with a bounded evidence batch; the overall selection included all 13 complete changed files. Tests, collection, types, builds and CI remain held; exact pi-tui 0.85.1 and p-limit 7.3.2 implementations, installed dependencies, native PTY and runtime behavior remain unqualified.

Related prepared-runtime harness lease custody remains a separate follow-up. Final approvals and merge decisions belong to the maintainer.

@vincentkoc vincentkoc self-assigned this Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR strengthens terminal-interface regression assertions, consolidates deferred fixtures, removes redundant checks, and makes fixture cleanup survive failures.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-consistent, but confidence remains limited by unexecuted test changes.
Proof confidence 🦐 gold shrimp (3/6) This MEMBER-authored, test-only PR is exempt from the external-contributor runtime-proof gate; its body reports source review rather than executed test results, and no stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes
Reason: The existing tests can miss individual forbidden commands or missing transcript rows, and failed assertions can bypass resource release. These focused changes improve regression detection with little maintenance cost.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open. This member-authored PR retains useful test improvements absent from current main, and source review found no concrete introduced defect.

Priority: P3
Reviewed head: 340fe2f895b47461359a33e9a72e4f4cf0e7e5e6

Before merge

  • Complete next step - Resolve the branch’s conflicts with current main while preserving its newer tests.

Findings

None.

Tests

  • Missing end-to-end proof: No product E2E scenario changes; collection and execution of the affected test suites remain unverified.
Agent review details

How this fits together

OpenClaw’s terminal interface turns commands and agent events into chat, questions, and autocomplete. These tests check those results and release resources created for each scenario.

flowchart LR
A[Commands and agent events] --> B[Terminal interface]
B --> C[Chat and prompt output]
D[Test fixtures] --> E[Regression tests]
C --> E
E --> F[Assertions and resource cleanup]
Loading

Technical review

Best possible solution:

Retain the stronger observable assertions and failure-safe cleanup within the existing test owners while preserving current main’s newer coverage.

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

Yes, at source level: an assertion failure skips the first lease disposal, and a fixture setup failure bypasses cleanup on current main. Neither failure path was executed during this review.

Is this the best way to solve the issue?

Yes. Strengthening existing assertions and moving resource handling into existing cleanup boundaries is a narrow solution without adding production machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3f76fe021990.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduced changes: The verified merge-base-to-head diff changes tests only; endpoint drift was excluded from PR ownership. (340fe2f895b4)
  • Stronger command exclusion: Each of commands, status, compact, context, and tools is independently excluded, replacing an assertion that only rejected their collective presence. (src/tui/commands.test.ts:231, 340fe2f895b4)
  • Failure-safe lease cleanup: The first runtime lease is disposed in finally, after its assertion and before the second admission; the existing snapshot-reuse check remains. (src/tui/embedded-prepared-runtime.test.ts:40, 340fe2f895b4)
  • Fixture cleanup boundary: File creation and chmod now occur inside the existing try/finally that removes each autocomplete fixture. (src/tui/tui-autocomplete.test.ts:24, 340fe2f895b4)
  • Shared deferred contract: The test helper re-exports the shared promise, resolve, and reject contract; the declared supported Node versions provide Promise.withResolvers. (src/shared/deferred.ts:14, 340fe2f895b4)
  • Current-main necessity: Fetched main still uses the collective negative command assertion, disposes the first lease outside finally, and creates autocomplete fixture files before entering try. (src/tui/embedded-prepared-runtime.test.ts, 3f76fe021990)

PR surface

Tests -21. Total -21 across 13 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 13 37 58 -21
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 13 37 58 -21

Labels

Label changes:

  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P3: This is focused regression-test and fixture maintenance without a production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rank-up moves

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

  • Run the affected TUI suites on a supported Node version and retain the results; this carries forward the previous review’s validation recommendation.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-24T12:41:07.246Z sha 340fe2f :: blocked before merge. :: none

Reviewed October 8, 2026, 9:12 PM ET / October 9, 2026, 01:12 UTC (Revision 2).

@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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