Skip to content

Add entry shape regression test for type narrowing#906

Closed
justin808 wants to merge 1 commit intomainfrom
codex/issue-792-entry-type-narrowing-tests
Closed

Add entry shape regression test for type narrowing#906
justin808 wants to merge 1 commit intomainfrom
codex/issue-792-entry-type-narrowing-tests

Conversation

@justin808
Copy link
Copy Markdown
Member

Closes #792

Summary

  • add a regression test in test/package/environments/base.test.js to verify entry value shape expectations
  • explicitly assert that single-entry values stay string and multi-file entries stay string[]

Why

package/environments/base.ts now relies on TypeScript narrowing for existing entry values. This test locks in the runtime shape assumptions that underpin that narrowing path.

Validation

  • yarn test test/package/environments/base.test.js

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 15, 2026

Warning

Rate limit exceeded

@justin808 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 38 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/issue-792-entry-type-narrowing-tests

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 and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 15, 2026

Greptile Summary

Added a regression test to lock in entry value shape expectations (string for single-entry, string[] for multi-file entries) that support TypeScript type narrowing in package/environments/base.ts

  • Ensures baseConfig.entry.application stays string
  • Ensures baseConfig.entry.multi_entry stays string[] with two string elements
  • Prevents regression of runtime behavior that TypeScript narrowing relies on

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Test-only change that adds important regression coverage for TypeScript type narrowing behavior. The test correctly validates runtime entry value shapes (string vs string[]) that match TypeScript's type expectations in base.ts
  • No files require special attention

Important Files Changed

Filename Overview
test/package/environments/base.test.js Added regression test to verify entry value shapes (string vs string[]) for TypeScript narrowing

Last reviewed commit: e71003b

@justin808
Copy link
Copy Markdown
Member Author

Superseded by #910, which carries the same test intent and fixes the ESLint failure on a fresh branch.

@justin808
Copy link
Copy Markdown
Member Author

Closing in favor of #910.

@justin808 justin808 closed this Feb 15, 2026
@justin808
Copy link
Copy Markdown
Member Author

Superseded by #910, which carries the same test intent and fixes the ESLint prefer-strict-equal failure on a fresh branch.

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.

Validate type narrowing for Entry type in base.ts

1 participant