perf: content-hash based cache keys for CI compatibility#5
Merged
cmilesio merged 1 commit intoMar 29, 2026
Merged
Conversation
Replace mtime-based cache invalidation with content hashing: - artifact_cache: use SHA-256 of file content instead of ModTime - discovery_cache: use content hash for file matching, add WIRE_DISCOVERY_CACHE_DIR env var - Bump cache versions (artifact v4, discovery v4) This enables wire cache to work correctly in CI environments where file mtimes are not preserved across runs (e.g., S3 cache restore, git checkout). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
|
Hey! Thanks for contributing. Main concern for this would be overhead introduced from doing content based hashing. Ran the benchmarks locally and didn't seem to make a substantial difference to cause any concern. There's a few cache knobs that I think we should unify base env vars on but I'm totally fine with that change as well. I'm glad the new loader changes has made quite a bit of difference for you. I imagine this was on some pubg services? |
cmilesio
approved these changes
Mar 29, 2026
zzzz465
added a commit
to zzzz465/wire
that referenced
this pull request
Apr 2, 2026
Replace mtime-based cache invalidation with content hashing: - artifact_cache: use SHA-256 of file content instead of ModTime - discovery_cache: use content hash for file matching, add WIRE_DISCOVERY_CACHE_DIR env var - Bump cache versions (artifact v4, discovery v4) This enables wire cache to work correctly in CI environments where file mtimes are not preserved across runs (e.g., S3 cache restore, git checkout). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cmilesio
added a commit
that referenced
this pull request
Apr 28, 2026
* feat: incremental loading * feat(incremental): reuse unchanged local packages in fast path and harden fallback behavior * perf(incremental): trim cold bootstrap work and keep warm shape changes fast * perf(incremental): load deps conditionally * chore(incremental): clear session cache * fix(cli): improve wire error coloring and solve error labeling * feat(incremental): harden loader and scenario tooling * feat: custom loader initial * feat: external loader caching * chore: remove local caching strat * feat: local caching from wire perspective * feat: go dep cache * feat(loader): cache unchanged root output * chore: bench tweaks * chore: re-implement cache * fix: provider discovery * chore: benchmark update * fix: ci * fix: ci * fix: windows tmpdir issue * fix: windows bench executable path * fix(loader): strengthen artifact keys for replaced external modules * test(loader): harden cache invalidation and discovery parity coverage * fix(loader): treat replaced workspace deps as local and harden runtests * fix(loader): make cache-hardening tests and runtests portable * fix(loader): use valid file GOPROXY URLs in proxy-based tests * fix(loader): format file GOPROXY URLs correctly on windows * fix(loader): normalize test path comparisons across platforms * refactor: remove unused loader and wire helpers * refactor: dedupe command and custom loader helpers * refactor: make loader artifact policy explicit * refactor: dedupe custom loader import linking * refactor: share import target resolution in custom loader * refactor: centralize types info setup in custom loader * refactor: share parse error conversion in custom loader * refactor: share source parsing in custom loader * refactor: centralize semantic artifact cache inputs * refactor: isolate semantic artifact cache io * refactor: isolate semantic provider set artifact lookup * refactor: extract semantic provider set item application * refactor: share semantic struct field helpers * refactor: share semantic package object lookup * refactor: share semantic output type assembly * refactor: share struct provider shell assembly * refactor: share allowed struct field inputs * refactor: share selected struct field inputs * refactor: share field output assembly for FieldsOf * refactor: share quoted struct field lookup * refactor: share semantic pointer expansion * refactor: reuse field parent struct resolution * refactor: share field object assembly * refactor: share named struct type resolution * refactor: share semantic type name lookup * refactor: share semantic package member lookup * refactor: share semantic error wrapping * refactor: share provider set finalization * refactor: add isolated output cache gate * refactor: make provider set fallback policy explicit * refactor: share custom loader root loading path * refactor: share custom loader metadata root graph * refactor: isolate semantic provider set support rule * refactor: fold back weak cleanup abstractions * refactor: narrow loader semantic artifact coupling * refactor: unify semantic provider set support rules * fix: restore local loader artifact safety gate * refactor: disable semantic reconstruction by default * refactor: remove semantic reconstruction path * refactor: remove semantic cache layer * refactor: add import benchmark profile filter * refactor: trim redundant discovery cache metadata * refactor: remove redundant discovery cache cloning * refactor: split external benchmark profiles * refactor: share custom typed load pipeline * refactor: centralize custom metadata loading * refactor: share loader fallback reason policy * refactor: add targeted local profile benchmark * refactor: add one-shot import profile harness * perf: reuse root discovery for generate loads * style: format loader discovery changes * perf: content-hash based cache keys for CI compatibility (#5) Replace mtime-based cache invalidation with content hashing: - artifact_cache: use SHA-256 of file content instead of ModTime - discovery_cache: use content hash for file matching, add WIRE_DISCOVERY_CACHE_DIR env var - Bump cache versions (artifact v4, discovery v4) This enables wire cache to work correctly in CI environments where file mtimes are not preserved across runs (e.g., S3 cache restore, git checkout). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor: share wire cache base directory * docs: add readme in internal for future travelers * feat: support method expression providers (#6) * feat(caching): content based caching to discovery, loader, output --------- Co-authored-by: jungooji <zzzz465@naver.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cmilesio
pushed a commit
that referenced
this pull request
Apr 28, 2026
* feat: incremental loading * feat(incremental): reuse unchanged local packages in fast path and harden fallback behavior * perf(incremental): trim cold bootstrap work and keep warm shape changes fast * perf(incremental): load deps conditionally * chore(incremental): clear session cache * fix(cli): improve wire error coloring and solve error labeling * feat(incremental): harden loader and scenario tooling * feat: custom loader initial * feat: external loader caching * chore: remove local caching strat * feat: local caching from wire perspective * feat: go dep cache * feat(loader): cache unchanged root output * chore: bench tweaks * chore: re-implement cache * fix: provider discovery * chore: benchmark update * fix: ci * fix: ci * fix: windows tmpdir issue * fix: windows bench executable path * fix(loader): strengthen artifact keys for replaced external modules * test(loader): harden cache invalidation and discovery parity coverage * fix(loader): treat replaced workspace deps as local and harden runtests * fix(loader): make cache-hardening tests and runtests portable * fix(loader): use valid file GOPROXY URLs in proxy-based tests * fix(loader): format file GOPROXY URLs correctly on windows * fix(loader): normalize test path comparisons across platforms * refactor: remove unused loader and wire helpers * refactor: dedupe command and custom loader helpers * refactor: make loader artifact policy explicit * refactor: dedupe custom loader import linking * refactor: share import target resolution in custom loader * refactor: centralize types info setup in custom loader * refactor: share parse error conversion in custom loader * refactor: share source parsing in custom loader * refactor: centralize semantic artifact cache inputs * refactor: isolate semantic artifact cache io * refactor: isolate semantic provider set artifact lookup * refactor: extract semantic provider set item application * refactor: share semantic struct field helpers * refactor: share semantic package object lookup * refactor: share semantic output type assembly * refactor: share struct provider shell assembly * refactor: share allowed struct field inputs * refactor: share selected struct field inputs * refactor: share field output assembly for FieldsOf * refactor: share quoted struct field lookup * refactor: share semantic pointer expansion * refactor: reuse field parent struct resolution * refactor: share field object assembly * refactor: share named struct type resolution * refactor: share semantic type name lookup * refactor: share semantic package member lookup * refactor: share semantic error wrapping * refactor: share provider set finalization * refactor: add isolated output cache gate * refactor: make provider set fallback policy explicit * refactor: share custom loader root loading path * refactor: share custom loader metadata root graph * refactor: isolate semantic provider set support rule * refactor: fold back weak cleanup abstractions * refactor: narrow loader semantic artifact coupling * refactor: unify semantic provider set support rules * fix: restore local loader artifact safety gate * refactor: disable semantic reconstruction by default * refactor: remove semantic reconstruction path * refactor: remove semantic cache layer * refactor: add import benchmark profile filter * refactor: trim redundant discovery cache metadata * refactor: remove redundant discovery cache cloning * refactor: split external benchmark profiles * refactor: share custom typed load pipeline * refactor: centralize custom metadata loading * refactor: share loader fallback reason policy * refactor: add targeted local profile benchmark * refactor: add one-shot import profile harness * perf: reuse root discovery for generate loads * style: format loader discovery changes * perf: content-hash based cache keys for CI compatibility (#5) Replace mtime-based cache invalidation with content hashing: - artifact_cache: use SHA-256 of file content instead of ModTime - discovery_cache: use content hash for file matching, add WIRE_DISCOVERY_CACHE_DIR env var - Bump cache versions (artifact v4, discovery v4) This enables wire cache to work correctly in CI environments where file mtimes are not preserved across runs (e.g., S3 cache restore, git checkout). * refactor: share wire cache base directory * docs: add readme in internal for future travelers * feat: support method expression providers (#6) * feat(caching): content based caching to discovery, loader, output --------- Co-authored-by: jungooji <zzzz465@naver.com>
cmilesio
added a commit
that referenced
this pull request
Apr 28, 2026
* feat: incremental loading * feat(incremental): reuse unchanged local packages in fast path and harden fallback behavior * perf(incremental): trim cold bootstrap work and keep warm shape changes fast * perf(incremental): load deps conditionally * chore(incremental): clear session cache * fix(cli): improve wire error coloring and solve error labeling * feat(incremental): harden loader and scenario tooling * feat: custom loader initial * feat: external loader caching * chore: remove local caching strat * feat: local caching from wire perspective * feat: go dep cache * feat(loader): cache unchanged root output * chore: bench tweaks * chore: re-implement cache * fix: provider discovery * chore: benchmark update * fix: ci * fix: ci * fix: windows tmpdir issue * fix: windows bench executable path * fix(loader): strengthen artifact keys for replaced external modules * test(loader): harden cache invalidation and discovery parity coverage * fix(loader): treat replaced workspace deps as local and harden runtests * fix(loader): make cache-hardening tests and runtests portable * fix(loader): use valid file GOPROXY URLs in proxy-based tests * fix(loader): format file GOPROXY URLs correctly on windows * fix(loader): normalize test path comparisons across platforms * refactor: remove unused loader and wire helpers * refactor: dedupe command and custom loader helpers * refactor: make loader artifact policy explicit * refactor: dedupe custom loader import linking * refactor: share import target resolution in custom loader * refactor: centralize types info setup in custom loader * refactor: share parse error conversion in custom loader * refactor: share source parsing in custom loader * refactor: centralize semantic artifact cache inputs * refactor: isolate semantic artifact cache io * refactor: isolate semantic provider set artifact lookup * refactor: extract semantic provider set item application * refactor: share semantic struct field helpers * refactor: share semantic package object lookup * refactor: share semantic output type assembly * refactor: share struct provider shell assembly * refactor: share allowed struct field inputs * refactor: share selected struct field inputs * refactor: share field output assembly for FieldsOf * refactor: share quoted struct field lookup * refactor: share semantic pointer expansion * refactor: reuse field parent struct resolution * refactor: share field object assembly * refactor: share named struct type resolution * refactor: share semantic type name lookup * refactor: share semantic package member lookup * refactor: share semantic error wrapping * refactor: share provider set finalization * refactor: add isolated output cache gate * refactor: make provider set fallback policy explicit * refactor: share custom loader root loading path * refactor: share custom loader metadata root graph * refactor: isolate semantic provider set support rule * refactor: fold back weak cleanup abstractions * refactor: narrow loader semantic artifact coupling * refactor: unify semantic provider set support rules * fix: restore local loader artifact safety gate * refactor: disable semantic reconstruction by default * refactor: remove semantic reconstruction path * refactor: remove semantic cache layer * refactor: add import benchmark profile filter * refactor: trim redundant discovery cache metadata * refactor: remove redundant discovery cache cloning * refactor: split external benchmark profiles * refactor: share custom typed load pipeline * refactor: centralize custom metadata loading * refactor: share loader fallback reason policy * refactor: add targeted local profile benchmark * refactor: add one-shot import profile harness * perf: reuse root discovery for generate loads * style: format loader discovery changes * perf: content-hash based cache keys for CI compatibility (#5) Replace mtime-based cache invalidation with content hashing: - artifact_cache: use SHA-256 of file content instead of ModTime - discovery_cache: use content hash for file matching, add WIRE_DISCOVERY_CACHE_DIR env var - Bump cache versions (artifact v4, discovery v4) This enables wire cache to work correctly in CI environments where file mtimes are not preserved across runs (e.g., S3 cache restore, git checkout). * refactor: share wire cache base directory * docs: add readme in internal for future travelers * feat: support method expression providers (#6) * feat(caching): content based caching to discovery, loader, output --------- Co-authored-by: jungooji <zzzz465@naver.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace mtime-based cache invalidation with content hashing:
This enables wire cache to work correctly in CI environments where file mtimes are not preserved across runs (e.g., S3 cache restore, git checkout).