Skip to content

chore(deps): bump gitsheets to 1.4.1 (TOML parser memory fix, #132)#145

Merged
themightychris merged 1 commit into
developfrom
chore/bump-gitsheets-1.4.1
Jun 28, 2026
Merged

chore(deps): bump gitsheets to 1.4.1 (TOML parser memory fix, #132)#145
themightychris merged 1 commit into
developfrom
chore/bump-gitsheets-1.4.1

Conversation

@themightychris

Copy link
Copy Markdown
Member

Bumps gitsheets to 1.4.1, which switches the TOML record parser from @iarna/toml to smol-toml (JarvusInnovations/gitsheets#197). This is the root-cause fix for #132.

Why

@iarna/toml's parser emits string field values as V8 sliced/cons-strings that pin large parser buffers — each parsed record retained ~12× its source size. With the 31.8k-record published import, that meant >500 MB of heap for ~25 MB of TOML. smol-toml produces flat strings; the leak is gone at the source. (Serialization stays on @iarna upstream, so the on-disk format is unchanged.)

Measured end-to-end

Against the full published import via our actual boot path:

Metric before after
Retained heap 581 MB 88 MB 6.6×
Transient boot peak 532 MB 71 MB 7.5×
Total heapUsed 609 MB 116 MB 5.3×
RSS 806 MB 292 MB 2.8×

Fixes both the retained footprint and the transient boot spike.

Validation

  • type-check + lint clean
  • api 412/412, web/shared unaffected
  • gitsheets 1.4.1 verified lossless on a 4,310-record corpus; TOML dates still instanceof Date

Closes

Resolves the root cause of #132.

Follow-up (separate PR)

Now that boot heap is ~88 MB retained / ~71 MB peak, walk NODE_OPTIONS=--max-old-space-size and the container memory limit back down toward node-safe values with large margin (they were raised to 3072 MB / 3.5 Gi during the original incident). That reclaims the headroom and lets the pod fit comfortably on the ~3.9 Gi nodes — to be done with its own deploy validation.

🤖 Generated with Claude Code

Command:
  npm install gitsheets@^1.4.1 -w apps/api

Picks up gitsheets 1.4.1, which switches the TOML record parser from
@iarna/toml to smol-toml (JarvusInnovations/gitsheets#197). This fixes
the #132 boot-heap blowup at its root: @iarna's parser pinned ~12x each
record's source in V8 sliced/cons-strings.

Measured end-to-end against the full `published` import via the boot
path:
  retained heap     581 MB -> 88 MB  (6.6x)
  transient peak    532 MB -> 71 MB  (7.5x)
  rss               806 MB -> 292 MB

type-check + lint clean; api 412/412 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@themightychris themightychris merged commit e97728c into develop Jun 28, 2026
1 check passed
@themightychris themightychris deleted the chore/bump-gitsheets-1.4.1 branch June 28, 2026 19:27
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