refactor: Migrate --update_inputs flag to --vk_policy option#18237
Merged
johnathan79717 merged 1 commit intomerge-train/barretenbergfrom Nov 7, 2025
Merged
Conversation
Replace the boolean --update_inputs flag with a new --vk_policy=rewrite option to provide more flexibility in handling verification keys. Changes: - Add REWRITE policy to VkPolicy enum - Update CLI to accept 'rewrite' as a valid vk_policy value - Remove update_inputs field from API::Flags - Update check_precomputed_vks to use vk_policy instead of update_inputs - Update tests and scripts to use --vk_policy=rewrite The new --vk_policy=rewrite provides the same functionality as the old --update_inputs flag: when a VK check fails, it rewrites the input file with the correct VK. This change provides better consistency with the existing vk_policy options (default, check, recompute). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ludamad
approved these changes
Nov 6, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 7, 2025
BEGIN_COMMIT_OVERRIDE chore: remove more pg references and leftovers (#18260) refactor: Migrate --update_inputs flag to --vk_policy option (#18237) chore: stdlib byte_array and bool external audit fixes (#17838) chore: update naming in bb_proof_verification lib (#18269) chore: cycle group 13 (#18200) chore: universal handling for coord constancy in cycle_group (#18253) END_COMMIT_OVERRIDE
ludamad
pushed a commit
that referenced
this pull request
Dec 16, 2025
## Summary Replace the boolean `--update_inputs` flag with a new `--vk_policy=rewrite` option to provide more flexibility in handling verification keys. ## Changes - Add `REWRITE` policy to `VkPolicy` enum - Update CLI to accept 'rewrite' as a valid vk_policy value - Remove `update_inputs` field from `API::Flags` - Update `check_precomputed_vks` to use `vk_policy` instead of `update_inputs` - Update tests and scripts to use `--vk_policy=rewrite` ## Behavior The new `--vk_policy=rewrite` provides the same functionality as the old `--update_inputs` flag: when a VK check fails, it rewrites the input file with the correct VK. This change provides better consistency with the existing vk_policy options (default, check, recompute). ## Testing - Unit tests pass (`CheckPrecomputedVks` and `CheckPrecomputedVksMismatch`) - Verified CLI accepts `--vk_policy=rewrite` and rejects old `--update_inputs` flag - Scripts updated to use new flag ## Migration Guide Replace `--update_inputs` with `--vk_policy=rewrite`: **Before:** ```bash bb check --update_inputs --scheme chonk --ivc_inputs_path inputs.msgpack ``` **After:** ```bash bb check --vk_policy=rewrite --scheme chonk --ivc_inputs_path inputs.msgpack ``` Co-authored-by: Claude <noreply@anthropic.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.
Summary
Replace the boolean
--update_inputsflag with a new--vk_policy=rewriteoption to provide more flexibility in handling verification keys.Changes
REWRITEpolicy toVkPolicyenumupdate_inputsfield fromAPI::Flagscheck_precomputed_vksto usevk_policyinstead ofupdate_inputs--vk_policy=rewriteBehavior
The new
--vk_policy=rewriteprovides the same functionality as the old--update_inputsflag: when a VK check fails, it rewrites the input file with the correct VK. This change provides better consistency with the existing vk_policy options (default, check, recompute).Testing
CheckPrecomputedVksandCheckPrecomputedVksMismatch)--vk_policy=rewriteand rejects old--update_inputsflagMigration Guide
Replace
--update_inputswith--vk_policy=rewrite:Before:
After: