diff --git a/crates/vectord/src/service.rs b/crates/vectord/src/service.rs index aa2ce91..886fe93 100644 --- a/crates/vectord/src/service.rs +++ b/crates/vectord/src/service.rs @@ -83,6 +83,10 @@ pub fn router(state: VectorState) -> Router { .route("/indexes/{name}/bucket", axum::routing::patch(migrate_index_bucket)) .route("/jobs", get(list_jobs)) .route("/jobs/{id}", get(get_job)) + // PRD Phase 41 alias — docs/CONTROL_PLANE_PRD.md specifies + // GET /vectors/profile/jobs/{id} for polling profile activations. + // Same handler as /jobs/{id}; the alias just matches the PRD URL. + .route("/profile/jobs/{id}", get(get_job)) .route("/search", post(search_index)) .route("/rag", post(rag_query)) .route("/hybrid", post(hybrid_search)) @@ -1551,10 +1555,13 @@ async fn activate_profile( tracker.complete(&job_id, result).await; }); - Ok(Json(json!({ + // PRD Phase 41 gate: "Activate a profile → returns 202 in <100ms + // → job completes in background". 202 ACCEPTED signals async-work + // started; clients poll /vectors/jobs/{job_id} for progress. + Ok((StatusCode::ACCEPTED, Json(json!({ "job_id": job_id_for_response, "message": format!("profile activation started — poll /vectors/jobs/{} for progress", job_id_for_response), - }))) + })))) } /// Unload this profile's model and clear the active slot. No-op if the