Skip to content

fix(pii): read the PII concurrency settings through envNumber - #10326

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/pii-concurrency-env-number
Nov 23, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/pii-concurrency-env-number

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

createEnv runs with skipValidation, so numeric env values arrive as strings. PII_MASK_CHUNK_CONCURRENCY, PII_REF_CONCURRENCY and PII_SERVICE_CHUNK_CONCURRENCY were passed raw to mapWithConcurrency, whose limit guard (added in #10129) refuses a non-number. When a deployment sets one of them, PII masking throws mapWithConcurrency limit must be a positive integer and redaction fails closed: values are replaced with the redaction-failed marker instead of being masked.

Fix: read all three through envNumber(value, default, { min: 1, integer: true }), like other numeric settings. These were the only raw numeric env reads passed to a concurrency helper.

Tests: one per setting, loading the module with the setting given as a string and running its masking path. All three fail on the current code with the error above and pass with the fix.

The env helper skips validation, so PII_MASK_CHUNK_CONCURRENCY,
PII_REF_CONCURRENCY and PII_SERVICE_CHUNK_CONCURRENCY arrive as strings when
set, and mapWithConcurrency refuses a non-number limit: PII masking failed and
redaction fell back to the failure marker. Read all three through envNumber,
as other numeric settings are.
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 23, 2026 12:52am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Fixes PII masking when deployments set concurrency values as strings.

  • Configured mask limits let app requests reach the masking route.
  • Configured service limits let Presidio mask text in batches.
  • Configured ref limits let execution logs redact stored values.

No actionable issues found. Tests were inspected, not run.

Reviews (1) · Last reviewed commit: "fix(pii): read the PII concurrency setti..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 3da138d into staging Nov 23, 2026
153 of 155 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/pii-concurrency-env-number branch November 23, 2026 02:11

This branch was previously deployed

1 inactive deployment
Preview — f0238321 Deployed Nov 23, 2026 by vercel[bot]
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