Skip to content

fix(ci): stringify the fetch URL in the PR test-LoC summary test - #14757

Closed
nwparker wants to merge 1 commit into
mainfrom
nwparker/fix-pr-test-loc-summary-lint
Closed

nwparker wants to merge 1 commit into
mainfrom
nwparker/fix-pr-test-loc-summary-lint

Conversation

@nwparker

@nwparker nwparker commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 +5 −2 +3
Prod 0 0 0 0

Why

audit:code-quality:type-aware currently fails on main, which fails the static analysis job on every PR opened against it (seen on #14749 and #14750):

config/scripts/pr-test-loc-summary.test.mjs:88:45: Invalid type used in template literal expression.

listPullFiles defaults fetchImpl to the global fetch, so the test double's url parameter is typed RequestInfo | URL. That union includes Request, which has no meaningful string form, so interpolating it into a template literal trips typescript(restrict-template-expressions).

This landed green in #14738 but fails on main now, so it needs an explicit fix rather than a re-run.

Change

Take the string form once and use it for both the page lookup and the error message. Behavior is identical — the keys were always strings.

Verification

  • pnpm run audit:code-quality:type-aware: exit 0
  • config/scripts/pr-test-loc-summary.test.mjs: 8 tests passing

Unblocks #14749 and #14750.

`listPullFiles` defaults `fetchImpl` to global `fetch`, so the test double's `url`
parameter is typed `RequestInfo | URL`. Interpolating that union into a template
literal trips typescript(restrict-template-expressions), which fails
`audit:code-quality:type-aware` — and with it the static analysis job on every PR
opened against main.

Use the string form explicitly for both the page lookup and the error message.
@coderabbitai

coderabbitai Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fafd5f57-d269-430c-aea2-6e95f76a842b

📥 Commits

Reviewing files that changed from the base of the PR and between 5b7f442 and de7b917.

📒 Files selected for processing (1)
  • config/scripts/pr-test-loc-summary.test.mjs

📝 Walkthrough

Walkthrough

The paginated fetch test now converts the requested URL to a string before using it as the pages lookup key and before including it in unexpected-URL error messages.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the failure, cause, change, and verification, but it omits most required template sections and the required Linked Issue and Visual Proof entries. Add the required ELI5, What Changed, Linked Issue, Visual Proof, Testing, Review, Checklist, AI Disclosure, and Author sections, or mark non-applicable sections explicitly.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the test file change and the URL stringification fix.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@nwparker

Copy link
Copy Markdown
Contributor Author

Superseded by #14755, which landed the same String(url) fix on main first. Closing as redundant — main's static analysis is unblocked either way.

@nwparker nwparker closed this Aug 15, 2026
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.

1 participant