Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyAlertObservation(state AlertState, report Report, opts AlertOptions) (AlertState, AlertDecision, error)
- func DurationAllowance(durations []time.Duration) (time.Duration, DurationAllowanceSource, Confidence)
- func ExitCode(report Report) int
- func FinalizeReport(report *Report)
- func FreshnessDeadline(profile Profile, syncInterval, standardInterval time.Duration) time.Duration
- func HasExecutor(id CheckID) bool
- func HashUpstreamFeedIdentity(feedKey, identity string) (string, error)
- func HashUpstreamIdentity(source Source, identity string) (string, error)
- func Overall(checks []Check) (Status, Confidence)
- func ParseDuration(value string) (time.Duration, error)
- func SchedulerThresholds(interval, jitter, allowance time.Duration) (time.Duration, time.Duration)
- func ValidateAlertState(state AlertState) error
- func ValidateEvidence(id CheckID, evidence Evidence) error
- func ValidateReport(report Report) error
- type AlertChange
- type AlertDecision
- type AlertOptions
- type AlertResolutionReason
- type AlertState
- type ArchiveLister
- type ArchiveObject
- type ArchivedMediaRecord
- type Boundary
- type Category
- type Check
- type CheckAlertState
- type CheckID
- type Confidence
- type DatabaseInspection
- type DatabaseInspector
- type DeepArchiveReader
- type DeepArchiveResult
- type DeepArchiveVerifier
- type DeepDependencies
- type DeepLimits
- type DeepMediaInventory
- type Dependencies
- type DurationAllowanceSource
- type ErrorCode
- type Evidence
- type EvidenceKind
- type Features
- type Freshness
- type FreshnessReason
- type FreshnessStatus
- type InventoryBudget
- type InventoryResult
- type KindPartition
- type MediaArchiveInspector
- type MediaInventoryObject
- type MediaInventoryPage
- type MediaLocalEvidence
- type MediaSample
- type MetricsReader
- type OKFInspection
- type OKFInspector
- type ObjectMetadata
- type PipelineEvidence
- type PipelineStage
- type PresentedReport
- type Profile
- type ProfileAlertState
- type ProvenanceEvidence
- type RegistryEntry
- type Report
- type ReportReader
- type ReportStore
- func (s *ReportStore) History(profile Profile, limit int) ([]Report, error)
- func (s *ReportStore) Latest(profile Profile) (*Report, error)
- func (s *ReportStore) LoadAlertState() (AlertState, error)
- func (s *ReportStore) Save(report Report) error
- func (s *ReportStore) SaveAlertState(state AlertState) error
- type Request
- type RequiredCondition
- type RequiredStatusCounts
- type RuntimeVersion
- type SQLiteArchiveListing
- type Scope
- type SemanticAuditSnapshot
- type SemanticBackend
- type SemanticErrorCode
- type SemanticGenerationIdentifier
- type SemanticIdentifier
- type SemanticInspector
- type SemanticProfileIdentifier
- type SemanticReadiness
- type SemanticRefreshSnapshot
- type SemanticRefreshState
- type SemanticStage
- type SemanticStageSnapshot
- type SemanticStageStatus
- type SkipReason
- type Source
- type Status
- type StatusCounts
- type StoreSnapshot
- type Summary
- type Threshold
- type TimeoutClass
- type UpstreamInventories
- type UpstreamInventory
- type Webhook
- type WebhookConfig
Constants ¶
const ( DefaultDeepMaxArchiveBytes int64 = 20 << 30 DefaultDeepMaxDatabaseBytes int64 = 100 << 30 DefaultDeepMaxTempBytes int64 = 120 << 30 DeepMaxObjects = 1_000_000 DeepMaxPages = 10_000 DeepMaxConcurrency = 8 )
const ( FreshnessCurrent FreshnessStatus = "current" FreshnessUnknown FreshnessStatus = "unknown" FreshnessNotFound FreshnessReason = "not_found" FreshnessStale FreshnessReason = "stale" )
const ( MaxDailyEvidence = 366 MaxByKindEvidence = 64 MaxMissingFields = 32 )
const ( DefaultPendingWarn = 24 * time.Hour DefaultPendingFail = 72 * time.Hour DefaultBackupWarn = 36 * time.Hour DefaultBackupFail = 72 * time.Hour )
const ( SchemaV1 = "dbrain.audit.v1" SchemaV2 = "dbrain.audit.v2" )
const ( InventoryMaxIdentities = 100_000 InventoryMaxPages = 10_000 )
const AlertStateSchemaV1 = "dbrain.audit.alert-state.v1"
const MaxWebhookBytes int64 = 64 << 10
Variables ¶
var ( ErrDeepProfileRequired = errors.New("deep audit entry point requires deep profile") ErrDeepBudget = errors.New("deep audit budget exhausted") ErrDeepInterrupted = errors.New("deep audit interrupted") ErrDeepCandidateInvalid = errors.New("deep archive candidate invalid") ErrDeepListingIncomplete = errors.New("deep inventory listing incomplete") )
var ( ErrInventoryInvalid = errors.New("upstream inventory result invalid") ErrInventoryIncomplete = errors.New("upstream inventory traversal incomplete") ErrInventoryBudget = errors.New("upstream inventory budget exhausted") )
var ErrDeepUnsupported = errors.New("deep audit requires the explicit RunDeep CLI --profile deep entry point")
Functions ¶
func ApplyAlertObservation ¶
func ApplyAlertObservation(state AlertState, report Report, opts AlertOptions) (AlertState, AlertDecision, error)
func DurationAllowance ¶
func DurationAllowance(durations []time.Duration) (time.Duration, DurationAllowanceSource, Confidence)
func FinalizeReport ¶
func FinalizeReport(report *Report)
func FreshnessDeadline ¶
func HasExecutor ¶
func HashUpstreamFeedIdentity ¶
HashUpstreamFeedIdentity preserves feed identity evolution by binding an entry identity (guid:, link:, or stored identity_key) to its feed key.
func HashUpstreamIdentity ¶
HashUpstreamIdentity produces a content-free, source-domain-separated value suitable for local set membership. The raw identity is never report evidence.
func Overall ¶
func Overall(checks []Check) (Status, Confidence)
func SchedulerThresholds ¶
func ValidateAlertState ¶
func ValidateAlertState(state AlertState) error
func ValidateEvidence ¶
func ValidateReport ¶
Types ¶
type AlertChange ¶
type AlertChange struct {
CheckID CheckID `json:"check_id"`
Status Status `json:"status"`
Summary string `json:"summary"`
Reason AlertResolutionReason `json:"reason,omitempty"`
}
type AlertDecision ¶
type AlertDecision struct {
Profile Profile `json:"profile"`
Notify bool `json:"notify"`
OverallRecovery bool `json:"overall_recovery"`
Changes []AlertChange `json:"changes"`
}
type AlertOptions ¶
type AlertResolutionReason ¶
type AlertResolutionReason string
const AlertResolvedByConfiguration AlertResolutionReason = "resolved_by_configuration"
type AlertState ¶
type AlertState struct {
Schema string `json:"schema"`
Profiles map[Profile]ProfileAlertState `json:"profiles"`
}
func MarkAlertDelivered ¶
func MarkAlertDelivered(state AlertState, decision AlertDecision, deliveredAt time.Time) AlertState
type ArchiveLister ¶
type ArchiveLister interface {
List(context.Context) (SQLiteArchiveListing, error)
}
type ArchiveObject ¶
type ArchivedMediaRecord ¶
type Boundary ¶
type Boundary struct {
Layout string `json:"layout"`
ConfigVerified bool `json:"config_verified"`
DatabaseVerified bool `json:"database_verified"`
Version string `json:"version"`
Commit string `json:"commit"`
GitStatus string `json:"git_status"`
Platform string `json:"platform"`
SecurityBaseline string `json:"security_baseline"`
SecurityBaselineEpoch int `json:"security_baseline_epoch"`
SchemaVersion int `json:"schema_version"`
SchemaCompatibility string `json:"schema_compatibility"`
}
type Check ¶
type Check struct {
ID CheckID `json:"id"`
Category Category `json:"category"`
Status Status `json:"status"`
Confidence Confidence `json:"confidence"`
Required bool `json:"required"`
Summary string `json:"summary"`
ObservedAt time.Time `json:"observed_at"`
Threshold *Threshold `json:"threshold,omitempty"`
Evidence Evidence `json:"evidence"`
Remediation string `json:"remediation,omitempty"`
SkipReason SkipReason `json:"skip_reason,omitempty"`
ErrorCode ErrorCode `json:"error_code,omitempty"`
}
type CheckAlertState ¶
type CheckAlertState struct {
Confirmed Status `json:"confirmed,omitempty"`
Pending Status `json:"pending,omitempty"`
PendingCount int `json:"pending_count,omitempty"`
LastObserved Status `json:"last_observed,omitempty"`
Required bool `json:"required"`
LastNotifiedAt time.Time `json:"last_notified_at,omitempty"`
ResolutionReason AlertResolutionReason `json:"resolution_reason,omitempty"`
DeliveryPending bool `json:"delivery_pending,omitempty"`
}
type CheckID ¶
type CheckID string
const ( CheckBoundaryConfig CheckID = "boundary.config" CheckBoundaryRuntime CheckID = "boundary.runtime" CheckBoundarySecurityBaseline CheckID = "boundary.security_baseline" CheckBoundaryDatabase CheckID = "boundary.database" CheckIntegritySchemaIdentity CheckID = "integrity.schema_identity" CheckIntegrityMigrationCompatibility CheckID = "integrity.migration_compatibility" CheckIntegritySQLiteQuickCheck CheckID = "integrity.sqlite_quick_check" CheckIntegrityForeignKeys CheckID = "integrity.foreign_keys" CheckSchedulerLatestSync CheckID = "scheduler.latest_sync" CheckSchedulerStageCoverage CheckID = "scheduler.stage_coverage" CheckSchedulerContinuity CheckID = "scheduler.continuity" CheckMetricsWindow CheckID = "metrics.window" CheckImportsAppleNotesPoll CheckID = "imports.apple_notes.poll" CheckImportsAppleNotesArrivals CheckID = "imports.apple_notes.arrivals" CheckImportsSafariTabsPoll CheckID = "imports.safari_tabs.poll" CheckImportsSafariTabsArrivals CheckID = "imports.safari_tabs.arrivals" CheckImportsXBookmarksPoll CheckID = "imports.x_bookmarks.poll" CheckImportsXBookmarksArrivals CheckID = "imports.x_bookmarks.arrivals" CheckImportsGitHubStarsPoll CheckID = "imports.github_stars.poll" CheckImportsGitHubStarsArrivals CheckID = "imports.github_stars.arrivals" CheckImportsYouTubeLikedPoll CheckID = "imports.youtube_liked.poll" CheckImportsYouTubeLikedArrivals CheckID = "imports.youtube_liked.arrivals" CheckImportsYouTubeWatchLaterPoll CheckID = "imports.youtube_watch_later.poll" CheckImportsYouTubeWatchLaterArrivals CheckID = "imports.youtube_watch_later.arrivals" CheckImportsFeedsPoll CheckID = "imports.feeds.poll" CheckImportsFeedsArrivals CheckID = "imports.feeds.arrivals" CheckPipelineHydrationPartition CheckID = "pipeline.hydration.partition" CheckPipelineHydrationPendingAge CheckID = "pipeline.hydration.pending_age" CheckPipelineExtractionPartition CheckID = "pipeline.extraction.partition" CheckPipelineExtractionPendingAge CheckID = "pipeline.extraction.pending_age" CheckPipelineSummaryPartition CheckID = "pipeline.summary.partition" CheckPipelineSummaryPendingAge CheckID = "pipeline.summary.pending_age" CheckPipelineTranscriptionPartition CheckID = "pipeline.transcription.partition" CheckPipelineTranscriptionPendingAge CheckID = "pipeline.transcription.pending_age" CheckPipelineOCRPartition CheckID = "pipeline.ocr.partition" CheckPipelineOCRPendingAge CheckID = "pipeline.ocr.pending_age" CheckPipelineItemSummaryProvenance CheckID = "pipeline.item_summary.provenance" CheckPipelineItemOCRProvenance CheckID = "pipeline.item_ocr.provenance" CheckPipelineXMediaTranscriptProvenance CheckID = "pipeline.x_media_transcript.provenance" CheckPipelineSourceSummaryProvenance CheckID = "pipeline.source_summary.provenance" CheckDurabilityMediaLocalCoverage CheckID = "durability.media_local_coverage" CheckDurabilityMediaRemote CheckID = "durability.media_remote" CheckDurabilitySQLiteBackupConfiguration CheckID = "durability.sqlite_backup_configuration" CheckDurabilitySQLiteBackupAge CheckID = "durability.sqlite_backup_age" CheckDurabilityOKFFreshness CheckID = "durability.okf_freshness" CheckDurabilityOKFValidation CheckID = "durability.okf_validation" CheckUpstreamAppleNotesParity CheckID = "upstream.apple_notes.parity" CheckUpstreamSafariTabsParity CheckID = "upstream.safari_tabs.parity" CheckUpstreamXBookmarksParity CheckID = "upstream.x_bookmarks.parity" CheckUpstreamGitHubStarsParity CheckID = "upstream.github_stars.parity" CheckUpstreamYouTubeLikedParity CheckID = "upstream.youtube_liked.parity" CheckUpstreamYouTubeWatchLaterParity CheckID = "upstream.youtube_watch_later.parity" CheckUpstreamFeedsParity CheckID = "upstream.feeds.parity" CheckDurabilityMediaRemoteOnly CheckID = "durability.media_remote_only" CheckDurabilitySQLiteRestore CheckID = "durability.sqlite_restore" CheckSemanticCurrentReadiness CheckID = "semantic.current_readiness" CheckSemanticLatestAttachedRefresh CheckID = "semantic.latest_attached_refresh" CheckSemanticStageSummary CheckID = "semantic.stage_summary" )
type Confidence ¶
type Confidence string
const ( ConfidenceHigh Confidence = "high" ConfidenceModerate Confidence = "moderate" ConfidenceLow Confidence = "low" ConfidenceUnknown Confidence = "unknown" )
func (Confidence) Valid ¶
func (c Confidence) Valid() bool
type DatabaseInspection ¶
type DatabaseInspector ¶
type DatabaseInspector interface {
Inspect(context.Context, bool) (DatabaseInspection, error)
}
type DeepArchiveReader ¶
type DeepArchiveResult ¶
type DeepArchiveVerifier ¶
type DeepArchiveVerifier interface {
Verify(context.Context, io.ReadCloser, *vaultfs.PrivateTemp, DeepLimits) (DeepArchiveResult, error)
}
type DeepDependencies ¶
type DeepDependencies struct {
Archives DeepArchiveReader
VerifyArchive DeepArchiveVerifier
Media DeepMediaInventory
MediaErrorCode ErrorCode
NewTemp func() (*vaultfs.PrivateTemp, error)
CleanupTemp func(*vaultfs.PrivateTemp) error
RecordCleanupFailure func(string)
FreeSpace func(*vaultfs.PrivateTemp) (uint64, error)
Limits DeepLimits
Upstream UpstreamInventories
}
type DeepLimits ¶
type DeepLimits struct {
MaxArchiveBytes int64
MaxDatabaseBytes int64
MaxTempBytes int64
MaxObjects int
MaxPages int
MaxConcurrency int
RequestTimeout time.Duration
ReadIdleTimeout time.Duration
RunTimeout time.Duration
}
func DefaultDeepLimits ¶
func DefaultDeepLimits() DeepLimits
type DeepMediaInventory ¶
type Dependencies ¶
type Dependencies struct {
Features Features
Store StoreSnapshot
Database DatabaseInspector
Metrics MetricsReader
Archives ArchiveLister
Media MediaArchiveInspector
MediaErrorCode ErrorCode
OKF OKFInspector
Semantic SemanticInspector
Runtime RuntimeVersion
Clock func() time.Time
}
type DurationAllowanceSource ¶
type DurationAllowanceSource string
const ( DurationAllowanceP95 DurationAllowanceSource = "p95" DurationAllowanceMaxObserved DurationAllowanceSource = "max_observed" DurationAllowanceNone DurationAllowanceSource = "none" )
type ErrorCode ¶
type ErrorCode string
const ( ErrorTimeout ErrorCode = "timeout" ErrorCanceled ErrorCode = "canceled" ErrorInterrupted ErrorCode = "interrupted" ErrorRead ErrorCode = "read_error" ErrorParse ErrorCode = "parse_error" ErrorBudgetExhausted ErrorCode = "budget_exhausted" ErrorConfiguration ErrorCode = "configuration_error" ErrorCredentialResolution ErrorCode = "credential_resolution_error" ErrorDestinationRejected ErrorCode = "destination_rejected" ErrorListingIncomplete ErrorCode = "listing_incomplete" ErrorManifest ErrorCode = "manifest_error" ErrorDatabase ErrorCode = "database_error" )
type EvidenceKind ¶
type EvidenceKind string
const ( EvidenceInteger EvidenceKind = "integer" EvidenceBoolean EvidenceKind = "boolean" EvidenceTimestamp EvidenceKind = "timestamp" EvidenceEnum EvidenceKind = "enum" EvidenceDaily EvidenceKind = "daily" EvidenceByKind EvidenceKind = "by_kind" EvidenceMissingByField EvidenceKind = "missing_by_field" EvidenceIdentifier EvidenceKind = "identifier" EvidenceSemanticStages EvidenceKind = "semantic_stages" )
type Features ¶
type Features struct {
Layout string
ConfigSource string
ConfigVerified bool
DatabaseOpenedQueryOnly bool
SchedulerEnabled bool
SchedulerInterval time.Duration
SchedulerJitter time.Duration
SelectedStages []string
Sources map[Source]bool
Stages map[PipelineStage]bool
MediaLocalEnabled bool
MediaRemoteEnabled bool
MediaProvider string
SQLiteArchiveCapabilityConfigured bool
SQLiteBackupSchedulerEnabled bool
SQLiteBackupAuditRequired bool
SQLiteProviderConfigured bool
SQLiteCredentialConfigured bool
SQLiteResolutionError bool
OKFEnabled bool
// SemanticConfigured is intentionally separate from feature eligibility:
// semantic audit checks stay visible when disabled or unsupported.
SemanticConfigured bool
SemanticCapabilityAvailable bool
Timeouts map[TimeoutClass]time.Duration
RemoteRequestTimeout time.Duration
}
type Freshness ¶
type Freshness struct {
Status FreshnessStatus `json:"status"`
Reason FreshnessReason `json:"reason,omitempty"`
AgeSeconds *int64 `json:"age_seconds,omitempty"`
DeadlineSeconds int64 `json:"deadline_seconds"`
}
type FreshnessReason ¶
type FreshnessReason string
type FreshnessStatus ¶
type FreshnessStatus string
type InventoryBudget ¶
InventoryBudget is a fixed, caller-owned upper bound. Importer adapters may stop earlier, but cannot widen these ceilings.
func DefaultInventoryBudget ¶
func DefaultInventoryBudget() InventoryBudget
type InventoryResult ¶
InventoryResult intentionally contains no raw identities or source content. Complete is asserted only by the importer after observing its natural end.
type KindPartition ¶
type MediaArchiveInspector ¶
type MediaArchiveInspector interface {
HeadObject(context.Context, string) (ObjectMetadata, error)
}
type MediaInventoryObject ¶
type MediaInventoryPage ¶
type MediaInventoryPage struct {
Objects []MediaInventoryObject
NextToken string
Complete bool
}
type MediaLocalEvidence ¶
type MediaLocalEvidence struct{ EligibleLocalCount, UncoveredPrunedCount, OrphanCount int }
type MediaSample ¶
type MediaSample struct {
Records []ArchivedMediaRecord
RecentPopulation, RecentChecked, OlderPopulation, OlderChecked int
InvalidCount int
Mode string
Confidence Confidence
}
func SelectMediaSample ¶
func SelectMediaSample(records []ArchivedMediaRecord, since time.Duration, now time.Time, provider string) MediaSample
type MetricsReader ¶
type OKFInspection ¶
type OKFInspector ¶
type OKFInspector interface {
Inspect(context.Context, bool) (OKFInspection, error)
}
type ObjectMetadata ¶
type PipelineEvidence ¶
type PipelineStage ¶
type PipelineStage string
const ( PipelineHydration PipelineStage = "hydration" PipelineExtraction PipelineStage = "extraction" PipelineSummary PipelineStage = "summary" PipelineTranscription PipelineStage = "transcription" PipelineOCR PipelineStage = "ocr" )
type PresentedReport ¶
type PresentedReport struct {
Report *Report `json:"report"`
Freshness Freshness `json:"freshness"`
}
func PresentReport ¶
func PresentReport(report *Report, profile Profile, syncInterval, standardInterval time.Duration, now time.Time) PresentedReport
PresentReport adds non-persisted freshness metadata to an immutable exact- profile report. It never rewrites the report's health status.
type ProfileAlertState ¶
type ProfileAlertState struct {
Checks map[CheckID]CheckAlertState `json:"checks"`
}
type ProvenanceEvidence ¶
type RegistryEntry ¶
type RegistryEntry struct {
ID CheckID
Category Category
Source Source
Profiles []Profile
RequiredWhen RequiredCondition
Timeout TimeoutClass
EvidenceFields map[string]EvidenceKind
// contains filtered or unexported fields
}
func Lookup ¶
func Lookup(id CheckID) (RegistryEntry, bool)
func Registry ¶
func Registry() []RegistryEntry
func RegistryForSchema ¶ added in v0.8.8
func RegistryForSchema(schema string) ([]RegistryEntry, bool)
RegistryForSchema returns the exact registry valid for persisted reports of the supplied schema. V1 is frozen so old reports cannot acquire new checks.
func (RegistryEntry) InProfile ¶
func (e RegistryEntry) InProfile(profile Profile) bool
type Report ¶
type Report struct {
Schema string `json:"schema"`
AuditID string `json:"audit_id"`
Profile Profile `json:"profile"`
Scope Scope `json:"scope"`
StartedAt time.Time `json:"started_at"`
CompletedAt time.Time `json:"completed_at"`
Status Status `json:"status"`
Confidence Confidence `json:"confidence"`
Boundary Boundary `json:"boundary"`
Summary Summary `json:"summary"`
Checks []Check `json:"checks"`
}
func RunDeep ¶
func RunDeep(ctx context.Context, req Request, deps Dependencies, deep DeepDependencies) (Report, error)
type ReportReader ¶
type ReportReader struct {
// contains filtered or unexported fields
}
ReportReader exposes only exact-profile persisted report reads. Unlike ReportStore construction, it never creates directories, changes modes, or receives report/state write operations.
func NewReportReader ¶
func NewReportReader(logDir string) (*ReportReader, error)
type ReportStore ¶
type ReportStore struct {
// contains filtered or unexported fields
}
func NewReportStore ¶
func NewReportStore(logDir string) (*ReportStore, error)
func (*ReportStore) History ¶
func (s *ReportStore) History(profile Profile, limit int) ([]Report, error)
func (*ReportStore) LoadAlertState ¶
func (s *ReportStore) LoadAlertState() (AlertState, error)
func (*ReportStore) Save ¶
func (s *ReportStore) Save(report Report) error
func (*ReportStore) SaveAlertState ¶
func (s *ReportStore) SaveAlertState(state AlertState) error
type Request ¶
type Request struct {
Profile Profile
Since time.Duration
Categories []Category
Sources []Source
// SourceOverrides marks sources explicitly selected by a source-specific
// command. It grants parity inventory authority without pretending that the
// scheduler or configured source is enabled.
SourceOverrides []Source
CheckIDs []CheckID
ExpectCommit string
}
type RequiredCondition ¶
type RequiredCondition string
const ( RequiredAlways RequiredCondition = "always" RequiredNever RequiredCondition = "never" RequiredScheduler RequiredCondition = "scheduler_enabled" RequiredSourceScheduler RequiredCondition = "source_and_scheduler_enabled" RequiredSource RequiredCondition = "source_enabled_or_explicit" RequiredStage RequiredCondition = "stage_enabled" RequiredMediaLocal RequiredCondition = "media_local_enabled" RequiredMediaRemote RequiredCondition = "media_remote_enabled" RequiredSQLiteBackup RequiredCondition = "sqlite_backup_required" RequiredOKF RequiredCondition = "okf_enabled" RequiredSemantic RequiredCondition = "semantic_enabled_supported" )
func (RequiredCondition) Valid ¶
func (r RequiredCondition) Valid() bool
type RequiredStatusCounts ¶
type RuntimeVersion ¶
type SQLiteArchiveListing ¶
type SQLiteArchiveListing struct {
ConfigurationState string
Complete bool
Objects []ArchiveObject
}
type SemanticAuditSnapshot ¶ added in v0.8.8
type SemanticAuditSnapshot struct {
Configured, CapabilityAvailable bool
Backend SemanticBackend
ProfileID SemanticProfileIdentifier
ActiveGenerationID SemanticGenerationIdentifier
Readiness SemanticReadiness
DirtyParentCount int
PendingParentCount int
DueEmbeddingCount int
BlockedEmbeddingCount int
FailedEmbeddingCount int
IndexedVectorCount int
L0VectorCount int
TombstoneCount int
SegmentCount int
Latest SemanticRefreshSnapshot
}
type SemanticBackend ¶ added in v0.8.8
type SemanticBackend string
func (SemanticBackend) Valid ¶ added in v0.8.8
func (v SemanticBackend) Valid() bool
type SemanticErrorCode ¶ added in v0.8.8
type SemanticErrorCode string
func (SemanticErrorCode) Valid ¶ added in v0.8.8
func (v SemanticErrorCode) Valid() bool
type SemanticGenerationIdentifier ¶ added in v0.8.8
type SemanticGenerationIdentifier string
func (SemanticGenerationIdentifier) Valid ¶ added in v0.8.8
func (v SemanticGenerationIdentifier) Valid() bool
type SemanticIdentifier ¶ added in v0.8.8
type SemanticIdentifier string
func (SemanticIdentifier) Valid ¶ added in v0.8.8
func (v SemanticIdentifier) Valid() bool
Valid applies the same closed, content-free identifier boundary enforced for semantic evidence before adapters bind store values to audit snapshots.
type SemanticInspector ¶ added in v0.8.8
type SemanticInspector interface {
InspectAuditSemantic(context.Context) (SemanticAuditSnapshot, error)
}
SemanticInspector is the bounded query-only seam populated by the app adapter. It deliberately carries only evidence fields declared by the v2 registry; raw run IDs, paths, checkpoints, and error text do not cross it.
type SemanticProfileIdentifier ¶ added in v0.8.8
type SemanticProfileIdentifier string
func (SemanticProfileIdentifier) Valid ¶ added in v0.8.8
func (v SemanticProfileIdentifier) Valid() bool
type SemanticReadiness ¶ added in v0.8.8
type SemanticReadiness string
func (SemanticReadiness) Valid ¶ added in v0.8.8
func (v SemanticReadiness) Valid() bool
type SemanticRefreshSnapshot ¶ added in v0.8.8
type SemanticRefreshSnapshot struct {
State SemanticRefreshState
StartedAt, CompletedAt, FailureAt time.Time
Duration time.Duration
ErrorCode SemanticErrorCode
CountersComplete bool
ProjectedParentCount, EmbeddedChunkCount int
FlushedVectorCount, CompactedVectorCount, VerifiedVectorCount int
SuccessorRunCount int
Stages []SemanticStageSnapshot
}
type SemanticRefreshState ¶ added in v0.8.8
type SemanticRefreshState string
func (SemanticRefreshState) Valid ¶ added in v0.8.8
func (v SemanticRefreshState) Valid() bool
type SemanticStage ¶ added in v0.8.8
type SemanticStage string
func (SemanticStage) Valid ¶ added in v0.8.8
func (v SemanticStage) Valid() bool
type SemanticStageSnapshot ¶ added in v0.8.8
type SemanticStageSnapshot struct {
Stage SemanticStage
Status SemanticStageStatus
Duration time.Duration
}
type SemanticStageStatus ¶ added in v0.8.8
type SemanticStageStatus string
func (SemanticStageStatus) Valid ¶ added in v0.8.8
func (v SemanticStageStatus) Valid() bool
type SkipReason ¶
type SkipReason string
const ( SkipProfileExcluded SkipReason = "profile_excluded" SkipFeatureDisabled SkipReason = "feature_disabled" )
func (SkipReason) Valid ¶
func (s SkipReason) Valid() bool
type StatusCounts ¶
type StoreSnapshot ¶
type StoreSnapshot interface {
Pipeline(context.Context) (map[PipelineStage]PipelineEvidence, error)
Provenance(context.Context) ([]ProvenanceEvidence, error)
MediaLocal(context.Context) (MediaLocalEvidence, error)
ArchivedMedia(context.Context) ([]ArchivedMediaRecord, error)
CountLocalIdentityMatches(context.Context, Source, []string) (int, error)
}
type Summary ¶
type Summary struct {
All StatusCounts `json:"all"`
Required RequiredStatusCounts `json:"required"`
}
type TimeoutClass ¶
type TimeoutClass string
const ( TimeoutBootstrap TimeoutClass = "bootstrap" TimeoutLocalQuery TimeoutClass = "local_query" TimeoutMetricsOrManifest TimeoutClass = "metrics_or_manifest" TimeoutSQLiteOrOKFIntegrity TimeoutClass = "sqlite_or_okf_integrity" TimeoutRemoteMetadata TimeoutClass = "remote_metadata" TimeoutUpstreamInventory TimeoutClass = "upstream_inventory" TimeoutDeepStream TimeoutClass = "deep_stream" )
func (TimeoutClass) Valid ¶
func (t TimeoutClass) Valid() bool
type UpstreamInventories ¶
type UpstreamInventories map[Source]UpstreamInventory
UpstreamInventories is keyed by the closed Source enum. Validation rejects future or misspelled keys rather than silently granting them authority.
type UpstreamInventory ¶
type UpstreamInventory interface {
Inventory(context.Context, InventoryBudget) (InventoryResult, error)
}
type Webhook ¶
type Webhook struct {
// contains filtered or unexported fields
}
func NewWebhook ¶
func NewWebhook(cfg WebhookConfig) (*Webhook, error)