feat(import): complete OpenAPI onboarding and verify delivery
CI / Rust Checks (pull_request) Failing after 1s
CI / UI Checks (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Deploy (pull_request) Skipped

This commit is contained in:
bsodfather committed 2026-10-09 17:50:38 +03:00
1 parent bb3e376767
commit e93de7015a
244 files changed
+57020 -5139

No files matched your search

@@ -186,7 +186,7 @@ impl PostgresRegistry {
field: "operation_version",
value: i64::MAX,
})?;
let should_anchor_onboarding = request.log.source
let mut should_anchor_onboarding = request.log.source
== crank_core::InvocationSource::AgentToolCall
&& request.log.status == crank_core::InvocationStatus::Ok
&& request.log.execution_stage == Some(crank_core::ExecutionStage::Runtime)
@@ -200,6 +200,21 @@ impl PostgresRegistry {
.bind(request.log.workspace_id.as_str())
.fetch_one(&mut *transaction)
.await?;
// A durable import context governs terminal anchoring: a pending
// context suppresses the generic anchor entirely, and an explicit
// selection only anchors the exact selected Operation/version.
// Without an import context the existing generic anchoring stays.
if let Some((selected_operation_id, selected_operation_version)) =
super::onboarding_import::onboarding_import_selection_in_transaction(
&mut transaction,
&request.log.workspace_id,
)
.await?
{
should_anchor_onboarding = selected_operation_id.as_deref()
== Some(request.log.operation_id.as_str())
&& selected_operation_version == Some(operation_version);
}
}
sqlx::query(
"insert into invocation_logs (
@@ -404,6 +419,14 @@ impl PostgresRegistry {
.await?;
}
}
// Record import funnel publication/activation at the authoritative
// call boundary (idempotent; no-op without a selected import).
super::onboarding_import::record_import_funnel_milestones_in_transaction(
&mut transaction,
&request.log.workspace_id,
request.log.created_at,
)
.await?;
}
transaction.commit().await?;