Skip to content

Fix warm binary request cache hits - #44

Open
pirate wants to merge 4 commits into
mainfrom
fix/warm-cache-hit-performance
Open

Fix warm binary request cache hits#44
pirate wants to merge 4 commits into
mainfrom
fix/warm-cache-hit-performance

Conversation

@pirate

@pirate pirate commented Aug 30, 2026

Copy link
Copy Markdown
Member

Summary

  • make absolute-path requests reuse the same validated projection as their cached basename record, using identical normalized path identity on read and write
  • validate managed and global pnpm packages against the installed package.json version instead of accepting a desired literal override as observed state
  • verify global package ownership through the real pnpm launcher target before trusting package metadata
  • invalidate stale pnpm records when the cached version differs from the installed package

This fixes the root cache misses behind repeated ArchiveBox plugin installation checks. It does not add skip logic or parallelize the ordered installer.

Root causes

  • request projections were written under basename identities but looked up using absolute request names
  • the read and write sides normalized absolute paths differently
  • literal pnpm version overrides could replace observed package metadata, allowing a stale image dependency to appear current
  • global pnpm records skipped installed-version validation and did not verify package ownership
  • none of these cases had real regression coverage

Verification

  • absolute-path projection tests prove second real BinaryService requests, including a normalized .. path, never enter _load
  • a real pnpm test installs zx 7.2.3 with a conflicting literal 999.0.0 override and pins package.json plus the returned Binary to 7.2.3
  • a real pnpm-style global shell launcher test resolves its package target, ignores unrelated nearer metadata, and validates the owning package without spawning pnpm
  • focused cache regressions: 4 passed
  • changed-file prek hooks, ty, and pyright: passed
  • full related pair before the final ownership tightening: 55 passed, 1 skipped; six macOS /var vs /private/var assertions also fail unchanged on pristine main

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread abxpkg/binprovider_pnpm.py Outdated
Comment thread abxpkg/binprovider.py Outdated
Comment thread tests/test_pnpmprovider.py Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 4 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread abxpkg/binprovider_pnpm.py

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread abxpkg/binprovider_pnpm.py
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