Skip to content

glove-parity: multi-hop questions over the software graph (D-SAG-1-4) - #1521

Closed
AdaWorldAPI wants to merge 6 commits into
mainfrom
ccr-9f3b8075-74u47l-hops
Closed

AdaWorldAPI wants to merge 6 commits into
mainfrom
ccr-9f3b8075-74u47l-hops

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Stacked on #1519; merge that first. Until it merges, this diff also shows #1519's commits.

What

SoftwareGraph::hops(start, path) follows a path of (relation, direction) hops through the software-awareness graph. Each hop returns a set: each node once, in node order.

This is the operator's reading of chained hops: the masks of one query fold into one materialisation, and each hop is filtered at the source.

  • Each hop is one Quack program over the edge lanes already in memory: rel = R AND from IN (S), keeping its rows.
  • The previous hop's results arrive as a value set (Filter::in_u32), sized by those results and read from the other end of the kept rows. No hop reads a plane another program produced, so the chained-mask shape the repo forbids (Quack Filter::Semijoin's precondition) is never used.
  • An empty set ends the walk without running a program.
  • An unknown start node is an error, never an empty answer.

This unblocks the multi-hop questions D-SAG-1 had to leave open: who else reads a field this method reads, which claims stand behind its fields, and which programs share primitives.

Evidence

tests/awareness.rs checks four paths of up to four hops against a row loop over the edges:

  • co-readers;
  • field → claim;
  • a four-hop claim co-dependency;
  • a four-hop shared-primitive path.

A second test checks that a hop path follows a reprojection, which depends on #1519's fix for defect A.

Each of these four disable runs turns the tests red:

  1. the relation filter dropped;
  2. the direction ignored;
  3. the per-hop deduplication dropped;
  4. an unknown start silently ignored.

Gates: cargo test and cargo clippy --all-targets -D warnings pass for the crate; cargo fmt is clean.

Still open

A value set still reads every edge row. Skipping straight to the rows of the previous hop's results needs either:

  • a Lance B-tree filter() (D-TELEPORT-2, arm Db), or
  • row ranges over a projection sorted by key, which waits on ISS-WITNESSED-RANGE-DOES-NOT-ATTEST-PLANE-ORDER.

Also in this push: the entries index row for #1519's D-SAG-1R entry is regenerated. --write keeps an existing row's id, so the retitled entry still read as D-SAG-1. The same fix is on #1519.

🤖 Generated with Claude Code

https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh


Generated by Claude Code

Defect A (#1510): link() deduplicated edges on (src, rel, dst, tier), so a
fact two methods share was owned by whichever wrote it first; when that
method stopped reading the field its reprojection retracted the fact for
everyone. ctx is now part of the key, and out()/capability() read facts
once however many contexts wrote them.

Defect B (#1510): project_compute never retracted the DAG it replaced, so
a cyclic-then-acyclic reprojection kept the ComputeCycle refusal and the
stale ComputesFrom edges. It now retracts its own class's compute edges
and cycle verdict first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
The entries index takes the first id in the heading, so the entry read as
a second D-SAG-1 and the structural check refused the duplicate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
SoftwareGraph::hops(start, path) walks a path of (relation, direction)
hops, set semantics per hop. Each hop is one Quack program over the
resident edge lanes, rel = R AND from IN (S), keeping its rows; the
previous hop's survivors reach it as a value set the size of those
survivors, read from the kept rows' other end. No hop reads a plane
another program produced. An unknown start node is an error, never an
empty answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
--write keeps an existing row's id, so the retitled entry still read as
D-SAG-1; the row is regenerated from the heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


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

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.

2 participants