chore: Validate envs and secrets during build time#29634
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
None of these changes touch:
These are purely build-time CI validation scripts that run before the app is compiled. They have zero impact on app behavior, user flows, or E2E test execution. No E2E tests need to run to validate these changes — they are validated by their own unit tests ( Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3547f68. Configure here.
| } | ||
|
|
||
| const str = String(value); | ||
| const len = Buffer.byteLength(str, 'utf8'); |
There was a problem hiding this comment.
Offset messages mix character indices with byte lengths
Low Severity
len is computed via Buffer.byteLength(str, 'utf8') (byte count), but crIndex, nulIndex, ctrlMatch.index, and zwMatch.index are JavaScript string character indices. The error messages combine them as offset ${index}/${len}, presenting a character position alongside a byte total. For any non-ASCII content these are different units, making the diagnostic output misleading — e.g., a \r at character index 4 in "café\r" would read offset 4/6 because é is two bytes in UTF-8.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 3547f68. Configure here.
|





Description
This safeguard is a follow up to catch malformed envs and secrets during build time to prevent issues similar to incident 1578. If any issues are detected during build time, the
Build Mobile Appworkflow will fail with a message listing the offending valueChangelog
CHANGELOG entry:
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-564
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Cursor Bugbot is generating a summary for commit 3547f68. Configure here.