mcp: add proof recording and tactic replay#167
Open
ckocaogullar wants to merge 3 commits intojrh13:masterfrom
Open
mcp: add proof recording and tactic replay#167ckocaogullar wants to merge 3 commits intojrh13:masterfrom
ckocaogullar wants to merge 3 commits intojrh13:masterfrom
Conversation
added 3 commits
April 10, 2026 11:24
Record e(TACTIC) and b() calls from eval, apply_tactic, and backtrack to a JSONL file. Includes paren-counting tactic extraction from eval and automatic backtrack tracking. New tools: start_recording(path), stop_recording().
If recording_dir is set in hol-mcp.toml or HOL_RECORDING_DIR env var, recording starts automatically at server startup without needing the LLM to call start_recording.
On startup, optionally #use an ML init file then replay a JSONL tactic prefix to restore proof state. Configured via replay_init/replay_prefix in hol-mcp.toml or HOL_REPLAY_INIT/HOL_REPLAY_PREFIX env vars. Seeds the recording with replayed steps so new tactics append to the prefix. Backtracks cleanly on any failure.
sgmenda
approved these changes
Apr 10, 2026
Contributor
sgmenda
left a comment
There was a problem hiding this comment.
lgtm. could you add a test and update the SKILL.md?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds proof recording to the MCP server so tactic sequences can be captured and replayed, enabling proof resumption after session crashes or context window exhaustion.
Motivation
During long interactive proofs, the LLM may run out of context window or the session may crash. Without recording, all proof progress is lost and tactics must be manually re-applied. This PR adds recording and replay so proofs can resume from where they left off.
Changes
Proof recording tools
New
start_recording(path)andstop_recording()tools write tactic applications to a JSONL file. Recording hooks ineval,apply_tactic,apply_tactics, andbacktrackcapture the proof trace automatically. Theevalhook uses paren-counting to extract tactics frome(TACTIC);;calls.Recording format (one JSON object per line):
Auto-recording via config
Set
recording_dirinhol-mcp.tomlorHOL_RECORDING_DIRenv var to start recording automatically at server startup, without the LLM needing to callstart_recording.Tactic replay on startup
Configure
replay_prefix(JSONL file) and optionallyreplay_init(ML file to#usefirst) to restore proof state on startup. The server replays the tactic sequence and seeds the recording so new tactics append to the prefix. Backtracks cleanly on any failure.All recording operations are synchronized with the existing
_lockto prevent races with concurrent tool calls.