fix: mission_runtime_pairing_code in single-row mapping + fmt
ci / gates (push) Successful in 7s
ci / rust (push) Failing after 10s
ci / frontend (push) Successful in 28s
ci / e2e (push) Skipped
ci / publish (push) Skipped

This commit is contained in:
Omar Sobh
2026-07-22 13:07:17 -07:00
parent b569688e04
commit 37f3f5abfd
3 changed files with 10 additions and 12 deletions
-1
View File
@@ -55,7 +55,6 @@ const EDGE_NETWORK: &str = "clawmates_edge";
/// by `clawmates-runtime.service`. /// by `clawmates-runtime.service`.
const MISSIONS_HOST_ROOT: &str = "/var/lib/clawmates-missions"; const MISSIONS_HOST_ROOT: &str = "/var/lib/clawmates-missions";
/// Deterministic docker container name for a mission's runtime. /// Deterministic docker container name for a mission's runtime.
/// Uses the full UUID hex — UUIDv7 encodes time in the leading bytes, /// Uses the full UUID hex — UUIDv7 encodes time in the leading bytes,
/// so a short prefix isn't guaranteed unique across missions minted /// so a short prefix isn't guaranteed unique across missions minted
+9 -11
View File
@@ -152,20 +152,18 @@ async fn run_job(
// the missions row; else fall back to the shared env-derived // the missions row; else fall back to the shared env-derived
// gateway (pre-C3 missions + non-mission runs). This is what // gateway (pre-C3 missions + non-mission runs). This is what
// isolates agents' workspace filesystem to that mission's repo. // isolates agents' workspace filesystem to that mission's repo.
let mission_binding: Option<(Option<String>, Option<String>)> = sqlx::query_as::< let mission_binding: Option<(Option<String>, Option<String>)> =
_, sqlx::query_as::<_, (Option<String>, Option<String>)>(
(Option<String>, Option<String>), "SELECT m.runtime_endpoint, m.runtime_pairing_code
>(
"SELECT m.runtime_endpoint, m.runtime_pairing_code
FROM topology_runs r FROM topology_runs r
JOIN missions m ON m.id = r.mission_id JOIN missions m ON m.id = r.mission_id
WHERE r.id = $1", WHERE r.id = $1",
) )
.bind(id) .bind(id)
.fetch_optional(pool) .fetch_optional(pool)
.await .await
.ok() .ok()
.flatten(); .flatten();
let leaf_result = match mission_binding { let leaf_result = match mission_binding {
Some((Some(url), Some(code))) => { Some((Some(url), Some(code))) => {
ZeroClawDriveExecutor::from_env_for_gateway_with_code(url, code) ZeroClawDriveExecutor::from_env_for_gateway_with_code(url, code)
+1
View File
@@ -214,6 +214,7 @@ pub async fn get(pool: &PgPool, id: Uuid, workspace_id: Uuid) -> Result<Option<M
target_node_id: r.get("target_node_id"), target_node_id: r.get("target_node_id"),
runtime_container_name: r.get("runtime_container_name"), runtime_container_name: r.get("runtime_container_name"),
runtime_endpoint: r.get("runtime_endpoint"), runtime_endpoint: r.get("runtime_endpoint"),
runtime_pairing_code: r.get("runtime_pairing_code"),
created_at: r.get("created_at"), created_at: r.get("created_at"),
updated_at: r.get("updated_at"), updated_at: r.get("updated_at"),
completed_at: r.get("completed_at"), completed_at: r.get("completed_at"),