Skip to content

test(tui): restore gap replay and saved-answer coverage - #556

Draft
lidge-jun wants to merge 6 commits into
codex/native-activity-terminal-host-testsfrom
codex/native-activity-tui-regressions
Draft

test(tui): restore gap replay and saved-answer coverage#556
lidge-jun wants to merge 6 commits into
codex/native-activity-terminal-host-testsfrom
codex/native-activity-tui-regressions

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

Ordinary dependent draft above #555. Three TUI test files and one historical recorded-frame JSON fixture only; no product/runtime/provider code change.

  • Restore gap-preview, replay, saved/compatibility/null-answer and current-owner regression coverage.
  • Validate declared HTTP method/path/query/owner tuples before custom replies, then assert complete ordered request counts and an independent violation ledger.
  • Exercise saved/absent/unavailable variants for historical print frames, retired assistant/thinking tombstones, separate tool/message suffixes and actual Screen flush followed by an owned saved-answer correction while B remains active.
  • Preserve historical backendHead 2a043b14a531ee1db9c2d51b25e1c86f71daac54; clarify that these are historical consumer frames, not a fresh backend/provider capture.

Source 5450d14aa3fcc2492f9e59b643d823be5e654105 cherry-picked unchanged. All four hashes match the independently accepted R2 review, which closed the four earlier test-adequacy findings.

Original TUI verification (05a0b8f36)

184 tests /11 files passed: 116 in the three changed TUI files plus 68 in eight named answer/read/identity/text/geometry/lifecycle/print neighbors. No full local suite.

A separate read-only TypeScript AST check proves all 47 original test declarations remain byte-identical (58 original expanded cases). The 52 restored cases plus six added recorded-fallback variants remain. Historical scenario/identity/frame arrays match the recorded donor, and all reviewed expected annotations/metadata match the accepted source fixture. Isolated homes, bounded output, completed owned-process cleanup and no skipped cases.

These checks use captured renderer output, an ANSI terminal model and xterm geometry. They do not certify an OS PTY, Windows/ConPTY, fresh provider execution, packaged Electron or the separate unready process harness. That harness is explicitly excluded. Hosted CI is tracked on this exact head; existing parent failures and final QA gates remain open.

Dependency

Manual chain: #551#552#553#554#555 → this PR. Merge bottom-up only after required per-head review/CI/impact-QA. No native stack, old-donor closure, auto-merge, release or deployment.

Windows physical-fixture repair (9ad655d)

Carries the reviewed session-test repair from 8269b2679 in lower #553 and normal parent merges upward. Real held children replace an autonomous 2-second exit; physical factory cleanup uses the unchanged production default budget while synthetic 100ms fixtures remain unchanged. Exit/active-count assertions run immediately at the production return boundary, before an independent close wait; a foreign PONG sentinel verifies sibling preservation.

Fresh scoped verification at this head: 52 tests /2 files passed. The only change from this PR's previous head is claude-sdk-session.test.ts; production termination policy and the complete 15-file Windows selection are unchanged. Actual new-head Windows and Node CI are required and tracked separately. Earlier test/runtime receipts above are not relabeled as fresh runs on this head. No force-push, rebase, skip or gate waiver.

Rendering and bootstrap repair update (37cd576)

Includes the reviewed Node A repair from 916653397: behavioral badge/final-render proofs, actual Mermaid callback dispatch, settings-failure/location ordering and AST-verified API counts. These repairs are present in lower #551 and propagated normally; the required existing replacement tests are retained there. Each layer freshly passed 60 tests across six named files after that update.

Also includes the reviewed Node B repair from be4f5b3b: observable reconnect/history/sidebar readiness, declared HTTP ledgers and an actually-started stale-A request. Model-free/cache/request-bridge repairs start in #551; the newer redirect fixture is repaired only in its existing #554 layer and descendants. No new test is introduced into an earlier layer merely to apply a patch.

Fresh bootstrap verification at this head: 70 tests /7 files passed. The test-only repairs preserve production code, process policy and Windows selection. Exact-head hosted Node/Windows results remain mandatory; previous Windows successes are not relabeled as new-head CI. No whole-suite local run, force-push, rebase, skip or approval bypass.

Shared disconnect repair (87b46ec)

This head carries the shared lowest-layer repair through normal parent merges: disconnect cleanup uses the existing synchronous UI import, and a same-stack exact-effect regression preserves every prior oracle. Fresh Node22 focused verification at this head: 80 tests across 5 files, all passed with closed processes and removed owned roots. Historical CI failures remain anchored to their original heads; fresh hosted CI, other runtime reviews and applicable QA are still required. This update is not final merge approval.

(cherry picked from commit 5450d14aa3fcc2492f9e59b643d823be5e654105)
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant