diagnostics: remove legacy /api compatibility endpoints#1528
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (13)
💤 Files with no reviewable changes (1)
WalkthroughThis pull request renames five diagnostic/monitoring API endpoints from the Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Pull request overview
This PR completes the diagnostics API cutover by removing legacy /api/* compatibility routes and updating all in-repo consumers and docs to use the canonical /admin/v1/* endpoints.
Changes:
- Remove
/api/{stats,config,logs,history,traces}routing in the diagnostics server and update tests to validate both the new routes and legacy 404 behavior. - Migrate dashboard + bench helpers + competitive bench agent to
/admin/v1/*. - Regenerate embedded dashboard HTML and update docs/comments to reference
/admin/v1/*.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
justfile |
Updates benchmark helpers to poll /admin/v1/stats instead of legacy /api/stats. |
dashboard/vite.config.ts |
Removes dev proxy for /api, keeping /admin as the canonical proxy prefix. |
dashboard/src/components/LogViewer.tsx |
Switches log polling from /api/logs to /admin/v1/logs. |
dashboard/src/api.ts |
Moves dashboard API helpers from /api/* to /admin/v1/*. |
crates/logfwd-io/src/stderr_capture.rs |
Updates module docs to reflect the /admin/v1/logs endpoint. |
crates/logfwd-io/src/span_exporter.rs |
Updates docs to reflect the /admin/v1/traces endpoint. |
crates/logfwd-io/src/diagnostics.rs |
Removes legacy /api/* routes, updates routing to /admin/v1/*, and aligns tests (including explicit legacy 404 assertions). |
crates/logfwd-io/src/dashboard.html |
Regenerates embedded dashboard bundle with /admin/v1/* endpoints. |
crates/logfwd-competitive-bench/src/agents/logfwd.rs |
Updates competitive bench agent stats URL to /admin/v1/stats. |
book/src/troubleshooting.md |
Updates example curl commands to /admin/v1/stats. |
book/src/getting-started/first-pipeline.md |
Updates example curl commands to /admin/v1/stats. |
book/src/deployment/monitoring.md |
Updates endpoint list to /admin/v1/*. |
book/src/config/reference.md |
Updates endpoint reference table to /admin/v1/*. |
ApprovabilityVerdict: Approved Mechanical rename of diagnostic API endpoints from You can customize Macroscope's approvability policy. Learn more. |
Summary
/api/*from the diagnostics router/admin/v1/*Why
PR #1509 landed readiness/status policy improvements, but
mainstill accepted legacy/api/*helper routes. This finishes the cutover so the interface is consistent and explicit.Validation
cargo fmt --checkrg -n "/api/stats|/api/config|/api/logs|/api/history|/api/traces" --glob '!dev-docs/research/**' --glob '!target/**'cargo test -p logfwd-io diagnostics::tests:: -- --nocaptureNotes
/api/*references are intentional in the legacy-404 test coverage to assert removed endpoints stay removed.Note
Remove legacy
/api/*diagnostics endpoints in favor of/admin/v1/*/api/{stats,config,logs,history,traces}routes inDiagnosticsServerwith/admin/v1/equivalents; the old paths now return 404.api.ts,dashboard.html,LogViewer.tsx), benchmarking agent, andjustfilerecipes — to use the new paths./apidev-server proxy fromvite.config.tsand updates all documentation./api/*endpoints will receive 404 with no fallback.Macroscope summarized f8640f1.