Skip to content

A tale of two fixes#24

Merged
shellygr merged 8 commits into
masterfrom
shelly/autoprover-summaries-fixes
Jul 1, 2026
Merged

A tale of two fixes#24
shellygr merged 8 commits into
masterfrom
shelly/autoprover-summaries-fixes

Conversation

@shellygr

Copy link
Copy Markdown
Contributor
  1. For code without user-defined data types, the summary resolver would crash since it would send an empty block to the LLM. Handle this case to avoid it triggering. Point to consider: make a more global fix in graphcore?
  2. Autosetup failed on a second run on the same project when parsing *_call_resolution.spec due to ASTExtraction output mishandling, trying to parse non-json as json. Context: It is part of the code that comments out irrelevant auto-injected summaries.

shellygr added 2 commits June 28, 2026 22:15
… deal with Warnings and Errors prepended before the actual json in stdout. We drop the non-json messages and handle with proper logging any remaining json decode errors
@shellygr shellygr requested a review from naftali-g June 28, 2026 22:55
shellygr and others added 2 commits June 29, 2026 02:00
The pure _parse_ast_payload parser is unit-tested in the cheap pytest CI job,
which installs deps without the prover extra (no certora_cli). The module-level
`from certora_cli... import find_jar` made importing the module — and thus
collecting tests/test_summary_resolver.py — fail with ModuleNotFoundError.

find_jar is the only certora_cli symbol in this module's import chain, so defer
it into _ast_extraction (matching existing lazy-import patterns in the package).
The module now imports without certora_cli; the parser test runs in fast CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The cheap pytest job synced deps without certora_cli, so collecting
tests/test_summary_resolver.py (which imports certora_autosetup.setup.
summary_resolver -> certora_cli find_jar) failed with ModuleNotFoundError.

Provide the dependency in CI (`uv sync --group test --extra prover`) rather
than contorting the module to import without it. Reverts the lazy-import change
from 17953ef; summary_resolver keeps its top-level find_jar import.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@jtoman jtoman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approving the AIC parts, leaving AS parts to my betters

curr_spec=None,
input=[
"The following types are available for use in your spec",
udts,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I know that sending an empty string as the entire message payload could cause an error, but an empty string in the messages array is a new one. agreed on the fix at the graphcore level, something we can fold into the "invoke" wrappers I've added in Certora/graphcore#21

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

have you applied this in graphcore#21? it seems not?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not yet, since I didn't want to make this PR rely on a fix that hasn't landed yet. But there's no reason not to do it now anyway...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

done

@naftali-g naftali-g left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

a nit and a comment, but approving to not block

Comment thread certora_autosetup/setup/summary_resolver.py Outdated
except json.JSONDecodeError as exc:
raise RuntimeError(
f"{_AST_EXTRACTION_JAR} output was not JSON after stripping diagnostics "
f"(exit {returncode}): {exc}; stdout_head={stdout[:300]!r} stderr={stderr.strip()[:500]!r}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

just print all stdout and stderr, no?

shellygr and others added 4 commits June 30, 2026 21:59
Co-authored-by: Naftali Goldstein <44599898+naftali-g@users.noreply.github.com>
…a/AutoProver into shelly/autoprover-summaries-fixes
@shellygr shellygr merged commit 86af557 into master Jul 1, 2026
2 checks passed
@shellygr shellygr deleted the shelly/autoprover-summaries-fixes branch July 1, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants