Skip to content

Update autoharness_analyzer for current AutoHarnessSkipReason variants - #680

Merged
feliperodri merged 1 commit into
model-checking:mainfrom
srivatsansamraj:analyzer-kani-metadata-skip-reasons
Sep 17, 2026
Merged

feliperodri merged 1 commit into
model-checking:mainfrom
srivatsansamraj:analyzer-kani-metadata-skip-reasons

Conversation

@srivatsansamraj

Copy link
Copy Markdown

The analyzer keeps its own copy of AutoHarnessSkipReason and fails to deserialize metadata from current Kani, which changed GenericFn to GenericFn(String) (model-checking/kani#4679) and added RequiresBoundedArguments (model-checking/kani#4691).

  • Bring the enum in line with kani_metadata, keeping the strum strings identical so table text matches kani autoharness --list.
  • Normalize a bare "GenericFn" to {"GenericFn": ""} before from_value, since CI builds the pinned Kani, which still writes the old form.
  • Report RequiresBoundedArguments in its own type-category table instead of folding it into the missing-implementation one; the two need different remediation.
  • Note --bounded-arguments in the README.

Verified with three hand-built kani-metadata.json fixtures (old format, GenericFn with payload, RequiresBoundedArguments): before the change they behave as described in #679, after it all three pass. cargo test covers 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.

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
@srivatsansamraj

Copy link
Copy Markdown
Author

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

@srivatsansamraj
srivatsansamraj marked this pull request as ready for review September 8, 2026 06:54
@srivatsansamraj
srivatsansamraj requested a review from a team as a code owner September 8, 2026 06:54
@acearyanarun

Copy link
Copy Markdown

Looks good to me

@feliperodri feliperodri added the Maintenance Maintenance related issues for the challange label Sep 12, 2026

@feliperodri feliperodri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@feliperodri
feliperodri added this pull request to the merge queue Sep 17, 2026
Merged via the queue into model-checking:main with commit 4da67dd Sep 17, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintenance Maintenance related issues for the challange

Projects

None yet

Development

Successfully merging this pull request may close these issues.

autoharness_analyzer fails on metadata from current Kani

3 participants