Skip to content

fix(cli): make the auth-login test's isTTY override actually optional - #135407

Merged
jalehman merged 1 commit into
openclaw:mainfrom
itsuzef:fix/auth-login-test-tty-delete
Sep 1, 2026
Merged

jalehman merged 1 commit into
openclaw:mainfrom
itsuzef:fix/auth-login-test-tty-delete

Conversation

@itsuzef

@itsuzef itsuzef commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a problem where the core CLI test-type check fails on PR merge refs with TS2790 in src/cli/models-cli.auth-login.integration.test.ts:63, blocking otherwise unrelated changes.

The auth-login integration test temporarily makes stdin interactive and restores the original property descriptor afterward. When stdin had no own isTTY property, restoration deletes the temporary override.

Why This Change Was Made

NodeJS.ReadStream & { isTTY?: boolean } retains the required isTTY member from ReadStream, so TypeScript rejects that deletion. Omitting that member before reintroducing it as optional describes the test-owned temporary property correctly. This is a one-line type-only repair; setup, cleanup, and runtime behavior are unchanged.

User Impact

No production or Gateway behavior changes. Maintainers and contributors can complete the core test-type gate again without weakening the test or changing its cleanup behavior.

Evidence

  • Baseline main CI run 33538868877 reports TS2790: The operand of a 'delete' operator must be optional at src/cli/models-cli.auth-login.integration.test.ts:63; its failed-job log was inspected.
  • Exact head 0a9a78be98342938993d8d2d577c2a1f5e18a1b6 passed CI run 33540220477, including check-test-types-core-4 and the aggregate openclaw/ci-gate.
  • Diff scope: production +0/-0; one existing integration test +1/-1. No configuration, dependency, schema, protocol, or runtime changes.

This proof is compile-time CI evidence, not a live Gateway test; a Gateway run does not exercise the changed TypeScript declaration.

Original fix by Youssef Hemimy (@itsuzef). The contributor states that this change was developed with AI assistance (Claude Code), reviewed and driven by the submitter.

The intersection ReadStream & { isTTY?: boolean } keeps the required
isTTY from ReadStream, so the restore path's delete fails the strict
test-types check (TS2790) on every PR's merge ref. Omit the property
before re-adding it as optional.
@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Sep 1, 2026
@steipete steipete self-assigned this Sep 1, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Sep 1, 2026
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Reviewed the exact one-line fix against current main and the complete integration fixture. ReadStream.isTTY is required in the Node declarations; omitting it before redeclaring the test-owned override optional preserves the existing descriptor-restoration and deletion behavior. No production code changes: production +0/-0, tests +1/-1.

Verification: baseline main CI 33538868877 fails with TS2790 at the cleanup deletion. Exact head 0a9a78be98342938993d8d2d577c2a1f5e18a1b6 passes CI 33540220477, including check-test-types-core-4 and openclaw/ci-gate; the corrected PR body passes context/evidence 33542300828. node scripts/watch-pr-ci.mjs 135407 0a9a78be98342938993d8d2d577c2a1f5e18a1b6 returned GREEN, git diff --check origin/main...HEAD passed, and fresh isolated Codex branch autoreview returned scoped-clean at its configured P0 threshold.

The external candidate was not executed locally. This is compile-time CI proof, not live Gateway proof; the changed assertion is erased at runtime. Native review artifacts validated with READY FOR /prepare-pr. The latest ClawSweeper comment contains only its acknowledgment, with no Rank-up moves to apply.

Thanks @itsuzef for the fix. No separate refactor follow-up is warranted for this single declaration.

@jalehman
jalehman merged commit 01129d7 into openclaw:main Sep 1, 2026
120 of 121 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
…openclaw#135407)

The intersection ReadStream & { isTTY?: boolean } keeps the required
isTTY from ReadStream, so the restore path's delete fails the strict
test-types check (TS2790) on every PR's merge ref. Omit the property
before re-adding it as optional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants