Skip to content

fix(cache): raise cache preallocation limit#554

Merged
wan9chi merged 1 commit into
mainfrom
agent/cache-preallocation-limit
Jul 21, 2026
Merged

fix(cache): raise cache preallocation limit#554
wan9chi merged 1 commit into
mainfrom
agent/cache-preallocation-limit

Conversation

@wan9chi

@wan9chi wan9chi commented Jul 21, 2026

Copy link
Copy Markdown
Member

Motivation

Automatically tracked task inputs are serialized as wincode sequences. Large real-world input sets can exceed wincode's default 4 MiB preallocation guard even when the cache payload is valid, causing cache reads and writes to fail.

Changes

  • Give the persistent task-cache codec a 256 MiB preallocation limit.
  • Centralize the cache-specific wincode configuration across cache reads, writes, and listing.
  • Require each SQLite cache BLOB to contain exactly one encoded value.
  • Bump the cache schema directory to v18 so the exact decoder does not open older rows.
  • Keep the default guard for other wincode consumers, including IPC.

Fixes #557

wan9chi commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

@wan9chi
wan9chi force-pushed the agent/cache-preallocation-limit branch 2 times, most recently from c682426 to daa2832 Compare July 21, 2026 05:07
@wan9chi
wan9chi marked this pull request as ready for review July 21, 2026 05:07

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

Copy link
Copy Markdown

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: daa283201d

ℹ️ 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".

Comment thread crates/vite_task/src/session/cache/mod.rs
Co-authored-by: GPT-5.6 Codex <codex@openai.com>
@wan9chi
wan9chi force-pushed the agent/cache-preallocation-limit branch from daa2832 to 5237b13 Compare July 21, 2026 05:10
@wan9chi
wan9chi merged commit 85d4e73 into main Jul 21, 2026
16 checks passed
@wan9chi
wan9chi deleted the agent/cache-preallocation-limit branch July 21, 2026 05:15
wan9chi added a commit to voidzero-dev/vite-plus that referenced this pull request Jul 22, 2026
Bumps the vite-task git-dependency crates (`fspy`, `pty_terminal_test`,
`pty_terminal_test_client`, `snapshot_test`, `vite_path`,
`vite_powershell`, `vite_str`, `vite_task`, `vite_workspace`) from
`4003f65` to `85d4e73`.

## Changelog

All three new entries are internal bug fixes with no user-facing
CLI/config changes, so no docs updates are needed:

- Task cache now supports much larger automatically tracked input sets
without hitting wincode's default 4 MiB sequence preallocation limit
([#554](voidzero-dev/vite-task#554))
- npm workspace patterns beginning with `./` now discover matching
packages correctly
([#547](voidzero-dev/vite-task#547))
- Failures while forwarding output from a started task process no longer
incorrectly report that the process failed to spawn
([#506](voidzero-dev/vite-task#506))

Full diff:
``https://github.com/voidzero-dev/vite-task/compare/4003f65a3e5e3d957ff81b157e85e6ee41cc59fc...85d4e734c64c96c2ce60e734b3e202b5add53696#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed``

## Verification

- `cargo check --workspace` — clean (no breaking changes; the PTY
snapshot runner compiles against the new vite-task crates without
changes)
- `cargo test` across the vite-plus crates (`vite_command`,
`vite_error`, `vite_install`, `vite_js_runtime`, `vite_migration`,
`vite_shared`, `vite_static_config`, `vite-plus-cli`, `vite_global_cli`)
— all pass
- PTY snapshot suite (global flavor): the task-runner/cache output cases
that the bump could affect (`command_run_help`, `command_cache_*`,
`shim_recursive_npm_run`) pass unchanged. The remaining failures in this
sandbox are environmental (missing bootstrapped JS CLI `dist/bin.js`,
and npm-registry TLS blocked by the proxy) and are left to CI, which
bootstraps the CLI and registry bridge.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---
_Generated by [Claude
Code](https://claude.ai/code/session_01LGJPQK1jAPZVtj4eCuWMPm)_

Co-authored-by: Claude <noreply@anthropic.com>
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.

Cache lookup fails above wincode's 4 MiB preallocation limit

1 participant