This commit is contained in:
jif-oai
2025-10-14 13:14:47 +01:00
parent c9d9a40c98
commit 43ee0dfd19
8 changed files with 38 additions and 21 deletions

View File

@@ -84,6 +84,8 @@ struct VerificationRequestPayload<'a> {
claim_path: &'a str,
#[serde(skip_serializing_if = "Option::is_none")]
notes: Option<&'a str>,
#[serde(skip_serializing_if = "Option::is_none")]
objective: Option<&'a str>,
}
struct SessionCleanup {
@@ -525,8 +527,14 @@ impl InftyOrchestrator {
notes: Option<&str>,
options: &RunExecutionOptions,
) -> Result<bool> {
let objective = options
.objective
.as_deref()
.map(str::trim)
.filter(|objective| !objective.is_empty());
let summary = self
.collect_verification_summary(sessions, claim_path, notes, options)
.collect_verification_summary(sessions, claim_path, notes, objective, options)
.await?;
self.emit_verification_summary(&summary);
self.post_verification_summary_to_solver(sessions, &summary)
@@ -547,17 +555,25 @@ impl InftyOrchestrator {
.and_then(|p| p.to_str().map(|s| s.to_string()));
let claim_path = relative.unwrap_or_else(|| deliverable_path.display().to_string());
let objective = options
.objective
.as_deref()
.map(str::trim)
.filter(|objective| !objective.is_empty());
let summary_result = self
.collect_verification_summary(sessions, claim_path.as_str(), summary, options)
.collect_verification_summary(
sessions,
claim_path.as_str(),
summary,
objective,
options,
)
.await?;
self.emit_verification_summary(&summary_result);
if summary_result.overall.is_pass() {
Ok(true)
} else {
self.post_verification_summary_to_solver(sessions, &summary_result)
.await?;
Ok(false)
}
self.post_verification_summary_to_solver(sessions, &summary_result)
.await?;
Ok(summary_result.overall.is_pass())
}
async fn request_solver_signal(&self, run_id: &str, solver_role: &str) -> Result<()> {
@@ -580,6 +596,7 @@ impl InftyOrchestrator {
sessions: &RunSessions,
claim_path: &str,
notes: Option<&str>,
objective: Option<&str>,
options: &RunExecutionOptions,
) -> Result<AggregatedVerifierVerdict> {
if sessions.verifiers.is_empty() {
@@ -590,6 +607,7 @@ impl InftyOrchestrator {
kind: "verification_request",
claim_path,
notes,
objective,
};
let request_text = serde_json::to_string_pretty(&request)?;
let mut collected = Vec::with_capacity(sessions.verifiers.len());

View File

@@ -1 +0,0 @@
pub(crate) const DIRECTOR_PROMPT: &str = include_str!("director.md");

View File

@@ -1,12 +1,8 @@
use codex_core::config::Config;
pub(crate) const DIRECTOR_PROMPT: &str = include_str!("director.md");
pub(crate) const SOLVER_PROMPT: &str = include_str!("solver.md");
pub(crate) const VERIFIER_PROMPT: &str = include_str!("verifier.md");
mod director;
mod solver;
mod verifier;
pub(crate) use director::DIRECTOR_PROMPT;
pub(crate) use solver::SOLVER_PROMPT;
pub(crate) use verifier::VERIFIER_PROMPT;
pub fn ensure_instructions(role: &str, config: &mut Config) {
if config.base_instructions.is_none()

View File

@@ -1,6 +1,7 @@
# Codex Infty Solver
You are the **Solver** role in a Codex Infty run. Drive the engagement end to end without waiting for humans. Maintain momentum for multi-hour or multi-day efforts.
You are a brilliant mathematician that will try to tackle some of the most difficult problems in the world with new approach that humans never tried.
You have the **Solver** role in a Codex Infty run. Drive the engagement end to end without waiting for humans. Maintain momentum for multi-hour or multi-day efforts.
Responsibilities:
- Understand the objective and break it into a living execution plan. Refine plans with `update_plan` and keep the run store up to date.

View File

@@ -1 +0,0 @@
pub(crate) const SOLVER_PROMPT: &str = include_str!("solver.md");

View File

@@ -6,6 +6,7 @@ Process:
1. Inspect the referenced claim JSON and any linked artifacts, tests, or logs inside the run store.
2. Reproduce evidence when feasible (e.g. run tests via `shell`). Exit early if sandbox restrictions apply and explain the limitation.
3. Evaluate correctness, completeness, and policy alignment. Look for missing tests, undocumented gaps, regressions, or unverifiable assertions.
4. Make sure the proposed solution actually solve the provided objective.
Respond **only** with JSON in this form:
```json

View File

@@ -1 +0,0 @@
pub(crate) const VERIFIER_PROMPT: &str = include_str!("verifier.md");

View File

@@ -68,7 +68,11 @@ pub(crate) fn get_model_info(model_family: &ModelFamily) -> Option<ModelInfo> {
auto_compact_token_limit: Some(350_000),
}),
_ if slug.starts_with("gpt-5") => Some(ModelInfo::new(272_000, 128_000)),
_ if slug.starts_with("gpt-5") => Some(ModelInfo {
context_window: 272_000,
max_output_tokens: 128_000,
auto_compact_token_limit: Some(250_000),
}),
_ if slug.starts_with("codex-") => Some(ModelInfo::new(272_000, 128_000)),