feat(runtime): contextual get_fragments — base set + 1-hop guidance horizon - #43
Open
joelgwebber wants to merge 1 commit into
Open
feat(runtime): contextual get_fragments — base set + 1-hop guidance horizon#43joelgwebber wants to merge 1 commit into
joelgwebber wants to merge 1 commit into
Conversation
…orizon (sites-90dc) get_fragments returned only the current view's tools. It now also returns the 1-hop horizon: tools one navigation away, reached via the current view's tools' guidance graph (Suggestion[]), so an agent can pre-compose the next step instead of hitting a hard cut at the view boundary. Each fragment carries view (owning tool's view) and distance (0 = here, 1 = one hop). Reachability rides per-tool guidance only; one hop deliberately (deeper is journey territory). New scopedFragments(ir, path) in the executor (pure, testable); boot's currentFragments delegates to it. projectFragments now also tags each fragment with its owning tool's view. 67 runtime tests (scopedFragments base/horizon/distance + a get_fragments horizon test added). Stacks on #41. Signed-off-by: Joel Webber <joel@fullstory.com>
joelgwebber
force-pushed
the
feat/fragment-horizon
branch
from
September 12, 2026 00:42
446d807 to
ea7b61a
Compare
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.
Stacked on #41 (A + B-lite). This is C of the exec-actions decomposition (sites-10b3, sites-90dc).
What
get_fragmentsreturned only the tools offered on the current view. It now also returns the 1-hop horizon — the tools one navigation away, reached via the current view's tools'guidancegraph — so an agent can pre-compose the next step instead of hitting a hard cut at the view boundary.Each fragment is tagged:
view— its owning tool's view (state-independent provenance).distance— 0 = a tool on the current view, 1 = a tool one navigation away.Reachability rides the per-tool
guidance(Suggestion[]) only and stops at one hop deliberately (deeper is journey territory); we do not pull the journey graph into the IR. get_fragments is intentionally broader than the registered tool set — the horizon isn't registered yet, but surfacing it is the point.How
scopedFragments(ir, path)in the executor: base = tools whoseensure_viewmatches the path (plus view-agnostic tools) at distance 0; horizon = their guidance targets not already in the base, at distance 1.boot'scurrentFragmentsdelegates to it.projectFragmentsalso tags each fragment with its owning tool'sview.Tests
67 runtime tests. New
scopedFragmentstests cover base-at-0 / horizon-at-1 / 2-hop exclusion / no double-emit; theget_fragmentsmeta-tool test now asserts a guided tool surfaces on the prior view at distance 1.Decisions locked with @joelgwebber: guidance adjacency is enough (no journey graph in the IR); get_fragments broader than the registered set; one hop only. Follows sites-90dc.