Skip to content

feat(list): --rank-by-backlinks — rank artifacts by inbound-link count (REQ-128)#398

Merged
avrabe merged 1 commit into
mainfrom
feat/list-rank-by-backlinks
Jun 2, 2026
Merged

feat(list): --rank-by-backlinks — rank artifacts by inbound-link count (REQ-128)#398
avrabe merged 1 commit into
mainfrom
feat/list-rank-by-backlinks

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Jun 2, 2026

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.

$ rivet list --rank-by-backlinks --type requirement
    58 in  REQ-004   requirement   approved   23 out  Validation engine
    40 in  REQ-014   requirement   approved    0 out  ASPICE SWE.4/5/6 test structure
    38 in  REQ-007   requirement   approved   16 out  CLI and serve pattern
    …
  • Text: inbound-count column. 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.

Verification

  • Integration test list_rank_by_backlinks_orders_descending: ordering is non-increasing and every entry carries inbound_links.
  • list_orphans_is_subset still passes; clippy --all-targets + fmt clean; rivet validate PASS (190), rivet docs check PASS.

REQ-128 flipped to implemented (both halves now delivered).

Implements: REQ-128

🤖 Generated with Claude Code

…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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

📐 Rivet artifact delta

Change Count
Added 0
Removed 0
Modified 1
Downstream impacted (depth ≤ 5) 0

Graph

graph 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
Loading
Modified
ID Changes
REQ-128

📎 Full HTML dashboard attached as workflow artifact rivet-delta-pr-398download from the workflow run.

Posted by rivet-delta workflow. The graph shows only changed artifacts; open the HTML dashboard (above) for full context.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ 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.

@avrabe avrabe merged commit ca21dc1 into main Jun 2, 2026
19 of 38 checks passed
@avrabe avrabe deleted the feat/list-rank-by-backlinks branch June 2, 2026 13:42
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant