Skip to content

fix: speed up runpack verify zip checks#107

Merged
RyshMan merged 2 commits intomainfrom
codex/release-fix-verifyzip-perf
Mar 20, 2026
Merged

fix: speed up runpack verify zip checks#107
RyshMan merged 2 commits intomainfrom
codex/release-fix-verifyzip-perf

Conversation

@RyshMan
Copy link
Copy Markdown
Contributor

@RyshMan RyshMan commented Mar 20, 2026

Problem

  • release preflight was blocked by make bench-check
  • BenchmarkVerifyZipTypical regressed beyond the allowed release threshold

Root cause

  • VerifyZip paid repeated filesystem zip access costs for small runpacks
  • file hashing also allocated a fresh copy buffer on each verification pass

Fix

  • add a small-runpack in-memory zip fast path for verification
  • reuse a pooled copy buffer during zip entry hashing
  • scope the small-file fast path through os.Root APIs so the optimization remains fail-closed under security linting

Validation

  • go test ./core/runpack
  • go test ./core/runpack -run '^$' -bench '^BenchmarkVerifyZipTypical$' -benchmem -count=5
  • make prepush-full

@RyshMan RyshMan requested a review from davidahmann as a code owner March 20, 2026 04:29
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1e34c5e83f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@RyshMan RyshMan merged commit 7a157d0 into main Mar 20, 2026
9 checks passed
@RyshMan RyshMan deleted the codex/release-fix-verifyzip-perf branch March 20, 2026 04:48
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