Skip to content

fix: allow sourcemap serialization to exceed capacity estimates - #473

Merged
Boshen merged 1 commit into
mainfrom
fix/serialization-capacity
Sep 24, 2026
Merged

Boshen merged 1 commit into
mainfrom
fix/serialization-capacity

Conversation

@Boshen

@Boshen Boshen commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Valid VLQ mappings can need up to 35 bytes per token, exceeding the 12-byte estimate and triggering a debug assertion after successful serialization. Remove that assertion; existing capacity checks still reserve space before unsafe writes.

Count line breaks once across chunks to avoid overallocating, and strengthen round-trip coverage with large positive and negative deltas.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T07:38:05.027718Z 8ba13c5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codspeed

codspeed Bot commented Sep 24, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 2.88%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 4 improved benchmarks
✅ 16 untouched benchmarks
⏩ 7 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ lookup_token[real_small] 1.3 µs 1.3 µs +4.29%
⚡ lookup_token[real_medium] 1.8 µs 1.7 µs +3.19%
⚡ lookup_table[real_small] 2.6 µs 2.6 µs +2.09%
⚡ lookup_table[real_medium] 2.8 µs 2.7 µs +1.98%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix/serialization-capacity (8ba13c5) with main (3131685)

Open in CodSpeed

Footnotes

  1. 7 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@Boshen
Boshen merged commit 5c655c0 into main Sep 24, 2026
8 checks passed
@Boshen
Boshen deleted the fix/serialization-capacity branch September 24, 2026 09:28
@oxc-guard oxc-guard Bot mentioned this pull request Sep 24, 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