Repository navigation
fix(cli): make the auth-login test's isTTY override actually optional - #135407
Conversation
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.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Reviewed the exact one-line fix against current main and the complete integration fixture. Verification: baseline main CI 33538868877 fails with TS2790 at the cleanup deletion. Exact head 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 Thanks @itsuzef for the fix. No separate refactor follow-up is warranted for this single declaration. |
…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.
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
isTTYproperty, restoration deletes the temporary override.Why This Change Was Made
NodeJS.ReadStream & { isTTY?: boolean }retains the requiredisTTYmember fromReadStream, 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
TS2790: The operand of a 'delete' operator must be optionalatsrc/cli/models-cli.auth-login.integration.test.ts:63; its failed-job log was inspected.0a9a78be98342938993d8d2d577c2a1f5e18a1b6passed CI run 33540220477, including check-test-types-core-4 and the aggregateopenclaw/ci-gate.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.