Skip to content

fix(nargo): include validation policy in artifact cache reuse - #13389

Open
1sgtpepper wants to merge 1 commit into
noir-lang:masterfrom
1sgtpepper:fix-cache-validation-policy
Open

fix(nargo): include validation policy in artifact cache reuse#13389
1sgtpepper wants to merge 1 commit into
noir-lang:masterfrom
1sgtpepper:fix-cache-validation-policy

Conversation

@1sgtpepper

@1sgtpepper 1sgtpepper commented Jul 22, 2026

Copy link
Copy Markdown

Problem Resolved

Resolves #12843

Summary of Changes

Prevents a compile from reusing a program artifact produced with incompatible compilation or validation options. The existing artifact hash now covers the monomorphized program and every option that can affect the persisted artifact or cached diagnostics.

This keeps the fix inside the cache owner and adds no artifact field or serialization surface; artifacts carrying the old source-only hash naturally miss once and are rebuilt. Diagnostic-only modes that need fresh output force compilation without becoming persistent identity. End-to-end nargo compile regressions prove that default validation is rerun after both checks were skipped and that cached compilation warnings are reevaluated when warning policy changes.

User Documentation

Check one:

  • No user documentation needed.
  • Documented in docs/.
  • [For Experimental Features] Documentation tracking issue created:

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Validation:

  • cargo test -p noirc_artifacts --lib
  • cargo test -p noirc_driver --lib
  • cargo test -p nargo_cli --test compile_cache
  • cargo check -p nargo
  • cargo clippy -p noirc_driver -p noirc_artifacts --lib -- -D warnings
  • cargo clippy -p nargo_cli --test compile_cache -- -D warnings
  • cargo fmt --check

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution to the Noir language.

Please do not force push to this branch after the Noir team have started review of this PR. Doing so will only delay us merging your PR as we will need to start the review process from scratch.

Thanks for your understanding.

@1sgtpepper
1sgtpepper force-pushed the fix-cache-validation-policy branch from b1e916b to 642a2fd Compare July 22, 2026 13:08
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.

Artifact cache ignores validation policy for skipped Brillig/underconstrained checks

1 participant