Skip to content

Set default IncludeDesc fingerprint to zeros - #450

Merged
prozacchiwawa merged 3 commits into
20260216-freeze-early-cachefrom
IncludeDesc-default-fingerprint-zeros
Apr 21, 2026
Merged

prozacchiwawa merged 3 commits into
20260216-freeze-early-cachefrom
IncludeDesc-default-fingerprint-zeros

Conversation

@aqk

@aqk aqk commented Apr 20, 2026 •

Copy link
Copy Markdown
Contributor

Use an array of zero bytes instead of nil to represent "no fingerprint".
Doing this allows concatenation of an ordered set of signatures to uniquely represent that set.


Note

Medium Risk
Changes how include fingerprints are represented and concatenated into the on-disk cache key, which can affect cache hit/miss behavior across builds. Low functional risk beyond caching, but any mismatch in fingerprint population could cause incorrect reuse or unnecessary recompiles.

Overview
Normalizes include fingerprinting for caching. IncludeDesc.fingerprint is changed from a variable-length Vec<u8> to a fixed [u8; 32], with unknown fingerprints represented as 32 zero bytes.

Fingerprint calculation paths now explicitly try_into() the 32-byte tree hash, and the disk cache key builder concatenates fingerprints via extend_from_slice, ensuring deterministic key material even when some includes previously had “no fingerprint”.

Reviewed by Cursor Bugbot for commit 22924f4. Bugbot is set up for automated code reviews on this repo. Configure here.

@socket-security

socket-security Bot commented Apr 20, 2026 •

Copy link
Copy Markdown

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 483a9ee. Configure here.

Comment thread src/compiler/compiler.rs
@aqk
aqk changed the base branch from main to 20260216-freeze-early-cache April 21, 2026 00:03
@aqk

aqk commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

@SocketSecurity ignore cargo/zerocopy-derive@0.8.39
@SocketSecurity ignore cargo/cc@1.2.55

@prozacchiwawa
prozacchiwawa merged commit 5927198 into 20260216-freeze-early-cache Apr 21, 2026
35 checks passed
@prozacchiwawa
prozacchiwawa deleted the IncludeDesc-default-fingerprint-zeros branch April 21, 2026 01:31
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.

2 participants