Skip to content

fix(dev): mint request ids from a random source - #1557

Merged
danielroe merged 2 commits into
mainfrom
random-request-ids
Sep 22, 2026
Merged

danielroe merged 2 commits into
mainfrom
random-request-ids

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

📚 Description

@danielroe
danielroe enabled auto-merge September 22, 2026 14:38
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedmy-bad@​0.2.6 ⏵ 0.2.781 +1100100 +194 +1100

View full report

@pkg-pr-new

pkg-pr-new Bot commented Sep 22, 2026

Copy link
Copy Markdown
  • nuxt-cli-playground

    npm i https://pkg.pr.new/create-nuxt@1557
    
    npm i https://pkg.pr.new/nuxi@1557
    
    npm i https://pkg.pr.new/@nuxt/cli@1557
    

commit: 233dfe2

@codspeed

codspeed Bot commented Sep 22, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 2 untouched benchmarks


Comparing random-request-ids (233dfe2) with main (d36ea91)

Open in CodSpeed

@github-actions

Copy link
Copy Markdown
Contributor

CLI benchmark

@nuxt/cli v4.0.0-alpha.1 (baseline) vs v4.0.0-alpha.1 (this PR)

Metric baseline v4.0.0-alpha.1 head v4.0.0-alpha.1 Delta
nuxt --version wall time (median) 64 ms 64 ms -0.0%
nuxt --help wall time (median) 145 ms 144 ms -1.0%
nuxt dev --help wall time (median) 103 ms 102 ms -1.0%
nuxt --version modules loaded 38 38 0.0%
nuxt --help modules loaded 144 144 0.0%
nuxt dev --help modules loaded 63 63 0.0%
Installed node_modules 2.39 MB 2.39 MB +0.0%
Published tarball (packed) 235.9 kB 235.9 kB +0.0%
Full report

@nuxt/cli v4.0.0-alpha.1 (baseline) vs v4.0.0-alpha.1 (head)

Setting Value
Baseline ref:d36ea91297c9ef0e2bf48de20d5a2a3230cdb7d2 (v4.0.0-alpha.1)
Head local packages/nuxt-cli at 5a6e262 (v4.0.0-alpha.1)
Node v24.21.0
OS Linux 6.17.0 (kernel 6.17.0-1022-azure)
CPU AMD EPYC 7763 64-Core Processor x 4
Memory 15.6 GB
Load average at start 1.32, 0.38, 0.13
Run started 2026-09-22T14:40:37.393Z

Cold CLI startup

Median of 15 interleaved runs per command, one warmup discarded.

Command baseline v4.0.0-alpha.1 median head v4.0.0-alpha.1 median Delta baseline v4.0.0-alpha.1 min / p95 head v4.0.0-alpha.1 min / p95
nuxt --version 64 ms 64 ms -0.0% 63 ms / 68 ms 63 ms / 68 ms
nuxt --version (first output byte) 60 ms 60 ms -0.0% 58 ms / 64 ms 59 ms / 64 ms
nuxt --help 145 ms 144 ms -1.0% 142 ms / 150 ms 140 ms / 148 ms
nuxt --help (first output byte) 140 ms 138 ms -1.3% 137 ms / 144 ms 135 ms / 143 ms
nuxt dev --help 103 ms 102 ms -1.0% 98 ms / 108 ms 98 ms / 107 ms
nuxt dev --help (first output byte) 98 ms 97 ms -0.9% 93 ms / 103 ms 94 ms / 101 ms
nuxt <unknown-command> (no-op) 155 ms 155 ms +0.2% 149 ms / 160 ms 151 ms / 158 ms
nuxt <unknown-command> (no-op) (first output byte) 149 ms 149 ms +0.4% 144 ms / 154 ms 145 ms / 153 ms

Module load cost

Counted with a module.registerHooks load hook, compile cache disabled. Counts every JS module actually evaluated on that code path (built-ins excluded, native addons excluded).

Command baseline v4.0.0-alpha.1 modules head v4.0.0-alpha.1 modules Delta baseline v4.0.0-alpha.1 source bytes head v4.0.0-alpha.1 source bytes Delta
nuxt --version 38 38 0.0% 296.7 kB 296.7 kB 0.0%
nuxt --help 144 144 0.0% 958.9 kB 958.9 kB 0.0%
nuxt dev --help 63 63 0.0% 449.8 kB 449.8 kB 0.0%

Install footprint and published tarball

Each version installed on its own into an empty project with nothing but @nuxt/cli as a dependency, so the tree is exactly the CLI and its transitive dependencies. npm cache is warm and the registry is only consulted for metadata, so install wall time is indicative, not a network benchmark.

Metric baseline v4.0.0-alpha.1 head v4.0.0-alpha.1 Delta
Direct dependencies of @nuxt/cli 22 22 0.0%
Packages in the installed tree (unique name@version) 38 38 0.0%
Unique package names 38 38 0.0%
Package directories on disk (cross-check) 31 31 0.0%
Installed node_modules on disk 2.39 MB 2.39 MB +0.0%
Installed files 420 420 0.0%
Install wall time (warm npm cache, median of 3) 1.27 s 1.27 s -0.1%
Published tarball (packed) 235.9 kB 235.9 kB +0.0%
Published tarball (unpacked) 768.5 kB 768.9 kB +0.1%
Files in tarball 97 97 0.0%

Interleaved runs on a shared runner: trust the deltas, not the absolute timings. The dev, restart and build suites run locally via pnpm bench:cli.

@danielroe
danielroe added this pull request to the merge queue Sep 22, 2026
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 181006f7-9b19-4bab-b370-38da5b3a3e43

📥 Commits

Reviewing files that changed from the base of the PR and between d36ea91 and 233dfe2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • packages/nuxt-cli/package.json
  • packages/nuxt-cli/runtime/dev-request-context.mjs
  • packages/nuxt-cli/src/dev/error-channel.ts
  • packages/nuxt-cli/src/dev/log-channel.ts
  • packages/nuxt-cli/src/dev/serving-state.ts
  • packages/nuxt-cli/src/dev/tui/events.ts
  • packages/nuxt-cli/src/dev/tui/overlay.ts
  • packages/nuxt-cli/src/dev/tui/request-overlay.ts
  • packages/nuxt-cli/src/dev/tui/requests.ts
  • packages/nuxt-cli/src/dev/utils.ts
  • packages/nuxt-cli/test/unit/dev-request-context.spec.ts
  • packages/nuxt-cli/test/unit/dev-tui.spec.ts
  • packages/nuxt-cli/test/unit/dev/lifecycle.spec.ts
  • packages/nuxt-cli/test/unit/error-channel.spec.ts
  • pnpm-workspace.yaml

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The dev server now assigns UUID string identifiers to requests and sends request labels in a separate URL-encoded header. Request context, log channels, error channels, TUI types, and tracing logic use string identifiers. Tests cover header handling, UUID uniqueness, attribution, and report scope isolation. The my-bad dependency and release-age exclusion include version 0.2.7.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 233df

The development server now uses UUID request identities and a separate encoded label header, with attribution preserved across logs, errors, and the TUI. No merge-blocking production risk is evidenced.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 13 files. (2 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description contains only the pull request template and no meaningful summary of the request ID or dependency changes. Add a concise description of the implemented random request ID generation, request label handling, security rationale, tests, and the my-bad dependency update.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: generating development request IDs from a random source.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 13 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

Merged via the queue into main with commit cf0e756 Sep 22, 2026
24 checks passed
@danielroe
danielroe deleted the random-request-ids branch September 22, 2026 14:48
@github-actions github-actions Bot mentioned this pull request Sep 22, 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