skillguard/.agents/memory/api-server-local-curl.md

16 lines
754 B
Markdown
Raw Permalink Normal View History

Add skill version timeline (fingerprint lineage) Task #14: show a full version timeline for each skill family, not just the single most-similar prior scan. What changed: - OpenAPI spec (lib/api-spec/openapi.yaml): new GET /scans/{id}/lineage (operationId getScanLineage) returning an array of ScanLineageEntry (id, name, verdict, riskScore, relation, similarity, comparedScanId, fingerprint, createdAt). Regenerated api-zod + api-client-react via codegen. - API (artifacts/api-server/src/routes/scans.ts): new lineage endpoint. Builds an undirected graph over all scans linked by the comparedScanId chain AND identical (non-empty) fingerprints, then BFS-walks the connected component containing the requested scan and returns it newest-first. Works purely from existing data, no re-scanning. 404 for unknown ids. - UI (artifacts/skillguard/src/pages/scan-report.tsx): new VersionTimeline card rendering the family as a vertical timeline; each entry shows verdict, relation badge, similarity, risk score and date. The viewed scan is marked "Aktuell angezeigt"; every other entry links to the existing comparison view /vergleich/{viewedId}/{entryId}. Card hidden when the family has <=1 member. Notes: - Lineage = connected component, so any member returns the full family. - Verified end-to-end locally (created new/modified/identical chain, checked lineage ordering + 404, confirmed timeline + compare links in the UI), then deleted the test scans. Replit-Task-Id: c7f87ce6-59d8-4396-b16b-f20846f42f0b
2026-06-10 19:47:39 +00:00
---
name: Testing the SkillGuard api-server from the shell
description: How to reach the api-server with curl during development (external proxy fails).
---
# Testing the api-server from the shell
Curling the api-server through the external proxy (`$REPLIT_DEV_DOMAIN/api/...`)
fails during development — it returns HTTP 000 / connection refused (the proxy
routes by the selected artifact + mTLS, so a bare curl does not reach it).
**How to apply:** curl the api-server directly on its local port instead, e.g.
`http://localhost:8080/api/scans`. Confirm the port from the api-server workflow
log line `Server listening port: <PORT>` (it reads `PORT`, defaulting to 8080).
The web artifact's preview, however, reaches the API fine through the proxy.