Skip to content

feat(graph): rank the frontier — what to consolidate next (v6.5.0) - #207

Merged
CryptoJones merged 1 commit into
mainfrom
feat/graph-frontier
Aug 2, 2026
Merged

feat(graph): rank the frontier — what to consolidate next (v6.5.0)#207
CryptoJones merged 1 commit into
mainfrom
feat/graph-frontier

Conversation

@CryptoJones

Copy link
Copy Markdown
Owner

Closes #197.

The gap

omind graph answers neighbors, path, orphans, dangling, stats. Every one is a structural yes/no: is this note connected, is that link broken, how big is the graph. None answers the ranking question — of everything in the vault, what should be worked on next?

score = (out_degree - in_degree) * 0.5 ** (days_since_updated / 30)

High score: points at many, pointed at by few, touched recently. That is a note where memory is actively accumulating and consolidation hasn't caught up. Negative: a hub the vault has already absorbed.

The distinction that makes this worth having: an orphan is disconnected; a frontier note is connected but unabsorbed. Only the second one tells you where to spend effort.

Surfaces

  • omind graph frontier [--limit N] [--include-generated] [--json] — table or JSON.
  • graph(op="frontier") on the MCP tool, paged like every other list-shaped result (invariant 7). Ranking is computed over the whole graph, then paged.

Design notes

  • Read-only, no write path. Deliberate, following the source design's reasoning that keeping it read-only removes a write-path attack surface.
  • No new scan, no new state. The links table was already built. The one addition is surfacing mtime_ns from the index's notes table — already stored, previously not read.
  • Generated notes excluded by default. Journals and worklogs link outward at everything by construction; unfiltered they own the entire ranking. Same rule as searchindex._weight_generated, --include-generated to override.
  • A true half-life, not a time constant. The source uses exp(-days / HALFLIFE), which decays to 1/e — not a half — at the named value. This uses 0.5 ** (days / 30), so "30-day half-life" means what it says.

Verified against the live vault

score	out	in	days	note
+4.33	5	0	6	omind 3.2.0 — knowledge graph over the vault's [[wikilinks]] (2026-06-25).md
+3.49	5	0	16	Antigua Runners — agent handoff after Quiet Circle basement (2026-07-17).md
+3.00	3	0	0	omind #186–#190 backlog batch — CJ chose minor-per-item …

Recent, outward-linking, unabsorbed — which is what it claims to find.

Tests

Four: hub-vs-frontier ordering; recency decay (a note aged exactly one half-life scores half as much, pytest.approx); generated exclusion and the opt-in; limit=0 returns everything in descending order. Plus MCP coverage and the paging contract.

Gates

ruff check . · mypy src (strict) · pytest (856 passed, 1 skipped) · pip-audit — green locally.

🤖 Generated with Claude Code

Every existing graph op answers a structural yes/no question: is this note
connected, is that link broken, how big is the graph. None answered the
ranking question — of everything in the vault, what should be worked on next?

  score = (out_degree - in_degree) * 0.5 ** (days_since_updated / 30)

A high score means the note points at many things, few point at it, and it was
touched recently: memory is accumulating there and consolidation has not caught
up. A negative score is a hub the vault has already absorbed. `orphans` finds
notes that are *disconnected*; a frontier note is connected but **unabsorbed**,
which is a different and more actionable state.

This complements `omind consolidate`, which finds merge candidates by
similarity. Frontier finds them by structure, catching "this note has sprawled
outward for weeks and nothing pulled it together" rather than "these two notes
say the same thing".

Journals, worklogs, and checkpoints are excluded by default — they link outward
at everything by construction and would otherwise fill the whole ranking, the
same reason searchindex._weight_generated de-prioritises them. Read-only, with
no write path, following the source design's instinct.

Costs no new scan and no new state: the links table was already built. The one
addition is surfacing `mtime_ns` from the index's notes table, which the
recency decay reads.

Closes #197.

Co-Authored-By: Claude Opus 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@CryptoJones, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8b0f9ba4-f394-41f5-ac40-2acc7e10a8e9

📥 Commits

Reviewing files that changed from the base of the PR and between 99cde6b and 5190433.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • BACKLOG.md
  • CHANGELOG.md
  • README.md
  • pyproject.toml
  • src/omind/__init__.py
  • src/omind/cli.py
  • src/omind/graph.py
  • src/omind/searchindex.py
  • src/omind/server.py
  • tests/test_graph.py
  • tests/test_server.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@CryptoJones
CryptoJones merged commit f98936d into main Aug 2, 2026
16 checks passed
@CryptoJones
CryptoJones deleted the feat/graph-frontier branch August 2, 2026 11:41
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.

Graph: frontier/boundary scoring to rank what to consolidate next

1 participant