Sprint v0.4.0-alpha: Add Data Source Diagnostics (backend + UI + tests) - #26
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
UNKNOWN/WARNING(timeouts, parse errors, empty data, cache hints, etc.).Description
backend/app/core/source_diagnostics.pywith status constants andmake_source_diagnostic(...)to produce a stable diagnostic shape.RipeStatClient(get_with_diagnostics(...)) to measure duration, honor demo mode, use existing caching best-effort, and classify errors (TIMEOUT,RATE_LIMITED,HTTP_ERROR,PARSE_ERROR,EMPTY_RESPONSE,OK, etc.) while keepingget(...)backwards-compatible.details.source_diagnosticsand where appropriate attach per-callsource_diagnosticentries from RPKI checks.routing-statuspayload cannot be interpreted and flagged the structure as unknown.report.md.j2,report.html.j2) with a Data Source Diagnostics section and added a Diagnostics table/card to the frontendReportViewwith a newSourceDiagnostictype infrontend/src/types.ts.backend/tests/test_source_diagnostics.py) and enhanced smoke tests to assertdetails.source_diagnosticspresence; bumped visible version strings tov0.4.0-alpha/0.4.0.Testing
cd backend && pytest -qresulting in all tests passing (64 passed).cd frontend && npm run buildand the production build completed successfully.backend/tests/test_source_diagnostics.pyand extended existing smoke tests to check thatdetails.source_diagnosticsis present for Prefix, ASN and Preflight checks, and demo-mode diagnostics indicatedemo_modeor the demo message.Codex Task