Skip to content

Conversation

@archandatta
Copy link
Contributor

@archandatta archandatta commented Jan 28, 2026

Note

Medium Risk
Touches shared zipping logic used by deploy and browser/extension workflows; incorrect exclusion or walker error handling could omit files or break packaging, though most callers pass nil to preserve behavior.

Overview
Adds configurable zip exclusions to util.ZipDirectory via new ZipOptions (directory names + filename glob patterns) and propagates the new signature to existing callers.

Extension uploads now build smaller bundles by default (excluding e.g. node_modules, .git, tests/logs), print the bundle size, and fail fast if the resulting zip exceeds 50MB; deploy/browser extension zipping keeps current behavior by passing nil. Adds util.FormatBytes and new tests covering zip exclusions and unzip behavior.

Written by Cursor Bugbot for commit e0e904b. This will update automatically on new commits. Configure here.

@archandatta archandatta force-pushed the archand/kernel-869/exclude-files-from-extensions branch from a9498e8 to cf9bfed Compare January 28, 2026 13:44
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@archandatta archandatta requested a review from rgarcia January 28, 2026 14:15
Copy link
Contributor

@rgarcia rgarcia left a comment

Choose a reason for hiding this comment

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

thanks for the pr! left some comments on naming, code duplication, and making the util more generic. main concerns are around duplicating the existing ZipDirectory function and making the exclusion options more intuitive.

@archandatta archandatta force-pushed the archand/kernel-869/exclude-files-from-extensions branch from 88b7410 to 27ef5de Compare February 4, 2026 15:02
@archandatta archandatta requested a review from rgarcia February 4, 2026 15:02
Copy link
Contributor

@rgarcia rgarcia left a comment

Choose a reason for hiding this comment

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

looks good — prior feedback well addressed. nice cleanup consolidating into the existing ZipDirectory. couple minor nits.


// Pre-flight size check
if in.Output != "json" {
pterm.Info.Println("Analyzing extension directory...")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: "Analyzing..." is misleading since we go straight to zipping. consider changing to "Compressing extension directory..." and dropping the "Zipping extension directory..." message on line 328 since they'd be redundant.

}

if fileInfo.Size() > MaxExtensionSizeBytes {
pterm.Error.Printf("Extension bundle is too large: %s (max: 50MB)\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: the hardcoded "50MB" here could drift from MaxExtensionSizeBytes — consider using FormatBytes(MaxExtensionSizeBytes) instead.

@archandatta archandatta force-pushed the archand/kernel-869/exclude-files-from-extensions branch from 27ef5de to 0ff03f7 Compare February 10, 2026 17:45
@archandatta archandatta force-pushed the archand/kernel-869/exclude-files-from-extensions branch from 0ff03f7 to e0e904b Compare February 10, 2026 17:45
@archandatta archandatta merged commit 6bf0331 into main Feb 10, 2026
2 checks passed
@archandatta archandatta deleted the archand/kernel-869/exclude-files-from-extensions branch February 10, 2026 18:07
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.

2 participants