fallback

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

@index Suspect fallback call-edge analysis based on overlapping annotation vocabulary between source and target nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Page paging.Request
}

@intent carry bounded pagination inputs for suspect fallback analysis.

type Result

type Result struct {
	Items      []SuspectEdge
	Pagination paging.Page
}

Result carries one suspect fallback edge page plus pagination metadata. @intent let callers expose bounded fallback suspect responses while preserving legacy fields.

type Service

type Service struct {
	// contains filtered or unexported fields
}

@intent bundle graph DB and annotation-store access needed to detect low-confidence fallback edges.

func New

func New(db *gorm.DB, graphStore store.GraphStore) *Service

@intent construct the suspect fallback analyzer from the active graph DB and annotation-capable store.

func (*Service) FindSuspects

func (s *Service) FindSuspects(ctx context.Context, opts Options) ([]SuspectEdge, error)

@intent report fallback call edges whose source and target annotations share no intent or domain-rule vocabulary. @param ctx carries the namespace that ctxns.FromContext uses to scope analysis. @param opts carries pagination bounds for the returned suspect edge window. @return returns suspect edges sorted by source qualified name and then target qualified name. @domainRule exclude an edge from suspect results as soon as source and target share any intent/domainRule token. @see mcp.handlers.findSuspectFallbackEdges

func (*Service) FindSuspectsPage

func (s *Service) FindSuspectsPage(ctx context.Context, opts Options) (Result, error)

FindSuspectsPage reports suspect fallback call edges and returns one bounded page. @intent bound fallback suspect analysis before annotation lookups so large graphs cannot expand unbounded responses. @domainRule fetch limit+offset+1 fallback edges before suspect filtering; paging bounds the scanned fallback-edge window, so returned suspect items may be fewer than limit while HasMore still reflects additional fallback edges beyond that window.

type SuspectEdge

type SuspectEdge struct {
	Edge    model.Edge
	Source  model.Node
	Target  model.Node
	Suspect bool
}

@intent carry one fallback edge with its endpoint nodes and suspect classification for downstream reporting.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL