Repository navigation
Kani harnesses for manifest-to-IR safety checks (4.2.1) - #336
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
OverviewThis pull request introduces Kani-based formal verification harnesses for manifest-to-IR safety checks, fulfilling roadmap item 4.2.1. The implementation includes an approval-gated execution plan, architectural decision record, six Kani harnesses, supporting infrastructure, and code health refactorings. Key DocumentsExecution Plan ( ADR-004 ( Verification HarnessesManifest-to-IR harnesses ( Cycle-detection harnesses ( Core ImplementationSupport infrastructure: New Kani-specific abstractions: New Cycle-detection refactoring: Public Configuration and BuildCargo.toml: Added Makefile: New Tests: New UI/compile-time tests ( Code Health RefactoringsBumpy Road reduction in Deduplication: Replaced duplicated String-argument biomarker mitigation from CodeScene review: deferred type conversions to error construction boundaries (replacing DocumentationDevelopers' guide ( Design diagram updates ( Mutation EvidenceSix patch files under Minor Changes
WalkthroughThis pull request establishes Kani bounded verification for IR safety properties. It introduces cfg(kani) build policy with compile-time contract tests, defines IrHashMap as abstraction over HashMap and a bounded array-backed map, refactors manifest-to-IR and cycle-detection logic into support modules, implements nine verification harnesses across both domains with mutation evidence, and documents verification strategy via ADR-004 and ExecPlan 4-2-1. ChangesKani IR Safety Harnesses and Refactored Verification Infrastructure
Possibly related PRs
Suggested reviewers
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
Reviewer's GuideAdds Kani verification scaffolding and initial IR harnesses for manifest-to-IR safety checks, refactors IR error construction to be more testable under Kani, documents the harness strategy and bounds (including ADR-004), and wires project metadata and Make targets to support Kani while keeping the public IR API unchanged. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response. Comment on file .with_arg("outputs", format!("{dups:?}")),
outputs: dups,
});
if let Some(error) = duplicate_output_error(&outputs, targets) {❌ New issue: String Heavy Function Arguments |
This comment was marked as resolved.
This comment was marked as resolved.
|
@coderabbitai Has this now been resolved in the latest commit? Use codegraph analysis to determine your answer. If this comment is now resolved, please mark it as such using the API. Otherwise, please provide an AI agent prompt for the remaining work to be done to address this comment. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
@coderabbitai resume |
This comment was marked as resolved.
This comment was marked as resolved.
Draft an approval-gated execution plan for roadmap item `4.2.1`. The plan adds bounded Kani harnesses for the four manifest-to-IR safety properties named in the roadmap (duplicate-output rejection, rule-error selection, self-edge and small bounded multi-node cycle rejection, and missing-dependencies-do-not-create-false-cycles), placing them as `#[cfg(kani)] mod verification` blocks inside the production modules they verify. The plan reconciles the roadmap's "up to 10 nodes, depth limit 20 edges" target with Kani's current cost on real `HashMap` types by bounding harnesses to 1-3 nodes and treating the Proptest layer scheduled under `4.3.1` as the closing commitment for the larger-N property. That reconciliation is the chief approval-gated decision and will be recorded in a new ADR-004 alongside two alternatives that were considered (harnessing narrow leaf functions, and a verification-only collection port). The draft was stress-tested with a Logisphere community-of-experts review and revised: Stage B switches the scaffold harness from `kani::assert(false)` to a trivially true assertion plus a `cargo kani --list` discovery check; `ActionHasher::hash` stubbing is reframed as a contract decision rather than a budget tweak; tiered `make kani-ir`/`make kani-full` targets are introduced pre-emptively; mutation evidence is stored as literal patch files under `docs/verification/mutations/`; rule-error harnesses collapse into one parameterised symbolic harness; and the hexagonal-architecture skill is retained only as a boundary-policing tool. The plan remains in `DRAFT` and must be approved before implementation begins.
Mark the ExecPlan as implementing and record the Stage A approval decision from the user instruction. Capture the accepted defaults for bounds, harness budget, Kani unwind, review cadence, and mutation storage.
Add the initial `cfg(kani)` verification modules for manifest-to-IR and cycle-detection proofs, with scaffold harnesses discoverable by Kani. Declare the Kani metadata and checked `cfg(kani)` lint, and add the `kani-ir` alias for the IR verification suite. Record Stage B validation in the ExecPlan, including the local Kani library-path workaround. Consume the impossible formatting error in hex encoding so Kani compilation stays warning-free without weakening Clippy.
Extract the duplicated insertion-sort loops for strings and paths into a single private helper. Keep the Kani `sort_paths` no-op and the public IR surface unchanged.
Extract a private helper for the missing-dependency Kani harness assertions while keeping the direct and transitive graph shapes as separate proofs. Keep the assertion message literal inside the helper because Kani 0.67 ICEs when a helper parameter is passed through to `kani::assert`.
Apply the repository formatter output for the Kani cycle helper and normalise the active execplan wrapping so the formatting and Markdown gates pass together.
Split rotation-start discovery and canonical cycle construction out of `canonicalize_cycle` so cycle normalisation stays flatter while preserving the existing output shape.
|
@coderabbitai resume |
✅ Action performedReviews resumed. |
Route `IrHashMap::key_at` through `entry_at` so the index lookup logic has a single implementation while preserving the existing public method signatures.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response. Excess Number of Function Argumentssrc/ir/cycle.rs: CycleDetector.visit_known_edge What lead to degradation?CycleDetector.visit_known_edge has 5 arguments, max arguments = 4 Why does this problem occur?Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments. How to fix it?Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring INTRODUCE PARAMETER OBJECT to encapsulate arguments that refer to the same logical concept. |
This comment was marked as resolved.
This comment was marked as resolved.
Replace the split dependency-slice arguments to `visit_known_edge` with a borrowed `BuildEdge` so the helper keeps the target-map lifetime contract while carrying one fewer explicit parameter.
|
@coderabbitai review |
✅ Action performedReview finished.
|
Add /// summaries for the private functions flagged in PR #336: process_targets, process_defaults, and detect_cycles in from_manifest.rs, the registration, error/message construction, and Kani-friendliness helpers in from_manifest_support.rs, and the symbolic-name generators in from_manifest_verification.rs. The sort and comparison utilities leave from_manifest_support.rs for a sibling sort_utils module, keeping both files within the 400-line module cap enforced by Whitaker while leaving the Kani cfg-gated variants verifiable in place. Co-Authored-By: Claude <noreply@anthropic.com>
Add /// summaries for the private functions flagged in PR #336: process_targets, process_defaults, and detect_cycles in from_manifest.rs, the registration, error/message construction, and Kani-friendliness helpers in from_manifest_support.rs, and the symbolic-name generators in from_manifest_verification.rs. The sort and comparison utilities leave from_manifest_support.rs for a sibling sort_utils module, keeping both files within the 400-line module cap enforced by Whitaker while leaving the Kani cfg-gated variants verifiable in place. Co-Authored-By: Claude <noreply@anthropic.com>
Add /// summaries for the private functions flagged in PR #336: process_targets, process_defaults, and detect_cycles in from_manifest.rs, the registration, error/message construction, and Kani-friendliness helpers in from_manifest_support.rs, and the symbolic-name generators in from_manifest_verification.rs. The sort and comparison utilities leave from_manifest_support.rs for a sibling sort_utils module, keeping both files within the 400-line module cap enforced by Whitaker while leaving the Kani cfg-gated variants verifiable in place. Co-Authored-By: Claude <noreply@anthropic.com>
Add /// summaries for the private functions flagged in PR #336: process_targets, process_defaults, and detect_cycles in from_manifest.rs, the registration, error/message construction, and Kani-friendliness helpers in from_manifest_support.rs, and the symbolic-name generators in from_manifest_verification.rs. The sort and comparison utilities leave from_manifest_support.rs for a sibling sort_utils module, keeping both files within the 400-line module cap enforced by Whitaker while leaving the Kani cfg-gated variants verifiable in place. Co-Authored-By: Claude <noreply@anthropic.com>
* Add make doc-coverage gate for the 80% commentary bar Rustdoc's --show-coverage counts only what rustdoc renders, so the existing missing_docs deny cannot see private helpers or the bin surface. Add a Python script that runs cargo rustdoc --show-coverage across every workspace lib and bin target, counting private items, sums the documented share, and fails below an 80% threshold. Wire the gate through a Makefile target with overridable threshold and toolchain variables, run it after make lint in CI, and record the policy in AGENTS.md (CRUSH.md follows as a symlink): both public and private functions carry /// docs, trait-impl methods and cfg(test) items are exempt because rustdoc does not count them, and further exemptions must be last resort, tightly scoped, and justified. Co-Authored-By: Claude <noreply@anthropic.com> * Document manifest-to-IR lowering helpers Add /// summaries for the private functions flagged in PR #336: process_targets, process_defaults, and detect_cycles in from_manifest.rs, the registration, error/message construction, and Kani-friendliness helpers in from_manifest_support.rs, and the symbolic-name generators in from_manifest_verification.rs. The sort and comparison utilities leave from_manifest_support.rs for a sibling sort_utils module, keeping both files within the 400-line module cap enforced by Whitaker while leaving the Kani cfg-gated variants verifiable in place. Co-Authored-By: Claude <noreply@anthropic.com> * Document result_json private structs Add /// docs to ResultDocument, CommandResult, and their fields, which the doc-coverage metric counts alongside functions. Co-Authored-By: Claude <noreply@anthropic.com> * Correct the coverage metric's trait-impl claims An empirical probe showed rustdoc's --show-coverage counts inherent impl-block methods like any other item; only trait-implementation overrides (Display::fmt and friends) are excluded. Fix the metric's module docstring and the AGENTS.md exemption language to match. Co-Authored-By: Claude <noreply@anthropic.com> * Split diagnostic JSON helpers into a support module Move span extraction, cause collection, and the fallback payload out of diagnostic_json.rs so the schema document stays within the 400-line module cap and the private helpers gain /// docs. Co-Authored-By: Claude <noreply@anthropic.com> * Split status indicatif reporter into a sibling module Move IndicatifReporter, IndicatifState, and the string-rendering helpers out of status.rs so the module stays within the 400-line cap and each helper gains a /// doc comment. The reporter remains public through a re-export, and the tests keep white-box access to the progress state via crate-visible fields. Co-Authored-By: Claude <noreply@anthropic.com> * Split stdlib time rendering into a format module Move the ISO-8601 offset/duration renderers and the timestamp and duration value objects into time/format.rs, keeping time/mod.rs within the 400-line module cap and documenting the previously bare helpers. Co-Authored-By: Claude <noreply@anthropic.com> * Inline the RUSTFLAGS contract cases into the cases array Replace the ten constructor helpers with inline struct literals so the contract module stays under the 400-line module cap after the doc-coverage case joined the registry. Co-Authored-By: Claude <noreply@anthropic.com> * Split command error details into a support module Move ExitDetails, LimitExceeded, and the message-append helpers out of error.rs, keeping the module within the 400-line cap while documenting the failure-rendering constructors. Co-Authored-By: Claude <noreply@anthropic.com> * Split the cycle detector into a sibling module Move the CycleDetector traversal and its visit-state enums into cycle_detector.rs, keeping cycle.rs within the 400-line module cap and documenting the previously bare variants, fields, and methods. Co-Authored-By: Claude <noreply@anthropic.com> * Document top-level helper modules Add /// docs to the status timing, localisation, output, clock, and startup helper modules, covering struct fields, enum variants, consts, and private functions that the coverage metric counts. No behaviour changes. Co-Authored-By: Claude <noreply@anthropic.com> * Document CLI configuration and graph rendering helpers Add /// docs across the cli config, parser, merge, discovery-trace, and help modules, and across the graph_view DOT and HTML renderers, so the privated helpers and struct fields satisfy the coverage metric. Co-Authored-By: Claude <noreply@anthropic.com> * Document stdlib command, config, and which helpers Add /// docs over minijinja standard-library modules: the command execution and error paths, the which resolver and cache, network fetch, path utilities, collections, and the config surface. Co-Authored-By: Claude <noreply@anthropic.com> * Document runner and process helpers Add /// docs over the runner dispatch, help, graph, dyndep, and process modules, including the streaming readers, failure attribution, and retention logic. Co-Authored-By: Claude <noreply@anthropic.com> * Document manifest, IR, and AST helpers Add /// docs over manifest parsing, glob validation, and template expansion, plus the IR interpolation and cycle-support helpers. Co-Authored-By: Claude <noreply@anthropic.com> * Document test_support and build_l10n_audit helpers Add /// docs across the test-support crate's fixtures and helpers and the build script's l10n audit scanners. Co-Authored-By: Claude <noreply@anthropic.com> * Document the command-list entry renderer and its scanner Add /// docs for the shell-word evaluator, exec boundary classifier, eval background-job counting, and the shell scan state fields and const methods. Co-Authored-By: Claude <noreply@anthropic.com> * Document ninja generation, render, and remaining helpers Finish the sweep with the ninja_gen writer and dyndep bundle modules, the manifest render helpers, the binary entry-point helpers, and the remaining test_support env-lock items. Co-Authored-By: Claude <noreply@anthropic.com> * Consolidate command-list entry doc wording Adopt the mop-up pass's reworded summaries for command_evaluator and the exec-boundary classifier, avoiding the duplicated prose left by overlapping edits. Co-Authored-By: Claude <noreply@anthropic.com> * Fix the cfg(kani) cycle-module build Restore the Utf8Path name the verification harness reaches through super::*, and gate the CycleSearch/CycleVisitResult re-imports on test builds only so the Kani build neither lacks them nor warns about them. Co-Authored-By: Claude <noreply@anthropic.com> * Flatten the doc-coverage target derivation Extract a doc_able_targets helper so doc_targets reads as a single comprehension, reducing the nesting CodeScene's Bumpy Road Ahead rule flagged on the new script. Co-Authored-By: Claude <noreply@anthropic.com> * Backtick code identifiers flagged by clippy doc-markdown Wrap `MiniJinja` and `not_found` in backticks in the new doc comments so the workspace clippy gate stays warning-free. Co-Authored-By: Claude <noreply@anthropic.com> * Place doc comments before outer attributes on methods The Rust 2024 function_attrs_follow_docs deny requires doc comments to precede #[must_use], #[expect], and #[cfg] attributes on methods. Move the five doc comments the sweep placed below attributes so the Whitaker lint gate stays warning-free. Co-Authored-By: Claude <noreply@anthropic.com> * Address CodeRabbit review findings - Validate the doc-coverage threshold, rejecting NaN and out-of-range values, and route toolchain-file, metadata, and JSON failures through the stable error path instead of letting them escape main(). - Adopt the documented en-GB-oxendict -ize spelling in the new doc comments instead of -ise. - Keep the section heading and the guideline list in AGENTS.md well-scoped, document the doc-coverage toolchain override there, and describe the gate in docs/developers-guide.md. - Narrow the disallowed-methods expectation to each environment read and tighten two doc comments that overstated their scope. Co-Authored-By: Claude <noreply@anthropic.com> * Start test-support doc summaries with imperatives Begin each changed function summary with an imperative verb (Return, Generate) so the summaries match the documented doc-comment style. Co-Authored-By: Claude <noreply@anthropic.com> * Address the review sweep's doc and correctness findings - Make the sort_utils evaluation rule explicit with a #[path] attribute and privatise the module-local diagnostic helpers. - Track open-brace positions with a stack so an unmatched `{` nested under a closed pair reports its own byte, with a regression test for the `{{}` case. - Correct record_missing_dependency's contract (it returns (), not a presence boolean), and add the # Errors / imperative-summary polish the sweep requested across host_pattern, execution, pipes, and the short-doc modules. Co-Authored-By: Claude <noreply@anthropic.com> * Describe the CRLF peek accurately should_skip_crlf inspects without consuming the line feed; align the summary with that contract. Co-Authored-By: Claude <noreply@anthropic.com> * fix(markdownlint): ignore .vtcode tool state The markdownlint target globs every markdown file under the checkout and recently tripped on `.vtcode/tasks/current_task.md`, the gitignored file the local task tracker writes. Exclude the tool state directory the same way the config already excludes `.venv`, `.uv-cache`, and `.terraform`. * stricten doc-coverage gate and add a substantive test suite Address review feedback on the Rustdoc doc-comment coverage gate in four areas. Testing: add scripts/tests/test_doc_coverage.py, a 15-case pytest suite that replaces the script's two subprocess boundaries with canned responses and so covers target discovery (skipping non-doc targets and outside-workspace members), coverage aggregation, threshold exit-code flips, malformed rustdoc/metadata output, command failures, the CLI toolchain override, and the pinned-toolchain read without invoking Cargo. A new `doc-coverage-test` Make target runs it, and `doc-coverage` now depends on it so CI exercises the script's own logic before the real measurement. Unit architecture: catch OSError around both subprocess.run calls so a missing or non-executable cargo surfaces as an explicit measurement error with the script's controlled exit code rather than a bare traceback. Guard doc_targets against malformed metadata JSON (missing workspace keys) with a clear RuntimeError instead of a KeyError. Security and privacy: the doc-coverage recipe no longer interpolates the configurable toolchain/threshold into shell quotes where an embedded quote could inject commands. Both values are computed with $(shell) and exported, then the recipe reads $$DOC_COVERAGE_TOOLCHAIN / $$DOC_COVERAGE_THRESHOLD from the environment at shell runtime; an empirical injection probe confirms a quote-and-command toolchain arrives as one literal argv element. Developer documentation: document the new #[path] internal support modules (sort_utils, diagnostic_json_support, command/error_support, time/format) in the developers' guide together with the 400-line split rule, ownership, and permitted callers. * fix(typos): teach the source dictionary the -ize corrections Add the exerci*/raiz* typo-to-correction mappings and "otherwize" to typos.local.toml so the repository-local policy recognises them, then regenerate typos.toml through the supported generator (scripts/generate_typos_config.py). "otherwize" has no inflected variants, so only the lemma is added. * docs: correct spelling, imperative summaries, and #Errors coverage Sweep documentation comments toward the en-GB-oxendict -ize spellings and the imperative-summary convention across the CLI, IR, runner, which/stdlib, manifest, and test-support crates. - Spelling: Localisation->Localization, Localise->Localize, Serialise->Serialize, Normalise->Normalize, Canonicalise->Canonicalize, otherwize->otherwise, exercized->exercised, exercizing->exercising, exercize->exercise, raized->raised, Sanitise->Sanitize. - Summaries: imperative verbs for scan/visit and derived entry helpers; the workspace search doc distinguishes first-match from collect-all mode; the build dispatch and manifest-existence summaries state JSON/ManifestIngestion gating precisely. - #Errors: added to the manifest rendering helpers (render_rule and friends, noting render_str_with context), run_child_inner (child exit statuses), execute_shell/execute_grep, the env capture chain, canonicalize helpers, derive_dir_and_relative, extend_allowed_hosts, SVG writers, which options from_kwargs, collections helpers, jinja macro capture/collect, and the test http write_response. - Structure: reorder #[cfg(kani)] after the /// doc on cycle variants, qualify the canonicalize_cycle intra-doc link through the support sibling, and drop duplicated first-summary lines on the background-job counters. - host_pattern normalise_host_pattern #Errors now lists slash, missing wildcard suffix, and over-length hosts alongside the existing empty/scheme/label cases. * fix(typos): exclude the .vtcode tool-state directory The spelling gate globs every markdown file in the checkout and recently tripped on `.vtcode/tasks/current_task.md`, a gitignored file written by the local task tracker. Exclude the tool-state directory from the typos scan the same way .markdownlint-cli2.jsonc and .gitignore already handle it, and regenerate typos.toml through scripts/generate_typos_config.py. * docs(build_l10n_audit): start scanner summaries with imperative verbs Rewrite the noun-phrase one-line summaries in scanner.rs to begin with an imperative verb per AGENTS.md (Return/Check/Find/Skip/Parse), preserving each summary's meaning and staying within the 400-line module cap. * feat(doc-coverage): honour CARGO override and split rustdoc measurement helpers * chore(lints): deny missing_docs_in_private_items and document netsuke-build internals * fix(build): order CARGO export after resolution and place docs before attributes * test(doc-coverage): pin CARGO in rustdoc_args focus tests * test(doc-coverage): dedupe rustdoc test parameterization * docs(discovery): document private items added by the config-discovery merge Main's discovery restructure (d091c0f) introduced undocumented private constants, struct fields, and a resolution struct. The branch denies missing documentation on private items, so document each addition to keep the lint gate green while retaining main's layout. * style: apply cargo fmt to rebased parser CLI fields * Complete doc-coverage review safeguards (#369) Cover Cargo-launch failures during Rustdoc measurement and complete the private documentation required by the coverage policy. Restore the Unix fake-Ninja factories, then split path parsing and Unix-only fixture coverage into documented private siblings to retain Whitaker's 400-line module boundary without changing their caller contracts. * Share IR path comparison helpers (#369) Route manifest lowering through the cycle module shared path helpers. This preserves the Kani bounded comparison and production full-path comparison policies in one implementation. * Gate path comparator import for Kani (#369) * Group Rustdoc failure test parameters (#369) * Clarify Rustdoc error contracts (#369) Document propagated and validation errors on fallible helpers, and correct path and temporary-name descriptions to match the implementation. * Harden coverage review contracts (#369) Document verified fallible contracts and correct review-era documentation. Reject malformed Rustdoc coverage JSON through the controlled error path, secure Makefile interpolation, and allow metrics recorder installation retries. * Correct Ninja command error contracts (#369) Document the UTF-8 fallback that makes build-file canonicalization failure non-fatal, while retaining the two genuine error conditions. * Harden coverage review contracts (#369) Separate module and method documentation guidance, keep the coverage recipe safe for configurable tools, and preserve controlled malformed-payload errors. * Expose Windows path candidates internally (#369) Permit the which resolver siblings to use the Windows candidate builder without widening it beyond crate::stdlib::which. * Document Windows workspace lookup internals (#369) Satisfy the private-item documentation policy for the Windows workspace resolver without changing its lookup behavior. * Model exported Polonius flags in Make tests (#369) Supply the Make-exported runtime variable to isolated shell evaluation so the secure doc-coverage recipe is tested faithfully. * Validate Rustdoc coverage counts (#369) Reject malformed Rustdoc count values before aggregating coverage. Keep every invalid payload on the controlled measurement-error path. * Reduce coverage parser complexity (#369) Move payload aggregation and count conversion into focused helpers. Preserve all target-qualified measurement-error diagnostics. --------- Co-authored-by: Claude <noreply@anthropic.com>
Summary
4.2.1("Add Kani harnesses for manifest-to-IR safety checks"). The plan lives atdocs/execplans/4-2-1-kani-harnesses-for-manifest-to-ir-safety-checks.md.#[cfg(kani)] mod verificationblocks insidesrc/ir/from_manifest.rsandsrc/ir/cycle.rs, matching Kani's own layout guidance and avoiding any widening of thenetsuke::irpublic API.HashMaptypes by bounding harnesses to 1-3 nodes and treating the Proptest layer scheduled under4.3.1as the closing commitment for the larger-N property. This is the chief approval-gated decision and will be captured in a new ADR-004 alongside two rejected alternatives (narrow leaf-function harnesses; a verification-only collection port).Plan highlights
The plan was stress-tested with a Logisphere community-of-experts pre-mortem and revised in response:
kani::assert(false)to a trivially true assertion plus acargo kani --listdiscovery check, avoiding training the wrong reflex for "intentional failure".ActionHasher::hashstubbing reframed as a contract decision (it changes the property being proven), not a budget tweak.make kani-ir/make kani-fulltargets introduced pre-emptively so4.2.2and4.2.3do not force a post-hoc split.docs/verification/mutations/<harness>.patchso it survives future production refactors.The plan opens five Stage-A approval questions: bound reconciliation, the preferred
ActionHasherescape hatch, the tiered Make-target split, the default unwind value, and the newdocs/verification/mutations/sub-directory.Test plan
cargo kani --listdiscovery, thenmake kani-full, then the ordinarymake check-fmt/make lint/make test/make markdownlint/make nixiegates.cargo kani --harness ...runs for each new harness; mutation patch files validate falsification power.coderabbit review --agentand the full local gate set pass cleanly.4.2.1marked done, branch pushed, this draft PR updated with implementation summary.References
docs/roadmap.md§4.2.1.docs/formal-verification-methods-in-netsuke.md§Kani for the IR core.docs/execplans/4-1-{1,2,3}-*.md.Summary by Sourcery
Add initial Kani verification harnesses and supporting infrastructure for manifest-to-IR safety checks, while tightening error construction helpers and documenting the small-N verification bound.
New Features:
Enhancements:
Build:
Documentation:
Tests: