feat(api): oEmbed provider and Grafana JSON API endpoints#89
Open
feat(api): oEmbed provider and Grafana JSON API endpoints#89
Conversation
- A* with Manhattan heuristic replacing pure Dijkstra - Port stub support for clean edge departure from nodes - Channel waypoints between obstacles for better routing - Path simplification removing collinear redundant waypoints - Batch routing with parallel segment nudging (edge_separation) - Waypoint margin (4px) for obstacle clearance - Strict obstacle intersection (boundary-exclusive) - Precise coordinate tracking via rounding - 15 new tests (66 total + 3 doctests) Trace: skip Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add /oembed endpoint for rich-type artifact embedding in Notion/Confluence, and /api/v1/ REST endpoints (health, stats, artifacts, diagnostics, coverage) for Grafana Infinity plugin. - oEmbed: rich iframe response, dimension clamping, XML 501 - Stats: by_type, by_status, validation severity, coverage rules - Artifacts: type/status/origin/search filters, pagination - Diagnostics: severity/rule/artifact_id filters, pagination - Coverage: per-rule traceability breakdown with uncovered IDs - CORS on /api/v1/ via tower-http CorsLayer - CSP frame-ancestors * for iframe embedding - oEmbed discovery <link> tag on artifact detail pages - 21 integration tests Implements: FEAT-073
The reload handler re-reads the entire project from disk, which can take longer than 5s under coverage/proptest instrumentation. Also fail explicitly on read error instead of silently ignoring it. Fixes: FEAT-073
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
added 2 commits
March 29, 2026 07:25
31 end-to-end tests verifying API responses from a real consumer perspective: JSON shapes, CORS headers, oEmbed iframe rendering, Grafana-compatible data structures, and cross-checks between API responses and the dashboard UI. Verifies: FEAT-073
The mutation testing job was getting cancelled by the runner without a configured timeout. As rivet-core grows, cargo-mutants needs more wall time. 20 minutes gives sufficient headroom. Refs: FEAT-073
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: edf4356 | Previous: ba47683 | Ratio |
|---|---|---|---|
store_insert/10000 |
14532961 ns/iter (± 855839) |
10942076 ns/iter (± 467715) |
1.33 |
link_graph_build/10000 |
32929782 ns/iter (± 1582806) |
25228541 ns/iter (± 1215205) |
1.31 |
This comment was automatically generated by workflow using github-action-benchmark.
Under proptest's heavier load, the server can briefly refuse connections between the health check and the first request. Add a retry loop to fetch() to handle transient connection refused. Fixes: FEAT-073
avrabe
pushed a commit
that referenced
this pull request
Mar 30, 2026
Specs:
- Document query embeds ({{stats}}, {{coverage}}, snapshots, delta, STPA)
- Spec-driven development (schema packages, bridges, guide API, CRUD CLI)
- oEmbed + Grafana API design (already implemented in PR #89)
Plans:
- Document embeds Phase 1 implementation plan (6 tasks, 26 tests)
- oEmbed + Grafana API plan (already executed)
Refs: FEAT-073, FEAT-074
This was referenced Mar 30, 2026
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.
Summary
/oembed?url=...endpoint returning rich-type oEmbed responses with iframe to/embed/artifacts/{id}for embedding artifact cards in Notion/Confluence/api/v1/for Grafana Infinity plugin:health,stats,artifacts,diagnostics,coveragetower_http::CorsLayeron/api/v1/*, CSPframe-ancestors *for iframe embedding<link>tag on artifact detail pagesoriginfield (local/external:{prefix}) and stats includeby_originbreakdownreload_returns_hx_locationtest (5s → 30s read timeout)New endpoints
GET /oembed?url=...GET /api/v1/healthGET /api/v1/statsGET /api/v1/artifacts?type=...&q=...GET /api/v1/diagnostics?severity=...GET /api/v1/coverageTest plan
serve_integration.rscargo clippy --all-targets -- -D warningscleancargo fmt --all -- --checkcleanrivet validatepasses (0 warnings)🤖 Generated with Claude Code