Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 23 additions & 2 deletions crates/openproof-cli/src/autonomous.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use openproof_core::{AppEvent, AppState, AutonomousRunPatch};
use openproof_lean::lsp_mcp::LeanLspMcp;
use openproof_protocol::{AgentRole, AgentStatus, BranchQueueState, SearchStrategy};
use openproof_search::config::TacticSearchConfig;
use openproof_search::search::best_first_search;
use openproof_search::lsp_search::best_first_search;
use openproof_store::AppStore;
use std::sync::{Arc, Mutex};
use std::time::Duration;
Expand Down Expand Up @@ -1233,12 +1233,19 @@ fn spawn_tactic_search_for_sorrys(
"[tactic-search] Pantograph search at line {line}: {}",
&goal_type[..goal_type.len().min(60)]
);
let on_goal = {
let tx = tx.clone();
move |goal: openproof_protocol::ProofGoal| {
let _ = tx.send(AppEvent::ProofGoalUpdated(goal));
}
};
match openproof_search::search::pantograph_best_first_search(
&pg,
&propose_fn,
&goal_type,
"",
&config,
Some(&on_goal),
) {
Ok(result) => emit_search_result(&tx, &node_id, line, result),
Err(e) => eprintln!("[tactic-search] Pantograph error at line {line}: {e}"),
Expand All @@ -1254,7 +1261,21 @@ fn spawn_tactic_search_for_sorrys(
let scratch = scratch_path.clone();
tokio::task::spawn_blocking(move || {
eprintln!("[tactic-search] LSP search at line {line}");
match best_first_search(&lsp, &propose_fn, &scratch, line, "", &config) {
let on_goal = {
let tx = tx.clone();
move |goal: openproof_protocol::ProofGoal| {
let _ = tx.send(AppEvent::ProofGoalUpdated(goal));
}
};
match best_first_search(
&lsp,
&propose_fn,
&scratch,
line,
"",
&config,
Some(&on_goal),
) {
Ok(result) => emit_search_result(&tx, &node_id, line, result),
Err(e) => eprintln!("[tactic-search] LSP error at line {line}: {e}"),
}
Expand Down
9 changes: 9 additions & 0 deletions crates/openproof-core/src/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,15 @@ impl AppState {
node.status = openproof_protocol::ProofNodeStatus::Proving;
}
}
// Mark matching proof goals as closed by BFS (solved_by = None)
for goal in &mut session.proof.proof_goals {
if goal.sorry_line == Some(sorry_line)
&& goal.status != openproof_protocol::GoalStatus::Closed
{
goal.status = openproof_protocol::GoalStatus::Closed;
// solved_by stays None = BFS implicit
}
}
session.proof.phase = "verifying".to_string();
}
if let Some(session) = self.current_session().cloned() {
Expand Down
Loading
Loading