From 5aea4780c8ce1d2ce4a35aa6cde8dc995bc73bd1 Mon Sep 17 00:00:00 2001 From: Remylus Losius Date: Sat, 20 Jun 2026 13:24:26 -0400 Subject: [PATCH] docs: session log + backlog for scan-detail host label (PR #613) - SESSION_LOG.md: 2026-06-20 entry for the /scans/{id} host-label fix (hostname->IP->short-UUID), the inet COALESCE gotcha, and tests. - BACKLOG.md: note the scan-detail host label shipped (#613); mark the Host Management chart-icon browser verification done (verified live on owas-tst01, no longer a pending P3). --- BACKLOG.md | 12 ++++++++---- SESSION_LOG.md | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/BACKLOG.md b/BACKLOG.md index 624d88fb..9566153e 100644 --- a/BACKLOG.md +++ b/BACKLOG.md @@ -44,10 +44,14 @@ > links to `/scans/{latest_scan_id}`; Group (None/Status/OS) + a real Filters > popover (Status/Compliance/OS) now work; per-user view default persists > server-side (`users.preferences` JSONB, `/api/v1/users/me/preferences`). -> **Pending (P3 verification):** browser eyeball of the chart-icon -> -> `/scans` navigation was blocked on the Claude Chrome extension not -> connecting; data path is proven at the API/DB level. Re-test once the -> extension is up (owas-tst01 -> scan `019ee4d5-dc40-7342-8451-30cef7fa6c95`). +> Browser-verified live (the chart icon on `owas-tst01` navigates to its +> `/scans/{uuid}` report; the icon is correctly hidden on never-scanned +> hosts). +> +> **Scan detail host label — shipped (PR #613).** The `/scans/{id}` detail +> header showed a truncated host UUID; it now shows hostname (else IP, else +> short UUID), resolved server-side from the `hosts` table +> (`api-scans` v1.1.0). Browser-verified (`owas-tst01`). --- diff --git a/SESSION_LOG.md b/SESSION_LOG.md index 06883677..62234710 100644 --- a/SESSION_LOG.md +++ b/SESSION_LOG.md @@ -6,6 +6,41 @@ and their provenance lives here + in the commit history. --- +## 2026-06-20 — Opus 4.8 (1M context) — Scan detail host label (PR #613) + +**Done** (PR #613 `f07e21fc` on `fix/scan-detail-host-label`, gate green, +merging): + +Live UI nit from a screenshot review: the **Scan detail** page (`/scans/{id}`) +**Host** field rendered `scan.host_id.slice(0, 8)` — a truncated UUID +(`019eccd8`), not human-friendly. Now shows **hostname, else IP, else short +UUID** (last resort only). + +- **Backend** (`api-scans` v1.1.0 C-07/AC-08): `GET /scans/{id}` resolves the + host's `hostname` + `ip_address` from the `hosts` table onto `ScanSummary` + (one extra lookup in `scanresult.Reader.GetScan`). The list endpoint omits + them (the `/scans` browse caller already has host context, and `ScansPage` + already resolves names from its hosts list). `toAPIScanSummary` pointer-wraps + both so list rows stay clean. +- **Frontend** (`frontend-scan-detail` v1.1.0 C-08/AC-08): the Host `Meta` + renders `scan.hostname || scan.ip_address || scan.host_id.slice(0, 8)`, still + a Link to `/hosts/$hostId`. +- **Verified live** in Chrome: the header now reads `owas-tst01` (was + `019eccd8`). + +**Gotcha:** first cut used `COALESCE(ip_address, '')` and 500'd — +`hosts.ip_address` is Postgres `inet`, which can't `COALESCE` with a text +`''`. Fixed with `COALESCE(host(ip_address), '')` (matches how +`internal/host` formats it — plain address, no `/netmask`). Caught by the +failing→passing AC-08 integration test, not in prod. + +**Tests:** backend AC-08 (named host -> hostname+IP; empty-hostname host -> +empty hostname + IP fallback); frontend AC-08 (source-inspection of the +fallback chain, old bare-UUID render gone). Full `api-scans` + `scanresult` +suites green; `specter check` 111 specs. + +--- + ## 2026-06-20 — Opus 4.8 (1M context) — Host Management page fixes (PR #611) **Done** (merged to `main` `f6f46cdc` via PR #611; 3 stacked commits + a build fix):