Repository navigation
[codex] Wire planned profile resolver in Reborn composition #3717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,8 @@ use ironclaw_processes::ProcessServices; | |
| use ironclaw_resources::InMemoryResourceGovernor; | ||
| use ironclaw_run_state::{InMemoryApprovalRequestStore, InMemoryRunStateStore}; | ||
| use ironclaw_trust::HostTrustPolicy; | ||
| #[cfg(any(feature = "libsql", feature = "postgres"))] | ||
| use ironclaw_turns::InMemoryRunProfileResolver; | ||
| use ironclaw_turns::{DefaultTurnCoordinator, InMemoryTurnStateStore}; | ||
|
|
||
| use crate::input::RebornStorageInput; | ||
|
|
@@ -226,6 +228,17 @@ fn production_wiring( | |
| }) | ||
| } | ||
|
|
||
| #[cfg(any(feature = "libsql", feature = "postgres"))] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The planned run-profile resolver is currently only wired for production backends ( |
||
| fn planned_run_profile_resolver() -> Result<Arc<InMemoryRunProfileResolver>, RebornBuildError> { | ||
| Ok(Arc::new( | ||
| ironclaw_reborn::planned_driver_factory::default_planned_run_profile_resolver().map_err( | ||
| |error| RebornBuildError::PlannedRunProfileResolver { | ||
| reason: error.to_string(), | ||
| }, | ||
| )?, | ||
| )) | ||
| } | ||
|
|
||
| #[cfg(feature = "libsql")] | ||
| async fn build_libsql_production( | ||
| profile: RebornCompositionProfile, | ||
|
|
@@ -281,6 +294,7 @@ async fn build_libsql_production( | |
| .await? | ||
| .with_libsql_turn_state_store(db) | ||
| .await? | ||
| .with_run_profile_resolver(planned_run_profile_resolver()?) | ||
| .with_turn_run_wake_notifier(production_wiring.turn_run_wake_notifier); | ||
|
|
||
| let turn_coordinator: Arc<dyn ironclaw_turns::TurnCoordinator> = | ||
|
|
@@ -343,6 +357,7 @@ async fn build_postgres_production( | |
| .await? | ||
| .with_postgres_turn_state_store(pool) | ||
| .await? | ||
| .with_run_profile_resolver(planned_run_profile_resolver()?) | ||
| .with_turn_run_wake_notifier(production_wiring.turn_run_wake_notifier); | ||
|
|
||
| let turn_coordinator: Arc<dyn ironclaw_turns::TurnCoordinator> = | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of manually mapping the error to a string, create a specific error variant for this failure mode. To maintain observability without leaking implementation details, log the detailed error from the dependency using a structured logger (e.g.,
tracing) at the call site and return a sanitized, generic error variant.References