Remove placeholder Epiphany specialist job
This commit is contained in:
parent
b9ad3cdac7
commit
53bdea881b
2 changed files with 23 additions and 37 deletions
|
|
@ -1100,15 +1100,14 @@ The app-server handler:
|
|||
|
||||
`map_epiphany_jobs`:
|
||||
|
||||
1. returns base `retrieval-index`, `graph-remap`, `verification`, and `specialist-work` slots from retrieval state, frontier/churn state, invariant counts, and the no-scheduler boundary.
|
||||
1. returns only the base `retrieval-index`, `graph-remap`, and `verification` slots from retrieval state, frontier/churn state, and invariant counts; specialist rows appear only from explicit durable bindings/runtime links.
|
||||
2. copies active subgoal and graph-node ids into relevant slots so clients can link progress pressure back to the visible model.
|
||||
3. if authoritative typed state carries `jobBindings`, matches those bindings onto the base slots by id/kind and reflects launcher identity, authority scope, backend kind, and backend job id.
|
||||
4. when a binding targets the old `agent_jobs` backend, projects it as sealed instead of crawling SQLite for live progress.
|
||||
5. when the state runtime is unavailable or the referenced backend job is missing, blocks the bound slot with an explicit reason instead of pretending the work is running.
|
||||
3. if authoritative typed state carries `jobBindings`, matches those bindings onto the base slots by id/kind or appends a bound specialist row, reflecting launcher identity, authority scope, and runtime job id.
|
||||
4. when a binding has no runtime link or runtime job id, leaves it idle or blocked from binding state instead of inventing lifecycle.
|
||||
|
||||
### Output
|
||||
|
||||
The response is a typed progress board derived from the current Epiphany machine. The jobs projection reflects retrieval while graph/remap and verification stay blocked when state is missing, ready-state jobs expose revision identity and launcher metadata, heartbeat-backed specialist bindings project as pending heartbeat turns, stale `agent_jobs` bindings are sealed instead of crawled through SQLite, no `thread/epiphany/stateUpdated` or `thread/epiphany/jobsUpdated` notification is emitted by the read, and final thread state revision does not change.
|
||||
The response is a typed progress board derived from the current Epiphany machine. The jobs projection reflects retrieval while graph/remap and verification stay blocked when state is missing, ready-state jobs expose revision identity and launcher metadata, runtime-linked specialist bindings project as pending runtime turns, no placeholder specialist row is fabricated, no `thread/epiphany/stateUpdated` or `thread/epiphany/jobsUpdated` notification is emitted by the read, and final thread state revision does not change.
|
||||
|
||||
### Invariant
|
||||
|
||||
|
|
|
|||
|
|
@ -6350,7 +6350,14 @@ impl CodexMessageProcessor {
|
|||
let job = map_epiphany_jobs(Some(&epiphany_state), None)
|
||||
.into_iter()
|
||||
.find(|job| job.id == EPIPHANY_REORIENT_LAUNCH_BINDING_ID)
|
||||
.unwrap_or_else(map_epiphany_specialist_job);
|
||||
.unwrap_or_else(|| {
|
||||
epiphany_blocked_state_job(
|
||||
EPIPHANY_REORIENT_LAUNCH_BINDING_ID,
|
||||
ThreadEpiphanyJobKind::Specialist,
|
||||
"reorient-guided checkpoint regather",
|
||||
"Launched reorientation worker was not reflected in Epiphany state.",
|
||||
)
|
||||
});
|
||||
|
||||
self.outgoing
|
||||
.send_response(
|
||||
|
|
@ -7370,7 +7377,14 @@ impl CodexMessageProcessor {
|
|||
let job = map_epiphany_jobs(Some(&epiphany_state), None)
|
||||
.into_iter()
|
||||
.find(|job| job.id == binding_id)
|
||||
.unwrap_or_else(|| map_epiphany_specialist_job());
|
||||
.unwrap_or_else(|| {
|
||||
epiphany_blocked_state_job(
|
||||
&binding_id,
|
||||
ThreadEpiphanyJobKind::Specialist,
|
||||
"role-scoped specialist work",
|
||||
"Interrupted job binding was not reflected in Epiphany state.",
|
||||
)
|
||||
});
|
||||
|
||||
self.outgoing
|
||||
.send_response(
|
||||
|
|
@ -18138,7 +18152,6 @@ fn map_epiphany_jobs(
|
|||
map_epiphany_index_job(state, retrieval_override),
|
||||
map_epiphany_remap_job(state),
|
||||
map_epiphany_verification_job(state),
|
||||
map_epiphany_specialist_job(),
|
||||
];
|
||||
|
||||
let Some(state) = state else {
|
||||
|
|
@ -18439,30 +18452,6 @@ fn map_epiphany_verification_job(state: Option<&EpiphanyThreadState>) -> ThreadE
|
|||
}
|
||||
}
|
||||
|
||||
fn map_epiphany_specialist_job() -> ThreadEpiphanyJob {
|
||||
ThreadEpiphanyJob {
|
||||
id: "specialist-work".to_string(),
|
||||
kind: ThreadEpiphanyJobKind::Specialist,
|
||||
scope: "role-scoped specialist work".to_string(),
|
||||
owner_role: "epiphany-harness".to_string(),
|
||||
launcher_job_id: None,
|
||||
authority_scope: None,
|
||||
backend_job_id: None,
|
||||
status: ThreadEpiphanyJobStatus::Unavailable,
|
||||
items_processed: None,
|
||||
items_total: None,
|
||||
progress_note: None,
|
||||
last_checkpoint_at_unix_seconds: None,
|
||||
blocking_reason: Some(
|
||||
"Specialist scheduling is not landed; this slot prevents clients from inventing private scheduler state."
|
||||
.to_string(),
|
||||
),
|
||||
active_thread_ids: Vec::new(),
|
||||
linked_subgoal_ids: Vec::new(),
|
||||
linked_graph_node_ids: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
fn epiphany_blocked_state_job(
|
||||
id: &str,
|
||||
kind: ThreadEpiphanyJobKind,
|
||||
|
|
@ -23238,7 +23227,7 @@ mod tests {
|
|||
|
||||
let jobs = map_epiphany_jobs(Some(&state), None);
|
||||
|
||||
assert_eq!(jobs.len(), 4);
|
||||
assert_eq!(jobs.len(), 3);
|
||||
assert_eq!(jobs[0].id, "retrieval-index");
|
||||
assert_eq!(jobs[0].kind, ThreadEpiphanyJobKind::Indexing);
|
||||
assert_eq!(jobs[0].status, ThreadEpiphanyJobStatus::Needed);
|
||||
|
|
@ -23258,10 +23247,8 @@ mod tests {
|
|||
assert_eq!(jobs[2].items_processed, Some(1));
|
||||
assert_eq!(jobs[2].items_total, Some(2));
|
||||
|
||||
assert_eq!(jobs[3].id, "specialist-work");
|
||||
assert_eq!(jobs[3].kind, ThreadEpiphanyJobKind::Specialist);
|
||||
assert_eq!(jobs[3].status, ThreadEpiphanyJobStatus::Unavailable);
|
||||
assert!(jobs[3].blocking_reason.is_some());
|
||||
assert_eq!(jobs.len(), 3);
|
||||
assert!(!jobs.iter().any(|job| job.id == "specialist-work"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Reference in a new issue