Repository navigation
Update autoharness_analyzer for current AutoHarnessSkipReason variants - #680
Conversation
Kani changed GenericFn to carry a String (model-checking/kani#4679) and added RequiresBoundedArguments (model-checking/kani#4691). The analyzer keeps its own copy of the enum, which did not follow, so it fails to deserialize metadata from current Kani. Match the enum, normalize the old bare "GenericFn" form so CI on the pinned Kani keeps working, and report RequiresBoundedArguments in its own table. Resolves model-checking#679
|
@Tianshu-Huang @acearyanarun @CYJ904 @wodex1nhaoIeng Opened #679 for this; this PR is the fix. Feel free to take a look and verify when you get a chance. |
|
Looks good to me |
feliperodri
left a comment
There was a problem hiding this comment.
LGTM — verified against upstream. The updated AutoHarnessSkipReason matches kani_metadata::AutoHarnessSkipReason at Kani HEAD exactly: variant names, payload shapes (GenericFn(String), RequiresBoundedArguments(Vec<(String, String)>)), and every #[strum(serialize = ...)] string are identical, so table text stays aligned with kani autoharness --list.
The compatibility shim is correct and necessary: kani#4679 (2026-08-21) and kani#4691 (2026-08-23) both postdate the pinned Kani 152c6a8 (2026-07-18), so the pinned Kani still serializes GenericFn as a bare string and never emits RequiresBoundedArguments. Without normalize_skip_reasons, the bare "GenericFn" would fail to deserialize into the newtype variant GenericFn(String); rewriting it to {"GenericFn": ""} fixes that while leaving the map form and all other variants untouched. That the "Kani Autoharness Analyzer" CI job (built against the pin) is green confirms the round-trip.
Splitting RequiresBoundedArguments into its own breakdown table via the parameterized skipped_breakdown_table(category_header, args_of, …) is a clean refactor and correctly keeps its remediation (--bounded-arguments) distinct from MissingArbitraryImpl. The three inline fixtures cover old form / payload / bounded-arguments.
Minor, non-blocking: with the current pin the bounded-arguments table will always render empty (that reason is never produced yet) — fine as forward-compat, and it'll populate once the pin advances past rust-lang#4691.
Approving.
The analyzer keeps its own copy of
AutoHarnessSkipReasonand fails to deserialize metadata from current Kani, which changedGenericFntoGenericFn(String)(model-checking/kani#4679) and addedRequiresBoundedArguments(model-checking/kani#4691).kani_metadata, keeping thestrumstrings identical so table text matcheskani autoharness --list."GenericFn"to{"GenericFn": ""}beforefrom_value, since CI builds the pinned Kani, which still writes the old form.RequiresBoundedArgumentsin its own type-category table instead of folding it into the missing-implementation one; the two need different remediation.--bounded-argumentsin the README.Verified with three hand-built
kani-metadata.jsonfixtures (old format,GenericFnwith payload,RequiresBoundedArguments): before the change they behave as described in #679, after it all three pass.cargo testcovers the same three cases inline. Not run against a full std sweep.Resolves #679
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.