feat(list): --rank-by-backlinks — rank artifacts by inbound-link count (REQ-128)#398
Merged
Conversation
…t (REQ-128)
Completes REQ-128: `--orphans` finds artifacts with no links (asserted-
but-unanchored); this adds the complement — rank by inbound-link count
(descending) to surface the most depended-upon artifacts, i.e. the
highest-impact-if-changed hubs.
- Text: an inbound-count column (" 58 in REQ-004 … 23 out …").
- JSON: an `inbound_links` field per artifact.
- Built on `LinkGraph::backlinks_to`; exact integer counts only (no
semantic/relevance ranking, per REQ-128 acceptance); deterministic,
ties break by id. Composes with `--type` / `--filter`.
On the rivet corpus the top requirements are REQ-004 (Validation engine,
58 inbound), REQ-014, REQ-007, REQ-010 — the central nodes.
Integration test asserts the ordering is non-increasing and every entry
carries inbound_links; clippy --all-targets + fmt clean; rivet validate
+ docs check PASS. REQ-128 flipped to implemented (both halves now done).
Implements: REQ-128
Refs: REQ-007
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📐 Rivet artifact delta
Graphgraph LR
REQ_128["REQ-128"]:::modified
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
Modified
Posted by |
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: 3dcf8b2 | Previous: 8891494 | Ratio |
|---|---|---|---|
link_graph_build/10000 |
35891270 ns/iter (± 2334645) |
25284311 ns/iter (± 1141574) |
1.42 |
validate/10000 |
18190485 ns/iter (± 1817093) |
12996001 ns/iter (± 417453) |
1.40 |
diff/10000 |
9662918 ns/iter (± 718674) |
7771074 ns/iter (± 117800) |
1.24 |
This comment was automatically generated by workflow using github-action-benchmark.
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.
Completes REQ-128.
--orphans(already shipped) finds artifacts with no links — asserted-but-unanchored claims. This adds the complement: rank by inbound-link count (descending) to surface the most depended-upon artifacts, i.e. the highest-impact-if-changed hubs.inbound_linksfield per artifact.LinkGraph::backlinks_to; exact integer counts only (no semantic/relevance ranking, per REQ-128 acceptance); deterministic, ties break by id. Composes with--type/--filter.Verification
list_rank_by_backlinks_orders_descending: ordering is non-increasing and every entry carriesinbound_links.list_orphans_is_subsetstill passes; clippy--all-targets+ fmt clean;rivet validatePASS (190),rivet docs checkPASS.REQ-128 flipped to
implemented(both halves now delivered).Implements: REQ-128
🤖 Generated with Claude Code