Documentation
¶
Index ¶
- type CapabilityList
- type CategoryFact
- type CoexistenceQueryAnswer
- type CoexistenceQueryFixture
- type ConflictingEnrichmentFact
- type DependencyQueryFixture
- type DependencyQueryResult
- type EdgeFact
- type EdgeKind
- type EmptyResultAnswer
- type EnrichmentFactStore
- func (s *EnrichmentFactStore) PersistApprovedExplorationFinding(approval ExplorationApproval, finding ExplorationFinding) (NodeFact, bool)
- func (s *EnrichmentFactStore) RecordUnpromotedExplorationFinding(category FactCategory, note string) UnpromotedExplorationAnswer
- func (s *EnrichmentFactStore) ReuseFreshEnrichment(query EquivalentQuery) EnrichmentReuseResult
- type EnrichmentReuseResult
- type EquivalentQuery
- type ExplorationApproval
- type ExplorationFinding
- type FactCategory
- type FactMetadata
- type FreshnessMetadata
- type ImpactQueryFixture
- type ImpactQueryResult
- type InferredImpactAnswer
- type InferredImpactFixture
- type LegacyDependencyRelationship
- type LegacyImpactRelationship
- type LegacyImpactSnapshot
- type NodeFact
- type NodeKind
- type QueryConfidenceAnswer
- func (a QueryConfidenceAnswer) AffectedEvidenceSource(source string) bool
- func (a QueryConfidenceAnswer) CategoryCheckedCompletely(category FactCategory) bool
- func (a QueryConfidenceAnswer) KnownFactExplained(category FactCategory) bool
- func (a QueryConfidenceAnswer) MissingNonCriticalCategory(category FactCategory) bool
- func (a QueryConfidenceAnswer) MissingRequiredCategory(category FactCategory) bool
- func (a QueryConfidenceAnswer) RequiredCategorySatisfied(category FactCategory) bool
- func (a QueryConfidenceAnswer) StaleFact(category FactCategory) bool
- type QueryConfidenceFixture
- type RouteHandlerOwnershipAnswer
- type RouteHandlerOwnershipFixture
- type TargetedExplorationProposal
- type TestUsageCoverageFixture
- type UnpromotedExplorationAnswer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapabilityList ¶
type CapabilityList struct {
Supported []string
}
CapabilityList describes the intentionally limited Phase 1 Common IR surface.
func Phase1Capabilities ¶
func Phase1Capabilities() CapabilityList
Phase1Capabilities returns the approved Phase 1 Common IR capability boundary.
func (CapabilityList) Claims ¶
func (c CapabilityList) Claims(capability string) bool
Claims reports whether the capability list explicitly claims a capability.
func (CapabilityList) Includes ¶
func (c CapabilityList) Includes(capability string) bool
Includes reports whether the capability list explicitly includes a capability.
type CategoryFact ¶
type CategoryFact struct {
Category FactCategory
Fresh bool
Confidence string
SourceFile string
RecordedFileHash string
CurrentFileHash string
SourceRange string
ExtractorName string
ExtractorVersion string
}
CategoryFact is the minimal observable category status used for answer confidence gating.
func (CategoryFact) SourceFileHashChanged ¶
func (f CategoryFact) SourceFileHashChanged() bool
SourceFileHashChanged reports whether current source freshness invalidates the recorded fact hash.
type CoexistenceQueryAnswer ¶
type CoexistenceQueryAnswer struct {
LegacyBackedEvidence []LegacyDependencyRelationship
IRBackedEvidence []EdgeFact
LowLevelGraphToolsUsable bool
ClaimsFullReplacement bool
}
CoexistenceQueryAnswer keeps prior runtime evidence and new IR evidence distinguishable in one answer.
func AnswerCoexistingRuntimeAndIRFacts ¶
func AnswerCoexistingRuntimeAndIRFacts(fixture CoexistenceQueryFixture) CoexistenceQueryAnswer
AnswerCoexistingRuntimeAndIRFacts labels legacy-backed and IR-backed evidence separately without replacing low-level graph behavior.
func (CoexistenceQueryAnswer) IREvidenceLabeled ¶
func (a CoexistenceQueryAnswer) IREvidenceLabeled(id string) bool
IREvidenceLabeled reports whether IR-backed evidence remains explicitly separated from legacy evidence.
func (CoexistenceQueryAnswer) LegacyEvidenceLabeled ¶
func (a CoexistenceQueryAnswer) LegacyEvidenceLabeled(dependencyID string) bool
LegacyEvidenceLabeled reports whether legacy-backed evidence remains explicitly separated from IR evidence.
type CoexistenceQueryFixture ¶
type CoexistenceQueryFixture struct {
SubjectID string
LegacyFacts []LegacyDependencyRelationship
IRFacts []EdgeFact
}
CoexistenceQueryFixture describes legacy runtime graph facts and additive Common IR facts relevant to one query.
type ConflictingEnrichmentFact ¶
ConflictingEnrichmentFact keeps a non-authoritative enrichment conflict visible to callers.
type DependencyQueryFixture ¶
type DependencyQueryFixture struct {
SubjectID string
LegacyRelationships []LegacyDependencyRelationship
AdditiveIRFacts []EdgeFact
}
DependencyQueryFixture describes the minimal legacy plus additive IR facts for a dependency query.
type DependencyQueryResult ¶
type DependencyQueryResult struct {
LegacyRelationships []LegacyDependencyRelationship
AdditiveIRFacts []EdgeFact
}
DependencyQueryResult is the observable compatibility result for dependency queries after IR support is enabled.
func RunDependencyQueryWithIRSupport ¶
func RunDependencyQueryWithIRSupport(fixture DependencyQueryFixture) DependencyQueryResult
RunDependencyQueryWithIRSupport preserves pre-IR dependency relationships and returns additive IR facts separately.
func (DependencyQueryResult) IRFact ¶
func (r DependencyQueryResult) IRFact(id string) (EdgeFact, bool)
IRFact returns an additive IR-backed fact by stable ID.
func (DependencyQueryResult) IncludesDependency ¶
func (r DependencyQueryResult) IncludesDependency(dependencyID string) bool
IncludesDependency reports whether the compatibility result still returns a legacy dependency.
func (DependencyQueryResult) LegacyRelationshipRemovedOrHidden ¶
func (r DependencyQueryResult) LegacyRelationshipRemovedOrHidden(dependencyID string) bool
LegacyRelationshipRemovedOrHidden reports whether a legacy dependency was absent from visible results.
type EdgeFact ¶
type EdgeFact struct {
ID string
SourceID string
TargetID string
Kind EdgeKind
Metadata FactMetadata
}
EdgeFact is the observable Common IR shape for a typed relationship fact.
func InspectCommonIRRelationships ¶
InspectCommonIRRelationships returns the observable edge facts for Common IR inspection.
func ValidFactForEachRequiredEdgeKind ¶
func ValidFactForEachRequiredEdgeKind() []EdgeFact
ValidFactForEachRequiredEdgeKind returns one observable fact for every Phase 1 edge kind.
type EdgeKind ¶
type EdgeKind string
EdgeKind identifies a framework-neutral Phase 1 Common IR relationship category.
const ( EdgeKindHandledBy EdgeKind = "HANDLED_BY" EdgeKindCalls EdgeKind = "CALLS" EdgeKindUsesSchema EdgeKind = "USES_SCHEMA" EdgeKindHasField EdgeKind = "HAS_FIELD" EdgeKindProducesSideEffect EdgeKind = "PRODUCES_SIDE_EFFECT" EdgeKindCoveredByTest EdgeKind = "COVERED_BY_TEST" EdgeKindReadsConfig EdgeKind = "READS_CONFIG" EdgeKindGeneratesArtifact EdgeKind = "GENERATES_ARTIFACT" EdgeKindDependsOn EdgeKind = "DEPENDS_ON" EdgeKindImpacts EdgeKind = "IMPACTS" )
type EmptyResultAnswer ¶
type EmptyResultAnswer struct {
CategoryStatus map[FactCategory]string
NegativeClaimed bool
SuggestedNextAction string
ExplorationApprovalGuidance string
}
EmptyResultAnswer reports why an empty result is not necessarily a known-empty claim.
func AnswerTestUsageCoverageForSchema ¶
func AnswerTestUsageCoverageForSchema(fixture TestUsageCoverageFixture) EmptyResultAnswer
AnswerTestUsageCoverageForSchema distinguishes unavailable TestUsage coverage from a supported negative claim.
func (EmptyResultAnswer) ReportsCategoryAs ¶
func (a EmptyResultAnswer) ReportsCategoryAs(category FactCategory, status string) bool
ReportsCategoryAs reports whether an empty result disclosed a category status explicitly.
type EnrichmentFactStore ¶
type EnrichmentFactStore struct {
// contains filtered or unexported fields
}
EnrichmentFactStore is the minimal graph-boundary store for exploration-enriched Common IR facts.
func NewEnrichmentFactStore ¶
func NewEnrichmentFactStore() *EnrichmentFactStore
NewEnrichmentFactStore returns an empty typed enrichment fact store.
func (*EnrichmentFactStore) PersistApprovedExplorationFinding ¶
func (s *EnrichmentFactStore) PersistApprovedExplorationFinding(approval ExplorationApproval, finding ExplorationFinding) (NodeFact, bool)
PersistApprovedExplorationFinding stores an approved exploration finding as typed Common IR enrichment.
func (*EnrichmentFactStore) RecordUnpromotedExplorationFinding ¶
func (s *EnrichmentFactStore) RecordUnpromotedExplorationFinding(category FactCategory, note string) UnpromotedExplorationAnswer
RecordUnpromotedExplorationFinding keeps an untyped or evidence-free exploration statement out of graph truth.
func (*EnrichmentFactStore) ReuseFreshEnrichment ¶
func (s *EnrichmentFactStore) ReuseFreshEnrichment(query EquivalentQuery) EnrichmentReuseResult
ReuseFreshEnrichment returns matching fresh enrichment facts for equivalent queries without rerunning exploration.
type EnrichmentReuseResult ¶
EnrichmentReuseResult reports whether a later query reused fresh enrichment instead of repeating exploration.
func (EnrichmentReuseResult) ReusedFreshFact ¶
func (r EnrichmentReuseResult) ReusedFreshFact(id string) bool
ReusedFreshFact reports whether a later equivalent query reused the named fresh enrichment fact.
type EquivalentQuery ¶
type EquivalentQuery struct {
RequiredCategories []FactCategory
}
EquivalentQuery describes a later query whose required categories may be answered from fresh enrichment.
type ExplorationApproval ¶
ExplorationApproval records explicit user approval for a bounded targeted exploration scope.
type ExplorationFinding ¶
type ExplorationFinding struct {
Category FactCategory
Node NodeFact
Note string
}
ExplorationFinding carries a typed fact discovered by approved targeted exploration.
type FactCategory ¶
type FactCategory string
FactCategory identifies the fact groups a query needs for conservative answer gating.
const ( FactCategoryRoute FactCategory = "route" FactCategoryHandler FactCategory = "handler" FactCategoryDependency FactCategory = "dependency" FactCategorySchema FactCategory = "schema" FactCategorySideEffect FactCategory = "side_effect" FactCategoryTestCoverage FactCategory = "test_coverage" FactCategoryArtifact FactCategory = "artifact" )
type FactMetadata ¶
type FactMetadata struct {
Origin string
Confidence string
Freshness FreshnessMetadata
ExtractorName string
ExtractorVersion string
SourceFile string
EvidenceSnippet string
LastSeenAt string
Language string
Framework string
Unknowns map[string]string
}
FactMetadata exposes the trust metadata required for every Common IR fact.
type FreshnessMetadata ¶
FreshnessMetadata carries the MVP freshness fields for a fact.
type ImpactQueryFixture ¶
type ImpactQueryFixture struct {
ChangedSubjectID string
LegacyImpacts []LegacyImpactRelationship
}
ImpactQueryFixture describes the minimal legacy facts for an impact query.
type ImpactQueryResult ¶
type ImpactQueryResult struct {
LegacyImpacts []LegacyImpactRelationship
}
ImpactQueryResult is the observable compatibility result for impact queries after IR support is enabled.
func RunImpactQueryWithIRSupport ¶
func RunImpactQueryWithIRSupport(fixture ImpactQueryFixture) ImpactQueryResult
RunImpactQueryWithIRSupport preserves pre-IR impact relationships through migration or compatibility wrapping.
func (ImpactQueryResult) IncludesImpactedSubject ¶
func (r ImpactQueryResult) IncludesImpactedSubject(subjectID string) bool
IncludesImpactedSubject reports whether the compatibility result still returns a legacy impacted subject.
func (ImpactQueryResult) LegacyImpact ¶
func (r ImpactQueryResult) LegacyImpact(stableID string) (LegacyImpactRelationship, bool)
LegacyImpact returns a migrated or compatibility-backed legacy impact by stable ID.
type InferredImpactAnswer ¶
type InferredImpactAnswer struct {
Impact EdgeFact
GraphEvidence []EdgeFact
AuthoritativeDeterministicImpact EdgeFact
DeterministicFactOverridden bool
}
InferredImpactAnswer reports an inferred impact without allowing it to override deterministic facts.
func AnswerInferredImpactRelationship ¶
func AnswerInferredImpactRelationship(fixture InferredImpactFixture) InferredImpactAnswer
AnswerInferredImpactRelationship returns graph-reasoned impact facts as inferred and keeps conflicting deterministic facts authoritative.
func (InferredImpactAnswer) GraphEvidenceUsed ¶
func (a InferredImpactAnswer) GraphEvidenceUsed(id string) bool
GraphEvidenceUsed reports whether a derived impact answer exposed the named graph evidence fact.
type InferredImpactFixture ¶
type InferredImpactFixture struct {
DerivedImpact EdgeFact
GraphEvidence []EdgeFact
ConflictingDeterministicImpact EdgeFact
}
InferredImpactFixture carries a graph-reasoned impact and the evidence used to derive it.
type LegacyDependencyRelationship ¶
type LegacyDependencyRelationship struct {
SubjectID string
DependencyID string
DependencyLbl string
Hidden bool
}
LegacyDependencyRelationship carries a pre-IR dependency edge through the IR compatibility boundary.
type LegacyImpactRelationship ¶
type LegacyImpactRelationship struct {
StableID string
ChangedID string
ImpactedID string
ImpactedLbl string
SourceEvidence string
Metadata FactMetadata
Hidden bool
}
LegacyImpactRelationship carries a pre-IR impact edge through the IR compatibility boundary.
func RehydrateLegacyImpactRelationship ¶
func RehydrateLegacyImpactRelationship(snapshot LegacyImpactSnapshot) LegacyImpactRelationship
RehydrateLegacyImpactRelationship wraps legacy impact data without dropping available identifiers, labels, evidence, or relationships.
type LegacyImpactSnapshot ¶
type LegacyImpactSnapshot struct {
StableID string
ChangedSubject string
ImpactedSubject string
ImpactedLabel string
SourceEvidence string
}
LegacyImpactSnapshot carries the legacy fields available before IR migration or compatibility wrapping.
type NodeFact ¶
type NodeFact struct {
ID string
Kind NodeKind
Label string
Metadata FactMetadata
}
NodeFact is the observable Common IR shape for a typed node fact.
func InspectCommonIRNodes ¶
InspectCommonIRNodes returns the observable node facts for Common IR inspection.
func ValidFactForEachRequiredNodeKind ¶
func ValidFactForEachRequiredNodeKind() []NodeFact
ValidFactForEachRequiredNodeKind returns one observable fact for every Phase 1 node kind.
type NodeKind ¶
type NodeKind string
NodeKind identifies a framework-neutral Phase 1 Common IR node category.
const ( NodeKindRoute NodeKind = "Route" NodeKindHTTPCall NodeKind = "HttpCall" NodeKindSchema NodeKind = "Schema" NodeKindSchemaField NodeKind = "SchemaField" NodeKindSideEffect NodeKind = "SideEffect" NodeKindTestUsage NodeKind = "TestUsage" NodeKindConfigBinding NodeKind = "ConfigBinding" NodeKindArtifact NodeKind = "Artifact" )
type QueryConfidenceAnswer ¶
type QueryConfidenceAnswer struct {
GraphBacked bool
ExplorationNeeded bool
ExplorationApprovalRequired bool
ExplorationState string
SatisfiedCategories []FactCategory
KnownCategories []FactCategory
MissingRequiredCategories []FactCategory
MissingNonCriticalCategories []FactCategory
CompletelyCheckedCategories []FactCategory
StaleCategories []FactCategory
AffectedEvidenceSources []string
}
QueryConfidenceAnswer is the observable result of conservative answer gating.
func AnswerQueryWithConfidenceGate ¶
func AnswerQueryWithConfidenceGate(fixture QueryConfidenceFixture) QueryConfidenceAnswer
AnswerQueryWithConfidenceGate presents a graph-backed answer only when all required categories are fresh and high-confidence.
func (QueryConfidenceAnswer) AffectedEvidenceSource ¶
func (a QueryConfidenceAnswer) AffectedEvidenceSource(source string) bool
AffectedEvidenceSource reports whether the answer identified the source file or evidence source affected by staleness.
func (QueryConfidenceAnswer) CategoryCheckedCompletely ¶
func (a QueryConfidenceAnswer) CategoryCheckedCompletely(category FactCategory) bool
CategoryCheckedCompletely reports whether the answer claims complete coverage for a category.
func (QueryConfidenceAnswer) KnownFactExplained ¶
func (a QueryConfidenceAnswer) KnownFactExplained(category FactCategory) bool
KnownFactExplained reports whether a partial answer disclosed an already-known fact category.
func (QueryConfidenceAnswer) MissingNonCriticalCategory ¶
func (a QueryConfidenceAnswer) MissingNonCriticalCategory(category FactCategory) bool
MissingNonCriticalCategory reports whether a graph-backed answer disclosed a missing non-critical category.
func (QueryConfidenceAnswer) MissingRequiredCategory ¶
func (a QueryConfidenceAnswer) MissingRequiredCategory(category FactCategory) bool
MissingRequiredCategory reports whether a partial answer disclosed a missing required category.
func (QueryConfidenceAnswer) RequiredCategorySatisfied ¶
func (a QueryConfidenceAnswer) RequiredCategorySatisfied(category FactCategory) bool
RequiredCategorySatisfied reports whether an answer identified the required category as satisfied.
func (QueryConfidenceAnswer) StaleFact ¶
func (a QueryConfidenceAnswer) StaleFact(category FactCategory) bool
StaleFact reports whether a required fact category was disclosed as stale.
type QueryConfidenceFixture ¶
type QueryConfidenceFixture struct {
RequiredCategories []FactCategory
NonCriticalCategories []FactCategory
Facts []CategoryFact
}
QueryConfidenceFixture describes the required category facts for a query answer.
type RouteHandlerOwnershipAnswer ¶
type RouteHandlerOwnershipAnswer struct {
AuthoritativeHandlerID string
ConflictingEnrichments []ConflictingEnrichmentFact
EnrichmentDeleted bool
EnrichmentTrustedAsAuthoritative bool
}
RouteHandlerOwnershipAnswer reports the authoritative handler and any visible enrichment conflicts.
func AnswerRouteHandlerOwnership ¶
func AnswerRouteHandlerOwnership(fixture RouteHandlerOwnershipFixture) RouteHandlerOwnershipAnswer
AnswerRouteHandlerOwnership selects fresh deterministic route ownership over conflicting enrichment.
func (RouteHandlerOwnershipAnswer) ConflictingEnrichment ¶
func (a RouteHandlerOwnershipAnswer) ConflictingEnrichment(id string) (ConflictingEnrichmentFact, bool)
ConflictingEnrichment reports whether a conflicting enrichment fact remains visible by stable ID.
type RouteHandlerOwnershipFixture ¶
type RouteHandlerOwnershipFixture struct {
RouteID string
DeterministicHandler EdgeFact
EnrichedHandler EdgeFact
}
RouteHandlerOwnershipFixture carries competing handler facts for one route ownership answer.
type TargetedExplorationProposal ¶
type TargetedExplorationProposal struct {
KnownCategories []FactCategory
MissingCategories []FactCategory
StaleCategories []FactCategory
NeedReason string
TargetedScope string
ExplorationRun bool
EnrichmentWriteOccurred bool
}
TargetedExplorationProposal is the pre-approval explanation for token-spending exploration.
func ProposeTargetedExploration ¶
func ProposeTargetedExploration(fixture QueryConfidenceFixture) TargetedExplorationProposal
ProposeTargetedExploration explains the known graph facts and smallest visible gap without running exploration.
func (TargetedExplorationProposal) KnownFactExplained ¶
func (p TargetedExplorationProposal) KnownFactExplained(category FactCategory) bool
KnownFactExplained reports whether an exploration proposal disclosed an already-known fact category.
type TestUsageCoverageFixture ¶
TestUsageCoverageFixture describes a schema coverage query over indexed TestUsage facts.
type UnpromotedExplorationAnswer ¶
type UnpromotedExplorationAnswer struct {
Category FactCategory
UnpersistedLimitations []string
GraphBacked bool
SatisfiedCategories []FactCategory
}
UnpromotedExplorationAnswer reports an approved exploration statement that was not promoted to graph truth.
func (UnpromotedExplorationAnswer) RequiredCategorySatisfied ¶
func (a UnpromotedExplorationAnswer) RequiredCategorySatisfied(category FactCategory) bool
RequiredCategorySatisfied reports whether an unpromoted statement satisfied a high-confidence required category.
func (UnpromotedExplorationAnswer) UnpersistedLimitationMentioned ¶
func (a UnpromotedExplorationAnswer) UnpersistedLimitationMentioned(note string) bool
UnpersistedLimitationMentioned reports whether an unpromoted statement is visible only as a limitation or note.