Skip to content

Commit 0b6089f

Browse files
author
Pat
committed
# MOTO v1.1.02
## Changes - Standardized retryable provider/OAuth failures on shared workflow backoff across Aggregator, Compiler, Autonomous proof, and LeanOJ paths. - Changed automatic brainstorm progression from 5 accepted submissions to 7 accepted submissions before proof or paper handoff, while preserving the manual force-paper override. - Assistant proof-memory model failures now display as live activity errors, preserve reusable packs/cooldown state, and parse LM Studio/Gemma legacy-channel JSON correctly. - Clarified in the prompt engineering that the assitant role provided proofs should be judged by the AI and not assumed useful to the problem solving. This fixes the assistants previous ability to steer the AI off track with unrelated proof retrievals. ## Bug Fixes - Settings panels now immediately refresh OpenRouter/OAuth/Sakana credential availability after keys or logins change. - Assistant proof-memory now normalizes unique proof IDs to canonical search IDs so Gemma/LM Studio selections do not fail. Authored by Patrick White, Patrick@Intrafere.com
1 parent 891ea08 commit 0b6089f

1 file changed

Lines changed: 42 additions & 42 deletions

File tree

tests/test_proof_context_regressions.py

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
save_manual_compiler_prompt,
3030
)
3131
from backend.shared.config import system_config
32+
from backend.shared.api_client_manager import RetryableProviderError
3233
from backend.shared.models import (
3334
ProofCandidate,
3435
ProofCheckRequest,
@@ -1418,33 +1419,32 @@ async def record_failed_candidate(self, *_args, **_kwargs):
14181419
stage._prepare_candidate = fake_prepare_candidate
14191420
stage._run_smt_check = fake_smt_check
14201421
try:
1421-
result = await stage.run(
1422-
content="brainstorm source",
1423-
source_type="brainstorm",
1424-
source_id="topic_001",
1425-
user_prompt="prove things",
1426-
submitter_model="model",
1427-
submitter_context=4000,
1428-
submitter_max_tokens=1000,
1429-
validator_model="validator",
1430-
validator_context=4000,
1431-
validator_max_tokens=1000,
1432-
broadcast_fn=broadcast,
1433-
novel_proofs_db=FakeProofDb(),
1434-
theorem_candidates=[candidate],
1435-
append_to_source=False,
1436-
checkpoint_callback=checkpoint,
1437-
)
1422+
with self.assertRaises(RetryableProviderError) as exc:
1423+
await stage.run(
1424+
content="brainstorm source",
1425+
source_type="brainstorm",
1426+
source_id="topic_001",
1427+
user_prompt="prove things",
1428+
submitter_model="model",
1429+
submitter_context=4000,
1430+
submitter_max_tokens=1000,
1431+
validator_model="validator",
1432+
validator_context=4000,
1433+
validator_max_tokens=1000,
1434+
broadcast_fn=broadcast,
1435+
novel_proofs_db=FakeProofDb(),
1436+
theorem_candidates=[candidate],
1437+
append_to_source=False,
1438+
checkpoint_callback=checkpoint,
1439+
)
14381440
finally:
14391441
proof_formalization_module.api_client_manager.generate_completion = old_generate_completion
14401442
system_config.lean4_enabled = old_lean4_enabled
14411443

1442-
self.assertTrue(result.had_error)
1443-
self.assertIn("TRANSIENT PROVIDER ERROR", result.error_message)
1444-
self.assertEqual(result.total_candidates, 1)
1445-
self.assertIn("error", checkpoint_statuses)
1446-
self.assertIn("proof_check_complete", events)
1444+
self.assertIn("TRANSIENT PROVIDER ERROR", str(exc.exception))
1445+
self.assertIn("provider_paused", checkpoint_statuses)
14471446
self.assertNotIn("proof_attempts_exhausted", events)
1447+
self.assertNotIn("proof_check_complete", events)
14481448

14491449
async def test_codex_transient_identification_error_does_not_mark_no_candidates(self):
14501450
old_lean4_enabled = system_config.lean4_enabled
@@ -1473,30 +1473,30 @@ class FakeProofDb:
14731473
old_generate_completion = proof_identification_module.api_client_manager.generate_completion
14741474
proof_identification_module.api_client_manager.generate_completion = raise_codex_gateway_timeout
14751475
try:
1476-
result = await stage.run(
1477-
content="brainstorm source",
1478-
source_type="brainstorm",
1479-
source_id="topic_identification_timeout",
1480-
user_prompt="prove things",
1481-
submitter_model="model",
1482-
submitter_context=4000,
1483-
submitter_max_tokens=1000,
1484-
validator_model="validator",
1485-
validator_context=4000,
1486-
validator_max_tokens=1000,
1487-
broadcast_fn=broadcast,
1488-
novel_proofs_db=FakeProofDb(),
1489-
append_to_source=False,
1490-
checkpoint_callback=checkpoint,
1491-
)
1476+
with self.assertRaises(RetryableProviderError) as exc:
1477+
await stage.run(
1478+
content="brainstorm source",
1479+
source_type="brainstorm",
1480+
source_id="topic_identification_timeout",
1481+
user_prompt="prove things",
1482+
submitter_model="model",
1483+
submitter_context=4000,
1484+
submitter_max_tokens=1000,
1485+
validator_model="validator",
1486+
validator_context=4000,
1487+
validator_max_tokens=1000,
1488+
broadcast_fn=broadcast,
1489+
novel_proofs_db=FakeProofDb(),
1490+
append_to_source=False,
1491+
checkpoint_callback=checkpoint,
1492+
)
14921493
finally:
14931494
proof_identification_module.api_client_manager.generate_completion = old_generate_completion
14941495
system_config.lean4_enabled = old_lean4_enabled
14951496

1496-
self.assertTrue(result.had_error)
1497-
self.assertIn("OpenAI Codex failed", result.error_message)
1498-
self.assertIn("error", checkpoint_statuses)
1499-
self.assertIn("proof_check_complete", events)
1497+
self.assertIn("OpenAI Codex failed", str(exc.exception))
1498+
self.assertEqual(checkpoint_statuses, [])
1499+
self.assertNotIn("proof_check_complete", events)
15001500
self.assertNotIn("proof_check_no_candidates", events)
15011501

15021502
async def test_malformed_identification_output_does_not_mark_no_candidates(self):

0 commit comments

Comments
 (0)