Repository navigation
fix(file-parsers): cap untrusted number formats and make time-format check linear - #8893
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Turn on auto-fix | Re-trigger cubic
|
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Turn on auto-fix | Re-trigger cubic
…ad of rescanning them
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Turn on auto-fix | Re-trigger cubic
Summary
isTimeOnlyFormatsliced the format and ran an unanchored/[:\s]+$/once permrun, so classifying a date cell's number format was quadratic in the format's length. The format comes verbatim from the workbook'sstyles.xml(cell.z), so one spreadsheet could make each date cell cost hundreds of ms of synchronous CPU across the parse/preview window (server ingestion and the Files viewer tab)isMinutesRun, a linear walk outward from eachmrun that skips:/whitespace — same classification as beforenormalizeSheetDisplayTextnow treats acell.zlonger than 255 characters (Excel's own custom-format limit) as unformatted, which bounds every scan of the format, includingdateTokensOf's bracket strip and the elapsed-token checkType of Change
Testing
isTimeOnlyFormaton a 50k-char format: 645 ms → <1 ms;normalizeSheetDisplayTextover 20 such cells: 12.7 s → <1 msvitest run lib/file-parsers— 29 files, 298 tests passing; biome cleanChecklist
test-auditauthoring gate)🤖 Generated with Claude Code