Repository navigation
fix(install): report a cache content-hash mismatch once per package - #4357
Merged
Daniel Meppiel (danielmeppiel) merged 1 commit intoNov 20, 2026
Merged
Conversation
…4351) The download phase reports the mismatch and records the package; the integrate phase now reports it only for packages the download phase did not, so 'Content hash mismatch ... Re-downloading from the locked source.' prints once. Fixes #4351 Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 14:56
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Download marks a mismatch as reported without a logger or diagnostic collector, causing integration to suppress its fallback and lose the diagnostic entirely.
1 open issue
What changed in this PR
Addresses #4351 by tracking cache content-hash mismatch notices across install phases to avoid duplicate reporting while preserving cache removal and re-download behavior.
Changes:
- Add per-install tracking of packages whose mismatch was reported.
- Record notices during download and suppress matching notices during integration.
| File | Description |
|---|---|
src/apm_cli/install/phases/integrate.py |
Suppress notices already reported during download. |
src/apm_cli/install/phases/download.py |
Record packages when reporting cache mismatches. |
src/apm_cli/install/context.py |
Add shared mismatch-reporting state. |
Review effort: Balanced
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-t1-hash-notice-once
branch
November 20, 2026 15:20
Collaborator
Author
|
Validation update: |
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…4370 Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…4370 Co-authored-by: Copilot App <[email protected]>
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.

Fixes #4351
What
When a cached package's bytes contradict the locked
content_hash, both the download phase (install/phases/download.py,_report_cache_mismatch) and the integrate phase (install/phases/integrate.py) printedContent hash mismatch for <pkg>: expected ..., got .... Re-downloading from the locked source.The download phase is now the single owner. It records the package in
InstallContext.cache_mismatch_reported, and integrate prints the notice only for packages download did not report. Integrate still removes the tampered copy and re-downloads as before; only the duplicate notice is gone.Validation
pytest tests/integration/test_virtual_skill_audit_e2e.py(targeted e2e; result below).