← Back to PRs

#22990: test: fix readonly typing regressions in CI check baseline

by bmendonca3 open 2026-02-21 22:12 View on GitHub →
channel: discord channel: telegram commands size: S
## Summary - fix TypeScript readonly inference regressions in tests that currently fail `pnpm check` - keep scope to test typing/fixtures only (no runtime behavior changes) - unblock stacked security PRs that are currently red due baseline `check` failures ## Why `CI/check` currently fails with readonly/type narrowing errors in test fixtures across multiple modules. This prerequisite isolates the baseline fixes so security PRs can remain scoped. ## Validation - CI only (no local test execution in this session) <!-- greptile_comment --> <h3>Greptile Summary</h3> Fixed TypeScript readonly type inference regressions across test fixtures. The changes address strict typing violations where readonly arrays/objects from `as const` test fixtures were being passed to functions expecting mutable parameters. All modifications use defensive copies via spread operators (`[...]`, `{...}`) to preserve test isolation while satisfying type constraints. - Added missing `expectBodyContents` field to test fixtures - Created mutable copies of readonly arrays using spread syntax - Fixed type assertion chain in `redact-snapshot.test.ts` to properly narrow nested object types - Added explicit generic type parameters to empty `Set<string>()` constructors - Added missing `configured` field to mock return value to match actual function signature <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with no risk - All changes are test-only typing fixes with no runtime behavior modifications. The fixes correctly address readonly/mutable type mismatches using standard defensive copy patterns, and one mock was corrected to include a required field that matches the actual function signature. - No files require special attention <sub>Last reviewed commit: 0a71b3a</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs