Title: fix(pii): mask offloaded large payloads chunk-by-chunk instead of aborting at 16MB by TheodoreSpeaks · Pull Request #5810 · simstudioai/sim · GitHub
Open Graph Title: fix(pii): mask offloaded large payloads chunk-by-chunk instead of aborting at 16MB by TheodoreSpeaks · Pull Request #5810 · simstudioai/sim
X Title: fix(pii): mask offloaded large payloads chunk-by-chunk instead of aborting at 16MB by TheodoreSpeaks · Pull Request #5810 · simstudioai/sim
Description: Summary Block outputs past the 16MB inline materialization ceiling aborted the run before masking even started — the redaction path hydrated the whole offloaded value at once and the pre-flight size assert fired on the manifest's total byteSize Large-array manifests now redact chunk-by-chunk: page one stored chunk at a time, mask, re-store, rebuild via the manifest writer (preview regenerated from masked items, bookkeeping recomputed + asserted). Peak heap stays ~one chunk regardless of payload size Single refs up to the 64MB durable cap hydrate with a raised budget and run serially outside the concurrency pool (one 30MB hydration holds ~2-3x its size in transient heap; 4 at once would OOM the medium-1x trigger.dev machines) Mask-batch chunk requests retry transient failures (network errors, 408/429/5xx honoring Retry-After, runtime-level timeouts, socket closes) with jittered backoff — a single ALB blip or Presidio pod restart no longer fails a whole payload's redaction, and on the execution-altering stages no longer aborts the run Fixed a latent double-mask: a nested ref whose masked value shrinks back under the offload threshold got re-inlined and masked twice (wrong for custom patterns); string pass now runs before ref substitution Sidecar: NER_ENTITIES now intersects the SpacyRecognizer's claimed entities with what the loaded models' NER labels can actually produce. Presidio's default mapping claims PHONE_NUMBER/AGE/ID/EMAIL for transformer backends spaCy can't emit, so any rule naming PHONE_NUMBER silently forced the full spaCy pass and the regex-only fast path never fired Type of Change Bug fix Testing End-to-end against a live stack (local Presidio + S3 + dev DB): a 26.2MB / 40k-record function output that previously aborted instantly now masks in ~3.2min on a single sidecar worker with the realistic entity set (all 265 batches on the regex fast path; ~15min projected on full NER before the sidecar fix). All 40k items verified: order/structure preserved across chunks, emails/cards/SSNs/phones masked, manifest preview regenerated from masked content, skip-vs-full span parity confirmed for phones. Unit suites updated: manifest branch had zero coverage (isLargeArrayManifest was stubbed false) — now covered chunk-wise incl. partial-chunk failure in both failure modes. lint, check:api-validation:strict, and full lib/execution+logs+guardrails suites pass. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA) 🤖 Generated with Claude Code https://claude.ai/code/session_01A1JYstmLHk9qMGyBDqYRcJ
Open Graph Description: Summary Block outputs past the 16MB inline materialization ceiling aborted the run before masking even started — the redaction path hydrated the whole offloaded value at once and the pre-flight si...
X Description: Summary Block outputs past the 16MB inline materialization ceiling aborted the run before masking even started — the redaction path hydrated the whole offloaded value at once and the pre-flight si...
Opengraph URL: https://github.com/simstudioai/sim/pull/5810
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a23158cc-1742-c482-9b32-cdf5fc517a4e |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B2C4:1E946E:320A897:46078F4:6A634CF9 |
| html-safe-nonce | 6386e93f19810965757daf4fca056e8c087a6e71fd67775d3c7620bb8e48be92 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkM0OjFFOTQ2RTozMjBBODk3OjQ2MDc4RjQ6NkE2MzRDRjkiLCJ2aXNpdG9yX2lkIjoiMzM5MjU2NDExMDIwMjk4MTYyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0ee5c3a53e85b7374576aa474083455c0e37ab435b593854a1138883e8048779 |
| hovercard-subject-tag | pull_request:4102584170 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5810/files |
| twitter:image | https://avatars.githubusercontent.com/u/19564703?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/19564703?s=400&v=4 |
| og:image:alt | Summary Block outputs past the 16MB inline materialization ceiling aborted the run before masking even started — the redaction path hydrated the whole offloaded value at once and the pre-flight si... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 59e55daad7174ca59d63c6974d58276ccb5477442e550bebb3c035e1bef11c94 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 990295d92a4cc7b63fbbd83a046217cd7d77d49c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width