Skip to content

Let a plugin verify one buffer beside the author's others - #257

Open
shellygr wants to merge 1 commit into
masterfrom
shelly/plugin-buffer-runs
Open

shellygr wants to merge 1 commit into
masterfrom
shelly/plugin-buffer-runs

Conversation

@shellygr

@shellygr shellygr commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

A plugin that edits one of the author's spec buffers and asks the prover runner to verify it got the text staged alone, as a free-standing spec under certora/specs/adhoc_run.spec. With named buffers, that text imports siblings (import "shared.spec") and the shared summaries a directory up (import "../summaries/X.spec"), and none of them were on disk where the staged spec looked, so every such run failed to compile.

The change:

  • ProverRunner.__call__ takes buffer: str | None = None, the name of the author's buffer the text belongs to. None keeps today's behavior.
  • WrappedProverRunner carries the author's buffers and the component slug. A run on a named buffer stages the whole set under certora/specs/<slug>/ with that buffer replaced by the text under test, through the same materialize_buffers and buffer_conf the author's own submit_buffer runs use, so the imports resolve to the same files. An unknown buffer name or a missing slug is a ValueError before anything is staged.
  • component_slug() is the one definition of the slug rule; the prover tool's closure calls it.
  • buffer_conf() takes per-run conf overrides (msg, compilation_steps_only) the way setup_prover_config_in does.

Tests: a two-buffer author whose target imports a sibling and the summaries. The run sees the sibling and the edited text on disk under the component dir, the conf verifies certora/specs/<slug>/target.spec with the rule, the message and the override, and nothing stays behind. Plus the no-name path, the two refusals, and the slug rule. Full suite: 1519 passed. Pyright: 0 errors.

🤖 Generated with Claude Code

A plugin that edits one of the author's spec buffers and asks the prover runner to verify it got the text staged alone, as a free-standing spec. With named buffers, that text imports siblings and the shared summaries a directory up, and none of them were on disk where the staged spec looked.

The prover runner now takes the name of the buffer the text belongs to. It stages the author's whole buffer set under the component's spec directory, with that buffer replaced by the text under test, and writes the conf the author's own buffer runs use. Without a name it stages the text alone, as before. The component slug rule has one definition, and buffer_conf takes per-run conf overrides the way setup_prover_config_in does.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants