Clarify Epiphany automation dependencies

This commit is contained in:
Meta Vens 2026-05-13 03:14:59 +01:00
commit c2c40d7fb0
5 changed files with 56 additions and 7 deletions

View file

@ -5,7 +5,6 @@ mod epiphany_state_helpers;
pub(crate) use self::epiphany_automation::maybe_run_epiphany_coordinator_automation_for_turn_boundary;
pub(crate) use self::epiphany_automation::maybe_run_epiphany_pre_compaction_checkpoint_intervention_for_token_count;
use self::epiphany_mutation_routes::epiphany_job_launch_changed_fields;
use self::epiphany_mutation_routes::epiphany_promote_changed_fields;
use self::epiphany_mutation_routes::epiphany_update_patch_changed_fields;
use self::epiphany_mutation_routes::reorient_finding_code_refs;

View file

@ -1,4 +1,52 @@
use super::*;
use std::sync::Arc;
use codex_app_server_protocol::ServerNotification;
use codex_app_server_protocol::ThreadEpiphanyCoordinatorSignals;
use codex_app_server_protocol::ThreadEpiphanyReorientStateStatus;
use codex_app_server_protocol::ThreadEpiphanyRoleId;
use codex_app_server_protocol::ThreadEpiphanyStateUpdatedNotification;
use codex_app_server_protocol::ThreadEpiphanyStateUpdatedSource;
use codex_core::CodexThread;
use codex_core::SteerInputError;
use codex_protocol::ThreadId;
use codex_protocol::protocol::Op;
use codex_protocol::protocol::TokenUsageInfo as CoreTokenUsageInfo;
use codex_protocol::user_input::UserInput as CoreInputItem;
use epiphany_codex_bridge::coordinator::EpiphanyCoordinatorAutomationAction;
use epiphany_codex_bridge::coordinator::epiphany_reorient_finding_already_accepted;
use epiphany_codex_bridge::coordinator::epiphany_role_finding_already_accepted;
use epiphany_codex_bridge::coordinator::epiphany_role_finding_cites_implementation_evidence;
use epiphany_codex_bridge::coordinator::epiphany_verification_finding_allows_implementation;
use epiphany_codex_bridge::coordinator::epiphany_verification_finding_covers_current_modeling;
use epiphany_codex_bridge::coordinator::epiphany_verification_finding_needs_evidence;
use epiphany_codex_bridge::coordinator::implementation_evidence_after_role_finding;
use epiphany_codex_bridge::coordinator::map_epiphany_coordinator;
use epiphany_codex_bridge::coordinator::map_epiphany_crrc_recommendation;
use epiphany_codex_bridge::coordinator::map_epiphany_roles;
use epiphany_codex_bridge::coordinator::role_finding_accepted_after;
use epiphany_codex_bridge::coordinator::select_epiphany_coordinator_automation_action;
use epiphany_codex_bridge::jobs::map_epiphany_jobs;
use epiphany_codex_bridge::launch::EPIPHANY_MODELING_ROLE_BINDING_ID;
use epiphany_codex_bridge::launch::EPIPHANY_REORIENT_LAUNCH_BINDING_ID;
use epiphany_codex_bridge::launch::EPIPHANY_VERIFICATION_ROLE_BINDING_ID;
use epiphany_codex_bridge::launch::build_epiphany_reorient_launch_request;
use epiphany_codex_bridge::pressure::map_epiphany_pressure;
use epiphany_codex_bridge::pressure::render_epiphany_pre_compaction_checkpoint_intervention;
use epiphany_codex_bridge::pressure::should_run_epiphany_pre_compaction_checkpoint_intervention;
use epiphany_codex_bridge::reorient::map_epiphany_freshness;
use epiphany_codex_bridge::reorient::map_epiphany_reorient;
use epiphany_codex_bridge::runtime_results::load_epiphany_reorient_result_snapshot;
use epiphany_codex_bridge::runtime_results::load_epiphany_role_result_snapshot;
use tokio::sync::Mutex;
use tracing::warn;
use super::epiphany_freshness_watcher_snapshot;
use super::epiphany_mutation_routes::epiphany_job_launch_changed_fields;
use super::epiphany_state_helpers::client_visible_live_thread_epiphany_state;
use super::epiphany_state_helpers::epiphany_modeling_finding_has_reviewable_state_patch;
use crate::epiphany_invalidation::EpiphanyInvalidationManager;
use crate::outgoing_message::ThreadScopedOutgoingMessageSender;
use crate::thread_state::ThreadState;
pub(crate) async fn maybe_run_epiphany_coordinator_automation_for_turn_boundary(
thread_id: ThreadId,