fabro/lib/foundation/fabro-api/tests
Bryan Helmkamp e6eb36f852
refactor: simplify model-keyed fallback internals
Consolidation pass over the fallback feature, no intended behavior
changes beyond noted validation and event-shape cleanups:

- Unify the two parallel notice types: FallbackPlanNotice is gone;
  ModelFallbackNotice now owns the runtime NoNearbyReasoningLevel case
  and the shared ChainEmpty wording. Notices emit through a new
  Emitter::notice_scoped with their own level, and each distinct notice
  is emitted once per run instead of on every LLM call.
- Move canonical_model_id onto Catalog so chain keys are written and
  read through one function; reject provider-qualified fallback keys,
  which could never match at dispatch and were silently dead config.
- Type FallbackTarget as ProviderId/ModelId, removing repeated
  ProviderId::new re-wrapping at every use site.
- Derive FallbackPlan's current route from a position index instead of
  storing current/requested_controls copies; advance() no longer has
  unreachable None branches.
- Bundle the agent invocation's live state (session, bridge, lease,
  forwarder, accounting) into LiveAgentInvocation; failover_agent_session
  drops from 21 parameters to 7 and the six copies of the
  abort/discard/classify teardown collapse into two methods.
- Share one route_request builder between one_shot and its failover
  loop; complete_one_shot_request takes the request by value instead of
  deep-cloning the message payload per call.
- Event::Failover carries FailoverProps directly; the props' original
  route and attempt fields are now required, and reasoning efforts are
  typed ReasoningEffort instead of strings.
- Reuse RunModelSettings/RunModelControls in fabro-api via
  with_replacement, add the missing controls property to the OpenAPI
  schema, regenerate the TS client, and add the type-identity/JSON
  parity test.
- Smaller cleanups: ReasoningEffort::closest_supported uses enum
  discriminants; ModelFallbackPolicy gains len(); resolve_model_fallbacks
  takes a provider slice; duplicate-target filtering lives only in the
  resolver.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 12:51:36 -04:00
..
agent_session_activated_props_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
automation_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
billed_token_counts_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
command_termination_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
completion_message_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
completion_usage_round_trip.rs Expose detailed completion token usage 2026-07-24 07:36:56 -04:00
cost_source_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
create_completion_request_round_trip.rs Trim redundant reasoning effort request tests 2026-07-24 08:13:54 -04:00
diff_stats_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
diff_summary_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
environment_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
event_envelope_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
git_context_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
interview_option_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
interview_question_record_round_trip.rs Add structured review targets to human gates 2026-07-28 13:24:12 -04:00
mcp_server_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
mcp_transport_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
model_costs_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
model_features_round_trip.rs Merge origin/main (three-layer crate layout) into fix/openrouter-anthropic-prompt-caching 2026-07-23 19:30:20 -04:00
model_limits_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
model_round_trip.rs Reuse canonical ModelControls in fabro-api and tighten serde contract 2026-07-24 09:15:18 -04:00
model_test_mode_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
pair_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
parallel_branch_id_round_trip.rs Fix live parallel branch refresh and simplify branch rendering 2026-07-28 17:26:05 -04:00
pending_interview_record_round_trip.rs Add structured review targets to human gates 2026-07-28 13:24:12 -04:00
pre_run_push_outcome_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
principal_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
provider_id_round_trip.rs Expose model reasoning effort controls 2026-07-24 07:44:40 -04:00
provider_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
pull_request_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
question_type_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
reasoning_output_round_trip.rs fix(reasoning): tighten capture normalization 2026-07-24 17:31:14 -04:00
run_billing_stage_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_event_round_trip.rs Merge branch 'main' into feat/shared-checkout-parallel 2026-07-24 06:29:57 -04:00
run_failure_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_integrations_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_model_settings_round_trip.rs refactor: simplify model-keyed fallback internals 2026-07-30 12:51:36 -04:00
run_projection_round_trip.rs Merge remote-tracking branch 'origin/main' into fix/cancellation-interrupt-lifecycle 2026-07-23 20:55:25 -04:00
run_sandbox_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_summary_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
sandbox_details_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
sandbox_inventory_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
sandbox_services_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
secret_metadata_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
secret_type_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
server_settings_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
session_contract_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
stage_completion_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
stage_handler_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
stage_id_round_trip.rs fix: harden stage execution identity on resume 2026-07-24 09:37:05 -04:00
stage_model_usage_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
stage_outcome_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
stage_projection_round_trip.rs Merge remote-tracking branch 'origin/main' into feat/for-each-item-injection 2026-07-28 20:03:25 -04:00
stage_state_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
status_round_trip.rs fix(workflow): make publish failures terminal 2026-07-27 11:25:18 -04:00
submit_answer_request_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
system_integrations_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
variable_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
workflow_settings_round_trip.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00