Skip to content

fix(cli): stabilize packaged PTY smoke test - #13474

Merged
marius-kilocode merged 2 commits into
mainfrom
fix-prerelease-pty-smoke
Aug 26, 2026
Merged

fix(cli): stabilize packaged PTY smoke test#13474
marius-kilocode merged 2 commits into
mainfrom
fix-prerelease-pty-smoke

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The v7.5.1 prerelease run failed in CLI artifact validation after PR #13472 merged. The packaged binaries built successfully, but the new PTY smoke test produced false failures on Windows x64, macOS x64, and glibc Linux runners.

Why This Change Was Made

PowerShell decorates the marker output with terminal control sequences, so the exact line matcher did not detect output that was visibly present in the log. Standard release runners also need more than 15 seconds to cold-start the larger non-split binary and reach the visible TUI frame.

This strips CSI, OSC, DCS, and related escape sequences before matching the PTY marker, while keeping the shell check at 15 seconds. Only the packaged TUI cold-start deadline increases to 60 seconds.

User Impact

No runtime behavior changes. The prerelease gate continues to require a visible packaged TUI frame without failing on terminal formatting or slower cold starts.

Evidence

  • Added regression tests using the PowerShell output shape from failed job 98204019815.
  • Core typecheck passed.
  • 17 targeted PTY tests passed.
  • Rebuilt the Bun 1.4 macOS arm64 standalone artifact.
  • Packaged --pure __pty-smoke reached the visible TUI prompt.
  • git diff --check passed.

Failed run: https://github.com/Kilo-Org/kilocode/actions/runs/32976503200

@kilo-code-bot

kilo-code-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/core/test/kilocode/pty-durability.test.ts
Previous Review Summary (commit e84e232)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit e84e232)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/core/src/kilocode/pty/smoke.ts
  • packages/core/test/kilocode/pty-smoke.test.ts

Reviewed by grok-4.6 · Input: 150.3K · Output: 6.1K · Cached: 70.1K

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 362aaad into main Aug 26, 2026
30 checks passed
@marius-kilocode
marius-kilocode deleted the fix-prerelease-pty-smoke branch August 26, 2026 14:21
Comment thread packages/core/src/kilocode/pty/smoke.ts
const exited = Promise.withResolvers<number>()
const data = proc.onData((chunk) => {
state.output += chunk
if (/(?:^|[\r\n])KILO_PTY_READY(?:\r?\n|$)/.test(state.output)) output.resolve()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, if it's multiline I think the /m at the end of the regex is needed, I would even go /gm to be sure on multiple lines.

If this output is meant to be a "maybe with new lines around" situation, but the only thing that should be there is KILO_PTY_READY, then I'd use state.output.trim() === "KILO_PTY_READY" instead and remove the regex complexity.

const data = proc.onData((chunk) => {
state.output += chunk
if (/(?:^|[\r\n])KILO_PTY_READY(?:\r?\n|$)/.test(state.output)) output.resolve()
if (marker(state.output)) output.resolve()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this should be an else if as if already resolved in previous if there's no point in re-resolving and checking marker at all.

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.

3 participants