From ec30277a90afef3452485c2d658dd1658b3c9a64 Mon Sep 17 00:00:00 2001 From: iris Date: Sun, 2 Aug 2026 21:03:33 +0200 Subject: [PATCH] hive-c0re: drop redundant METHOD/path prefixes from OpenAPI summaries Swagger UI's endpoint-list row already shows the HTTP method badge + path for every row, so restating `METHOD /path` at the start of a handler's own summary is pure duplication. Strips that self-referential prefix from every summary that has it and re-capitalizes what follows as a standalone sentence. Left two false positives untouched: misc_api.rs's operator-inbox summary cross-references a *different* sibling endpoint (mark-all-read) for context, and topology.rs's SetParentForm struct doc happens to mention its endpoint's path but isn't a handler summary line. Both are legitimate, not redundant. --- hive-c0re/src/dashboard/approvals.rs | 4 ++-- hive-c0re/src/dashboard/build_logs.rs | 14 +++++++------- hive-c0re/src/dashboard/extra_forges.rs | 4 ++-- hive-c0re/src/dashboard/health.rs | 4 ++-- hive-c0re/src/dashboard/infra_containers.rs | 2 +- hive-c0re/src/dashboard/journal.rs | 2 +- hive-c0re/src/dashboard/lifecycle_ops.rs | 18 +++++++++--------- hive-c0re/src/dashboard/matrix_accounts.rs | 4 ++-- hive-c0re/src/dashboard/misc_api.rs | 6 +++--- hive-c0re/src/dashboard/permissions.rs | 10 +++++----- hive-c0re/src/dashboard/questions.rs | 4 ++-- hive-c0re/src/dashboard/schedules.rs | 16 ++++++++-------- hive-c0re/src/dashboard/state_files.rs | 2 +- hive-c0re/src/dashboard/state_snapshot.rs | 2 +- hive-c0re/src/dashboard/tombstones.rs | 2 +- hive-c0re/src/dashboard/topology.rs | 4 ++-- 16 files changed, 49 insertions(+), 49 deletions(-) diff --git a/hive-c0re/src/dashboard/approvals.rs b/hive-c0re/src/dashboard/approvals.rs index be405cf2..5deef931 100644 --- a/hive-c0re/src/dashboard/approvals.rs +++ b/hive-c0re/src/dashboard/approvals.rs @@ -16,7 +16,7 @@ use super::{AppState, error_response}; use crate::actions; use crate::coordinator::Coordinator; -/// `POST /api/approve/{id}` — approve a pending approval row. +/// Approve a pending approval row. #[utoipa::path( post, path = "/api/approve/{id}", @@ -47,7 +47,7 @@ pub(super) struct DenyForm { note: Option, } -/// `POST /api/deny/{id}` — deny a pending approval row, with an optional +/// Deny a pending approval row, with an optional /// note (form field `note`). #[utoipa::path( post, diff --git a/hive-c0re/src/dashboard/build_logs.rs b/hive-c0re/src/dashboard/build_logs.rs index 4584d96b..f4835878 100644 --- a/hive-c0re/src/dashboard/build_logs.rs +++ b/hive-c0re/src/dashboard/build_logs.rs @@ -29,7 +29,7 @@ pub(super) struct BuildLogsAllQuery { limit: Option, } -/// `GET /api/build-logs?limit=N` — most-recent build log headers across +/// Most-recent build log headers across /// all agents, newest first. /// /// Same JSON shape as the per-agent endpoint. @@ -62,7 +62,7 @@ pub(super) struct BuildLogsQuery { limit: Option, } -/// `GET /api/build-logs/{agent}?limit=N` — most-recent build log +/// Most-recent build log /// headers for one agent, newest first. /// /// Returns `Vec` (JSON). Backs the per-agent log chip @@ -103,7 +103,7 @@ pub(super) async fn get_build_logs_agent( } } -/// `GET /api/build-logs/id/{id}` — full build log row (stdout + +/// Full build log row (stdout + /// stderr concatenated) by id. /// /// Returns `BuildLogFull` (JSON), or HTTP 404 when the id doesn't @@ -131,7 +131,7 @@ pub(super) async fn get_build_log_full( } } -/// `GET /api/build-log/{node_id}` — the build log for a **queue node**, +/// The build log for a **queue node**, /// resolved node id → log-row id → full log. /// /// Same `BuildLogFull` JSON (`stdout` / `stderr` + header) as @@ -166,7 +166,7 @@ pub(super) async fn get_build_log_for_node( } } -/// `GET /api/build-log/{node_id}/raw` — the node's build log as `text/plain` +/// The node's build log as `text/plain` /// for download (delegates to `get_build_log_raw` after resolving the node id). #[utoipa::path( get, @@ -206,7 +206,7 @@ struct BuildLogFrame { done: bool, } -/// `GET /api/build-logs/id/{id}/stream` — SSE stream that delivers +/// SSE stream that delivers /// incremental stdout/stderr as a build runs. /// /// The client connects when it opens a running-build panel; the @@ -314,7 +314,7 @@ pub(super) async fn get_build_log_stream( Sse::new(ReceiverStream::new(rx)).keep_alive(KeepAlive::default()) } -/// `GET /api/build-logs/id/{id}/raw` — full log as `text/plain` for +/// Full log as `text/plain` for /// download. /// /// Stdout and stderr are concatenated with a `--- stderr ---` diff --git a/hive-c0re/src/dashboard/extra_forges.rs b/hive-c0re/src/dashboard/extra_forges.rs index 6bf637a6..12e759fb 100644 --- a/hive-c0re/src/dashboard/extra_forges.rs +++ b/hive-c0re/src/dashboard/extra_forges.rs @@ -58,7 +58,7 @@ pub(super) struct ExtraForgesQuery { agent: String, } -/// `GET /api/extra-forges?agent=` — list the external forge +/// List the external forge /// accounts currently provisioned for `agent`. /// /// Derived from every `forge-