feat(results): per-result tracking links to PRs / remote issues (REQ-248, DD-072, #548)#676
Merged
Merged
Conversation
…248, DD-072, #548) A test result can now carry links to where the work/tracking lives — a PR artifact or a remote issue — so a failing (or any) result points at the tracking tool instead of dead-ending. Per DD-072: - rivet-core: `ResultLink { url, label? }` + additive `TestResult.links` (`#[serde(default, skip_serializing_if = "Vec::is_empty")]`), so existing result files round-trip byte-identical. Parsed automatically from the rivet-native JSON/YAML result format. - serve: the results detail view gains a "Tracking" column rendering each link (opens in a new tab; label falls back to the URL). Security: result files can come from CI output or synced externals, so only `http(s)` URLs become a live `href` — a `javascript:`/`data:`/`file:` scheme renders as inert escaped text (stored-XSS guard, `is_http_url`). Confirmed with the round-trip parse test (present/absent/URL-only-label), the XSS-guard unit test (http/https safe; javascript/data/file/relative rejected), cargo clippy --all-targets -- -D warnings, and rivet validate PASS. JUnit `<property name="link">` mapping is DD-072 Slice 2. Advances REQ-248 proposed -> implemented. Implements: REQ-248 Refs: FEAT-010
📐 Rivet artifact delta
Graphgraph LR
REQ_248["REQ-248"]:::modified
DD_072["DD-072"]:::added
classDef added fill:#d4edda,stroke:#28a745,color:#155724
classDef removed fill:#f8d7da,stroke:#dc3545,color:#721c24
classDef modified fill:#fff3cd,stroke:#ffc107,color:#856404
classDef overflow fill:#e2e3e5,stroke:#6c757d,color:#495057,stroke-dasharray: 3 3
Added
Modified
Posted by |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Implements REQ-248 (
#548, decision DD-072): a test result can carry links to where the work/tracking lives — a PR artifact or a remote issue — so a failing (or any) result points at the tracking tool instead of dead-ending.ResultLink { url, label? }+ additiveTestResult.links(#[serde(default, skip_serializing_if = "Vec::is_empty")]), so existing result files round-trip byte-identical. Parsed automatically from the rivet-native JSON/YAML result format.Security (addressed a review finding)
Result files can originate from CI output or synced externals, so only
http(s)URLs become a livehref— ajavascript:/data:/file:scheme renders as inert escaped text (stored-XSS guard,is_http_url).Verification
result_links_round_trip_from_result_file— present / absent / URL-only-label round-trip.only_http_urls_are_treated_as_safe_links— http(s) safe; javascript/data/file/ftp/relative/empty rejected.cargo clippy --all-targets -- -D warningsexit 0;rivet validatePASS.Scope
JUnit
<property name="link">mapping → DD-072 Slice 2 (follow-on). Advances REQ-248proposed → implemented.Implements: REQ-248 · Refs: FEAT-010 · DD-072
🤖 Generated with Claude Code