Documentation
¶
Index ¶
- Constants
- Variables
- func AlgLegacyStrategyIsolationSpec() algStrategyIsolationSpec
- func AlgPreferredStrategyIsolationSpec() algStrategyIsolationSpec
- func BillingExposureDeletionTargetPresent(root string, target BillingExposureDeletionTarget) (bool, error)
- func BillingFinalConvergenceDeletionTargetPresent(root string, target BillingFinalConvergenceDeletionTarget) (bool, error)
- func BillingFinalConvergenceDeletionTargetPresentFS(fs archtestFS, target BillingFinalConvergenceDeletionTarget) (bool, error)
- func CountBillingExposurePackageLines(root, rel string) (int, error)
- func CountBillingExposureSurfaceLines(root string, surface BillingExposureSurface) (int, error)
- func CountBillingFinalConvergenceFileLines(root, rel string) (int, error)
- func CountBillingFinalConvergenceFileLinesFS(fs archtestFS, rel string) (int, error)
- func CountBillingFinalConvergenceRootLines(root string, entry BillingFinalConvergenceRoot, excludedGlobs []string) (int, error)
- func CountBillingFinalConvergenceRootLinesFS(fs archtestFS, entry BillingFinalConvergenceRoot, excludedGlobs []string) (int, error)
- func CountFileLines(path string) (int, error)
- func CountNonTestGoLines(dir string) (int, error)
- func DeclExists(f *ast.File, r ForbiddenDeclRule) bool
- func DetectCentralProtocolDiagnosticsDebt(repoRoot string) (map[string]string, error)
- func DetectCentralProtocolRouteKinds(repoRoot string) (map[string]string, error)
- func DetectDuplicateAuthoritativeRegistries(repoRoot string) (map[string][]string, error)
- func DiscoverDeclaredInterfaceAssertions(f *ast.File) []string
- func DiscoverDialectSensitivePackages(repoRoot string) (map[string][]DialectFinding, error)
- func DiscoverMigrationRoots(repoRoot string) (map[string][]string, error)
- func FileImportPaths(f *ast.File) []string
- func FindRepoRoot(dir string) (string, error)
- func FormatExtensionPlanesManifestSection(root string) (string, error)
- func FormatExtensionPlanesMirrorSection(root string) (string, error)
- func FormatExtensionPlanesPathSection() string
- func FormatExtensionPlanesReport(root string) (string, error)
- func FormatRuntimeConvergencePackageBudgets(root string) (string, error)
- func GenerateExtensionPlanesBaselineJSON(root string) ([]byte, error)
- func GenerateFeaturePlanesCode(manifestBytes []byte) ([]byte, error)
- func HasIntegrationBuildTag(src []byte) bool
- func IsAllowedObserverProjection(qualifiedSymbol string) bool
- func IsAllowedStageConsumer(qualifiedSymbol string) bool
- func IsGeneratedFile(path string, src []byte, f *ast.File) bool
- func IsThinDelegate(relPath string, fd *ast.FuncDecl, files ...*ast.File) bool
- func MatchImportPattern(importPath, pattern string) bool
- func MatchPathPrefix(path, prefix string) bool
- func PackageDirFromRel(rel string) string
- func ParseGoSource(filename string, src []byte) (*token.FileSet, *ast.File, error)
- func ProductionScanRoots() []string
- func QualifiedSymbol(relPath string, fd *ast.FuncDecl) string
- func SlashPath(p string) string
- func ValidateCapabilityEvidence(repoRoot string, cap dbparity.Capability) error
- func WalkAllGoFiles(root string, fn func(rel, abs string, src []byte) error) error
- func WalkGoFiles(root string, fn func(rel, abs string, src []byte) error) error
- func WalkProductionGoFiles(root string, fn func(rel, abs string, src []byte) error) error
- func WriteExtensionPlanesBaseline(root string) error
- func WriteGeneratedFileAtomic(path string, data []byte) error
- type AffectedSurfaceBaseline
- type AffectedSurfaceMeasurement
- type BillingExposureBaselineFile
- type BillingExposureDeletionTarget
- type BillingExposureMeasurement
- type BillingExposurePlannedRatchet
- type BillingExposureSurface
- type BillingExposureSurfaceMeasurement
- type BillingFinalConvergenceBaselineFile
- type BillingFinalConvergenceDeclaration
- func ComputeBillingFinalConvergenceSymbolInventory(root string, doc BillingFinalConvergenceBaselineFile) ([]BillingFinalConvergenceDeclaration, error)
- func ComputeBillingFinalConvergenceSymbolInventoryFS(fs archtestFS, doc BillingFinalConvergenceBaselineFile) ([]BillingFinalConvergenceDeclaration, error)
- type BillingFinalConvergenceDeletionTarget
- type BillingFinalConvergenceDenominatorMeasurement
- func MeasureBillingFinalConvergenceCurrentDenominator(root string, doc BillingFinalConvergenceBaselineFile) (BillingFinalConvergenceDenominatorMeasurement, error)
- func MeasureBillingFinalConvergenceDenominator(root string, doc BillingFinalConvergenceBaselineFile) (BillingFinalConvergenceDenominatorMeasurement, error)
- func MeasureBillingFinalConvergenceDenominatorFS(fs archtestFS, doc BillingFinalConvergenceBaselineFile) (BillingFinalConvergenceDenominatorMeasurement, error)
- type BillingFinalConvergenceFile
- type BillingFinalConvergenceFileMeasurement
- type BillingFinalConvergencePlannedRatchet
- type BillingFinalConvergenceRoot
- type BillingFinalConvergenceRootMeasurement
- type CoreOwnershipCategory
- type CoreOwnershipEntry
- type CriticalFileBudget
- type DialectFinding
- type ExtensionPlaneManifestStatus
- type ExtensionPlanePathEntry
- type ExtensionPlanePathManifest
- type ExtensionPlanesBaselineDocument
- type ForbiddenDeclRule
- type ForbiddenImportRule
- type ForbiddenMirrorPredicate
- type LineBudget
- type MigrationWave
- type MirrorFinding
- type MirrorShapeKind
- type OverlayMeasurement
- type PackageParityWrappers
- type PackageTreeBudget
- type PlaneFieldMetadata
- type RuleFinding
- func EvaluateBillingAttemptSequenceAuthority(root string) ([]RuleFinding, error)
- func EvaluateBillingCallScopedStateOwnership(root string) ([]RuleFinding, error)
- func EvaluateBillingCustomerOperatorIndependence(root string) ([]RuleFinding, error)
- func EvaluateBillingExposureDeletionRatchet(root string, doc BillingExposureBaselineFile) ([]RuleFinding, error)
- func EvaluateBillingExposureIdentityRatchet(root string, doc BillingExposureBaselineFile) ([]RuleFinding, error)
- func EvaluateBillingExposureLOCRatchet(doc BillingExposureBaselineFile, measured BillingExposureMeasurement) []RuleFinding
- func EvaluateBillingExposureLOCRatchetAtPhase(root string, doc BillingExposureBaselineFile, ...) []RuleFinding
- func EvaluateBillingFinalConvergenceCurrentDeletionRatchet(root string, doc BillingFinalConvergenceBaselineFile) ([]RuleFinding, error)
- func EvaluateBillingFinalConvergenceDeletionRatchet(root string, doc BillingFinalConvergenceBaselineFile) ([]RuleFinding, error)
- func EvaluateBillingFinalConvergenceDeletionRatchetFS(fs archtestFS, doc BillingFinalConvergenceBaselineFile, isCurrentTree bool) ([]RuleFinding, error)
- func EvaluateBillingFinalConvergenceLOCRatchet(doc BillingFinalConvergenceBaselineFile, ...) []RuleFinding
- func EvaluateBillingFinalConvergencePhase1BridgeForbid(root string) ([]RuleFinding, error)
- func EvaluateBillingHoldAndStreamMoneyLock(root string) ([]RuleFinding, error)
- func ScanAbsentFiles(root string) ([]RuleFinding, error)
- func ScanAgentLoopGuardFeaturePackage(files []algSourceFile) []RuleFinding
- func ScanAgentLoopGuardOwnershipViolations(repoRoot string) ([]RuleFinding, error)
- func ScanAgentLoopGuardStrategyReachability(files []algSourceFile, spec algStrategyIsolationSpec) []RuleFinding
- func ScanClosedPlaneViolations(repoRoot string) ([]RuleFinding, error)
- func ScanFileAgentLoopGuardOwnership(relPath string, fset *token.FileSet, f *ast.File) []RuleFinding
- func ScanFileClosedPlaneViolations(relPath string, fset *token.FileSet, f *ast.File) []RuleFinding
- func ScanFileForbiddenImports(rel, abs string, src []byte) ([]RuleFinding, error)
- func ScanFileRetiredPackage(rel string) *RuleFinding
- func ScanForbiddenDeclarations(root string) ([]RuleFinding, error)
- func ScanForbiddenDeclarationsIncludingTests(root string) ([]RuleFinding, error)
- func ScanForbiddenImports(root string) ([]RuleFinding, error)
- func ScanRetiredPackages(root string) ([]RuleFinding, error)
- func ValidateAlgControlToolExclusivePlane(shape algControlToolPlaneShape) []RuleFinding
- func ValidateBillingExposurePlannedRatchets(doc BillingExposureBaselineFile) []RuleFinding
- func ValidateBillingFinalConvergencePlannedRatchets(doc BillingFinalConvergenceBaselineFile) []RuleFinding
- type ShrinkageMeasurement
- type SymbolKind
- type WaveMirrorFamily
Constants ¶
const ( RuleALGCoreOwnership = "alg_core_ownership" RuleALGControlToolSDKOwnership = "alg_control_tool_sdk_ownership" RuleALGExclusiveControlToolPlane = "alg_exclusive_control_tool_plane" RuleALGControlToolPlaneExecution = "alg_control_tool_plane_execution" RuleALGClientCallAppend = "alg_client_call_append" RuleALGSecondTerminalOwner = "alg_second_terminal_owner" RuleALGHiddenGuardResurrection = "alg_hidden_guard_resurrection" RuleALGPolicyStoreOwnership = "alg_policy_store_ownership" RuleALGPreferredStrategyIsolation = "alg_preferred_strategy_isolation" RuleALGLegacyStrategyIsolation = "alg_legacy_strategy_isolation" )
const ( BillingFinalConvergenceBaselineRelPath = "internal/archtest/testdata/architecture/billing_final_convergence_baseline.json" BillingFinalConvergenceSchemaVersion = 1 BillingFinalConvergenceCountingMethod = "physical-go-lines-v1" BillingFinalConvergenceSymbolFollowingVersion = 1 BillingFinalConvergenceFeature = "billing-architecture-final-convergence" BillingFinalConvergencePhase = "0-baseline" )
const ( BillingFinalConvergenceRatchetPlanned = "planned" BillingFinalConvergenceRatchetActive = "active" )
Ratchet statuses (Phase 0 leaves both ratchets "planned").
const ( BillingFinalConvergenceActivationDeletionRatchet = "activate_structural_deletion" BillingFinalConvergenceActivationLOCRatchet = "activate_loc_reduction" )
Activation flags (all false in Phase 0; Phase 7.2 flips them).
const ( BillingCorrectnessRuleSequencePositional = "billing_attempt_sequence_positional" BillingCorrectnessRuleSequenceTimestamp = "billing_attempt_sequence_timestamp" BillingCorrectnessRuleSequenceLexical = "billing_attempt_sequence_lexical" BillingCorrectnessRuleSequenceAdapterAuthoritative = "billing_attempt_sequence_authoritative_adapter" BillingCorrectnessRuleCustomerOperatorCoupling = "billing_customer_operator_coupling" BillingCorrectnessRuleCustomerInputCarriesOperatorRates = "billing_customer_input_carries_operator_rates" BillingCorrectnessRuleExecutorGlobalBillingRegistry = "billing_executor_global_registry" BillingCorrectnessRuleExecutorMapField = "billing_executor_map_field" BillingCorrectnessRuleCallScopedStateOwnerMissing = "billing_call_scoped_owner_missing" BillingCorrectnessRuleHoldAndStreamMoneyLock = "billing_hold_stream_money_lock" )
const ( BillingExposureRatchetStreamMoneyMutation = "stream_money_mutation" BillingExposureRatchetHoldLifecycle = "hold_lifecycle" BillingExposureRatchetALegOnlySettlementIdentity = "a_leg_only_settlement_identity" BillingExposureRatchetRuntimeFinancialEvidenceBarrier = "runtime_financial_evidence_barrier" BillingExposureRatchetNetLOCReduction = "net_loc_reduction" )
const ( BillingExposureRatchetStatusPlanned = "planned" BillingExposureRatchetStatusActive = "active" )
const ( BillingExposureActivationForbidHoldSymbols = "forbid_hold_symbols" BillingExposureActivationRequireNetLOCReduction = "require_net_loc_reduction" )
const ( RuleClosedPlaneNoArbitraryValueMaps = "closed_plane_no_arbitrary_value_maps" RuleClosedPlaneNoReflectionFallback = "closed_plane_no_reflection_fallback" RuleClosedPlaneNoMapReplayHelpers = "closed_plane_no_map_replay_helpers" RuleClosedPlaneTypedStorageOnly = "closed_plane_typed_storage_only" RuleClosedPlaneNoGlobalPlaneSelectors = "closed_plane_no_global_plane_selectors" )
const ActiveMigrationWave = Wave5c_Residual
ActiveMigrationWave defines the currently active migration wave ratchet. As migration waves complete, advance this constant to lock in forbidden mirror rules.
const AtomicOwnedResourceLifecycleOverlayMax = 92
AtomicOwnedResourceLifecycleOverlayMax is the measured atomic-owned-resource-lifecycle overlay ratchet (the new private process-ownership and generation-loop primitive files, excluded from the legacy Req 11.5 convergence delta). Keep 16 lines of ratchet headroom over the measured 76-line overlay.
const BackendResourcePoolOverlayMax = 381
BackendResourcePoolOverlayMax is the measured backend-connector-resource- reconciliation overlay for the private resource-pool implementation. Keep 25 lines of ratchet headroom over the measured 356-line overlay.
const BillingExposureBaselineRelPath = "internal/archtest/testdata/architecture/billing_exposure_deletion_baseline.json"
BillingExposureBaselineRelPath is the machine-checkable 0.1 LOC/deletion lock.
const BillingExposureBaselineSchemaVersion = 1
BillingExposureBaselineSchemaVersion is the JSON schema for the 0.1 freeze.
const BillingFinalConvergencePhase1BridgeForbid = true
BillingFinalConvergencePhase1BridgeForbid is deliberately independent from the later structural-deletion ratchet. Phase 1 may remove the authoritative rating bridge now, while Phase 7 retains ownership of the broader deletion and LOC gates.
const BillingFinalConvergenceVerifiedSHA = "cd3a603495660f49240dcb9bf1698aa3f27503a2"
BillingFinalConvergenceVerifiedSHA is the predecessor implementation SHA recorded in spec.json.dependencies[0].implementation_main_sha after Phase 0 verification (PR #354 merge commit; implementation, not the #346 spec-only merge 9bf9c66...).
const BillingHostCompositionOverlayMax = 428
BillingHostCompositionOverlayMax is the measured billing-host-composition overlay ratchet (production files selected by path, excluding connector and generic-compatible overlays). Keep 25 lines of ratchet headroom over the measured 340-line overlay. Usage-economics reconciliation extends ComposeBilling in billing_compose.go (revision workers/readers, cutover fence, unit ledger, pass-through settlement); the file stays with its original overlay (no marker churn). Re-measured 403, reset to 428 with 25 headroom.
const ConnectorArchitectureOverlayMax = 3550
ConnectorArchitectureOverlayMax is the exact-measured ADR 0008 connector architecture overlay ratchet (non-test lines in structurally selected files). The current live overlay measures 2,335 lines; its fixed cap rounds 50% headroom up to the next 50 lines. Shrinkage accounting continues to subtract the actual measured overlay lines, independently of this cap.
const EconomicsConvergenceGrowthOverlayMax = 57726 + billingUncertainOverlapOverlayReserve
EconomicsConvergenceGrowthOverlayMax caps the approved usage-economics growth allowance inside the billing-convergence denominator: only per-entry growth above the locked merge-base lines enters the allowance, so historical baseline code can never enter. Explicit prospective capacity remains separate from audit credit. The round-by-round re-audit history of this cap lives in billing_convergence_growth_history.go; budgets.go carries the same history for the per-directory internal/core ceiling.
const ExtensionPlanesBaselineRelPath = "testdata/architecture/extension_planes_baseline.json"
ExtensionPlanesBaselineRelPath is the repository-relative path to the extension planes baseline JSON artifact.
const GenericCompatibleBackendOverlayMax = 946
GenericCompatibleBackendOverlayMax is the measured generic-compatible-backend-modes overlay ratchet (production files selected by path, excluding connector overlay). Keep 25 lines of ratchet headroom over the measured 921-line overlay.
const GeoIPIngressOverlayMax = 700
GeoIPIngressOverlayMax ratchets the early GeoIP ingress policy, resolver, process composition, and middleware-boundary additions independently from the historical convergence delta.
const IngressSelfDefenseOverlayMax = 1610
IngressSelfDefenseOverlayMax ratchets the ingress self-defense request-side classification (the fixed impossible-path matcher, the early gate, the cycle-neutral request-context source-address helper, and the transport-auth observer and conservative credential-presence probe) independently from the legacy convergence delta, exactly as the preceding GeoIP ingress overlay does for the resolver and early gate it reuses, plus the task 4.1/4.2 auth-adapter files. Tasks 5.1 and 5.2 add the cycle-neutral self-defense security projection, the credential-disposition probe sibling, and the process-owned state plus its generation projection, whose new production files join this overlay: harness-re-measured 869, reset to 894 with 25 headroom. Tasks 6.1 and 6.2 add the bounded ingress self-defense process metrics collector under internal/infra/metrics, which is outside every Req 11.5 affected surface and was therefore outside every budget; selecting it by the "/infra/metrics/self_defense_" prefix gives this feature an explicit ratchet there. Harness-re-measured 1034 (889 + 145 for internal/infra/metrics/self_defense_prom.go), so the unchanged 1049 cap leaves 15 lines of headroom — 10 below the usual 25-line ratchet — which the next change in this overlay must restore by re-measuring before the cap can be relied on again. The ingress self-defense review follow-up adds the owned-route carve to the fixed matcher (the rule/carve split, the root normalization, and the carve itself) and publishes the inventory on the cycle-neutral projection, which is the fix for a default-on layer silently shadowing an operator-configured base_path: harness-re-measured 1218, reset to 1243 with the usual 25-line headroom.`n// The carve-fidelity follow-up then replaces that string-root inventory with a`n// router-resolved typed one: [OwnedRoute] carries the method, the path and whether the`n// registration is a subtree, the resolver asks the real mux which candidates it owns`n// and with which semantics, and the gate compiles the result once at construction so`n// the request path allocates nothing. Harness-re-measured 1463, reset to 1488 with the`n// usual 25-line headroom.
const KeepwarmOrchestrationOverlayMax = 650
KeepwarmOrchestrationOverlayMax ratchets the generation/admin composition additions for this feature independently from the legacy convergence delta.
const LargePayloadHostCompositionOverlayMax = 291
LargePayloadHostCompositionOverlayMax is the measured large-payload streaming fast-path host-composition overlay. Keep 25 lines of ratchet headroom over the measured 266-line overlay.
const ReasoningSemanticCompressionOverlayMax = 366
ReasoningSemanticCompressionOverlayMax is the measured reasoning semantic compression host-composition overlay. Keep 25 lines of ratchet headroom over the measured 341-line overlay.
const RuntimeConvergenceMinNetLineReduction = 800
RuntimeConvergenceMinNetLineReduction is the Requirement 11.5 floor for the legacy convergence component (after subtracting the ADR 0008 overlay).
const RuntimeConvergenceShrinkageBaselineSHA = "efe4624909cea318c7211d5cb3734059d3210802"
RuntimeConvergenceShrinkageBaselineSHA is the reviewed production baseline for Req 11.5.
const SourceOwnershipGrowthBaselineSHA = "09f93c1015eca50f51cba7f077f5cb0fb1a4189e"
SourceOwnershipGrowthBaselineSHA identifies the immutable pre-feature tree used for the config-source inode ownership integration's per-file baselines.
const SourceOwnershipOverlayMax = 750
SourceOwnershipOverlayMax gives the measured 475-line integration 50% headroom, rounded up to 750 lines. Only actual positive growth is credited, never this cap or pre-existing code. The historical 800-line reduction remains unchanged.
const TerminalDecisionFeatureExtensionOverlayMax = 622
TerminalDecisionFeatureExtensionOverlayMax ratchets the provider-neutral policy endpoint files independently from the legacy convergence delta. The measured overlay is 597 lines; retain 25 lines of headroom.
const UsageEconomicsOverlayMax = 1519
UsageEconomicsOverlayMax caps the extensible usage-economics reconciliation growth allowance: only lines above each allowlisted file's locked baseline enter the allowance, so pre-existing baseline code can never enter. Seven files are new (baseline 0); production_options.go and process_billing.go carry approved economics composition growth above their merge-base lines. PR #659 adversarial repair (R1-R10) extends observation_economic_bridge.go; the allowance re-measured 1,396 lines, reset to 1,421 with 25 headroom. PR #659 CodeRabbit durable candidate-budget backoff/logging (commit 652b9773) grows the same bridge; the allowance re-measured 1,494 lines, reset to 1,519 with 25 headroom.
Variables ¶
var ( AllowedFeatureBundleFields = map[string]bool{ "SchemaVersion": true, "PlaneSet": true, "Lifecycles": true, } AllowedGeneratedMergeSurfaceFields = map[string]bool{ "Lifecycles": true, "frozen": true, "Frozen": true, "set": true, } AllowedExtensionsOptionsFields = map[string]bool{ "SecretGuard": true, "SecretGuardInventory": true, "SecretDecisionObserver": true, "frozen": true, "Frozen": true, "PlaneSet": true, } AllowedGenerationOperationsFields = map[string]bool{ "terminalProviders": true, "readiness": true, "frozen": true, "Frozen": true, "keepwarmAccounting": true, "billingReports": true, "billingReportsPath": true, "billingProvisioner": true, "billingExposureRecovery": true, } AllowedRequestRuntimeSnapshotFields = map[string]bool{ "hookBus": true, "state": true, "aux": true, "obs": true, "usageObs": true, "raw": true, "ws": true, "secretGuardPlane": true, "policyObserver": true, "timeoutBudget": true, "timeoutGuard": true, "featurePlanes": true, "gen": true, } AllowedExtensionRuntimeFields = map[string]bool{ "ToolCallFinalizationMaxArgsBytes": true, "toolCallFinalizers": true, } AllowedResponsePipelineFields = map[string]bool{ "compactionObservers": true, "compactionPreservers": true, } AllowedTurnTerminalFields = map[string]bool{ "terminalDecisionProvider": true, "terminalDecisionProviderID": true, } // AllowedStructFields maps fully qualified struct paths ("dir.StructName") to their allowed field names. AllowedStructFields = map[string]map[string]bool{ "pkg/lipsdk/feature.FeatureBundle": AllowedFeatureBundleFields, "internal/featurebundle.GeneratedMergeSurface": AllowedGeneratedMergeSurfaceFields, "internal/infra/runtimebundle.ExtensionsOptions": AllowedExtensionsOptionsFields, "internal/core/runtime.generationOperations": AllowedGenerationOperationsFields, "internal/core/extensions.RequestRuntimeSnapshot": AllowedRequestRuntimeSnapshotFields, "internal/core/runtime.ExtensionRuntime": AllowedExtensionRuntimeFields, "internal/core/runtime.responsePipeline": AllowedResponsePipelineFields, "internal/core/runtime.turnTerminal": AllowedTurnTerminalFields, "internal/featurebundle.HostContributions": { "TrafficObservers": true, "UsageObservers": true, }, "internal/infra/runtimebundle.ProductionOptions": { "TrafficObservers": true, "UsageObservers": true, }, "pkg/lipruntime.Options": { "TrafficObservers": true, "UsageObservers": true, }, "pkg/lipsdk/controlplane.HostCapabilities": { "TrafficObservers": true, "UsageObservers": true, }, } // AllowedStageConsumers is the explicit allowlist of fully-qualified Go symbol paths // permitted to act as stage consumers accessing extension planes. Any stage-consumer accessor // or method outside this allowlist is rejected by the forbidden-mirror architecture scanner. AllowedStageConsumers = map[string]bool{ "internal/core/extensions.(*RequestRuntimeSnapshot).CompletionGates": true, "internal/core/extensions.(*RequestRuntimeSnapshot).RequestTransforms": true, "internal/core/extensions.(*RequestRuntimeSnapshot).PreRequestHandlers": true, "internal/core/extensions.(*RequestRuntimeSnapshot).RouteHintProviders": true, "internal/core/extensions.(*RequestRuntimeSnapshot).AttemptTransforms": true, "internal/core/extensions.(*RequestRuntimeSnapshot).SessionOpeners": true, "internal/core/extensions.(*RequestRuntimeSnapshot).Workspace": true, "internal/core/extensions.(*RequestRuntimeSnapshot).ToolCatalogFilters": true, "internal/core/extensions.(*RequestRuntimeSnapshot).ToolCallPolicies": true, "internal/core/extensions.(*RequestRuntimeSnapshot).ToolCallPoliciesExecution": true, "internal/core/extensions.(*RequestRuntimeSnapshot).ToolCallFinalizers": true, "internal/core/extensions.(*RequestRuntimeSnapshot).ToolCallFinalizersExecution": true, "internal/core/extensions.(*RequestRuntimeSnapshot).SecretGuards": true, "internal/core/extensions.(*RequestRuntimeSnapshot).SecretGuardsExecution": true, "internal/core/extensions.(*RequestRuntimeSnapshot).CompactionObservers": true, "internal/core/extensions.(*RequestRuntimeSnapshot).CompactionPreservers": true, "internal/core/extensions.(*RequestRuntimeSnapshot).LocalTurnHandlers": true, "internal/core/extensions.(*RequestRuntimeSnapshot).LocalTurnHandlersExecution": true, "internal/core/extensions.(*RequestRuntimeSnapshot).TerminalDecisionProvider": true, "internal/core/extensions.(*RequestRuntimeSnapshot).TerminalDecisionProviderIdentity": true, "internal/core/extensions.(*RequestRuntimeSnapshot).ControlToolProvider": true, "internal/core/extensions.(*RequestRuntimeSnapshot).ControlToolProviderIdentity": true, "internal/core/extensions.(*RequestRuntimeSnapshot).TrafficObserver": true, "internal/core/extensions.(*RequestRuntimeSnapshot).UsageObserver": true, "internal/core/extensions.(*RequestRuntimeSnapshot).RawCapture": true, "internal/core/extensions.(*RequestRuntimeSnapshot).TrafficRedactors": true, "internal/core/extensions.(*RequestRuntimeSnapshot).StreamObserverFactories": true, "internal/core/extensions.(*RequestRuntimeSnapshot).TrafficPortBundle": true, "internal/core/extensions.CompletionGatesFromContext": true, } // AllowedObserverProjections is the qualified-symbol allowlist of observer and tool projection functions. // Any other function whose body reads observer/tool planes via Get past Wave 2/4 is forbidden. AllowedObserverProjections = map[string]bool{ "internal/infra/runtimebundle.buildRuntimeSnapshot": true, "internal/infra/runtimebundle.buildExecutorRuntime": true, "internal/infra/runtimebundle.buildSecretGuardRuntime": true, "internal/standardplugins/featurehost.(*Runtime).CompileGeneration": true, "internal/standardplugins/featurehost.(*Runtime).bindCompactionContinuity": true, "internal/standardplugins/featurehost/reasoning.Bind": true, "internal/featurebundle.FreezeBundle": true, "internal/featurebundle.MergeBundlesGenerated": true, } // ClosedPlaneTargetStorageStructs lists the structs in pkg/lipsdk/feature that // must not contain arbitrary map storage fields. ClosedPlaneTargetStorageStructs = map[string]bool{ "ContributionSet": true, "FrozenPlaneSet": true, "generatedContributions": true, "generatedFrozen": true, "pkg/lipsdk/feature.ContributionSet": true, "pkg/lipsdk/feature.FrozenPlaneSet": true, "pkg/lipsdk/feature.generatedContributions": true, "pkg/lipsdk/feature.generatedFrozen": true, } // ClosedPlaneAllowedStorageMaps defines the explicit allowlist of legitimate attribution maps. ClosedPlaneAllowedStorageMaps = map[string]map[string]string{ "ContributionSet": {"pluginIDs": "map[string]string"}, "FrozenPlaneSet": {"pluginIDs": "map[string]string"}, "pkg/lipsdk/feature.ContributionSet": {"pluginIDs": "map[string]string"}, "pkg/lipsdk/feature.FrozenPlaneSet": {"pluginIDs": "map[string]string"}, } // ClosedPlaneAllowedReflectionFuncs lists exact functions in pkg/lipsdk/feature // permitted to use reflection for typed nil inspection. ClosedPlaneAllowedReflectionFuncs = map[string]bool{ "isReflectNil": true, "isNilValue": true, "pkg/lipsdk/feature.isReflectNil": true, "pkg/lipsdk/feature.isNilValue": true, } // ClosedPlaneAllowedPackageMapFuncs lists functions in pkg/lipsdk/feature permitted // to use maps for legitimate package tasks unrelated to closed plane value storage. ClosedPlaneAllowedPackageMapFuncs = map[string]bool{ "ValidateManifest": true, "pkg/lipsdk/feature.ValidateManifest": true, } // ClosedPlaneOperationalFiles defines production files in pkg/lipsdk/feature where // map-backed operational logic is strictly prohibited. ClosedPlaneOperationalFiles = map[string]bool{ "contributions.go": true, "frozen.go": true, "plane_generated.go": true, } // KnownLegacyForbiddenPlaneMapHelpers maps deprecated fallback helper names to rejection rationale. KnownLegacyForbiddenPlaneMapHelpers = map[string]string{ "validateAllPlanesMap": "map validation helper is deleted; validation must operate on generated typed storage", "replayAllPlanesMapTo": "map replay helper is deleted; replay must operate on generated typed storage", "mapHasIdentityReplayRule": "map identity replay helper is deleted; identity checks must operate on generated typed storage", "contributeCandidateMapTo": "map candidate helper is deleted; candidate contributions must operate on generated typed storage", } )
Whitelisted non-plane fields for individual structs.
var AbsentFiles = []string{
"pkg/lipruntime/legacy_options.go",
"pkg/lipruntime/reload_map.go",
"cmd/lipstd/tracing_shutdown.go",
"internal/infra/runtimebundle/built.go",
"internal/infra/runtimebundle/build.go",
"internal/infra/tokenaccounting/ledgerstore/store.go",
"internal/infra/tokenaccounting/ledgerstore/20260514000000_token_accounting_ledger_baseline.go",
}
AbsentFiles must not exist in the production tree.
var BillingFinalConvergenceInitialSeedSymbols = []string{
"AmountUnitMoneyNano",
"Spend",
"FinalCost",
"EstimatedCost",
"ReservedNano",
"JournalBookLegacyAuthorization",
"TurnUsageRecord",
"LegUsageRecord",
"RetryingCallUsageAppender",
"RetryingCallLegUsageAppender",
"UsageAppendWorker",
"UsageAppendOutbox",
}
BillingFinalConvergenceInitialSeedSymbols are the migration-era monetary/usage concepts seeding the AST fixed-point inventory (design 12.3 step 1): the predecessor's money unit, money reservation fields, reserved/auth-book symbols, legacy usage model symbols, and direct/outbox append types.
var ClosureForbiddenImports = []ForbiddenImportRule{
{
SourcePattern: "pkg/lipruntime",
TargetPattern: "/internal/plugins/features/",
Reason: "public facade must not depend on concrete feature plugins; use SDK registrations",
},
{
SourcePattern: "internal/plugins/features",
TargetPattern: "/internal/core",
Reason: "feature tree must not depend on internal/core (use pkg/lipsdk contracts)",
},
{
SourcePattern: "internal/plugins/features",
TargetPattern: "/internal/infra/runtimebundle",
Reason: "feature tree must not depend on runtimebundle",
},
{
SourcePattern: "internal/plugins/features",
TargetPattern: "/internal/standardplugins/featurehost",
Reason: "feature tree must not depend on standard featurehost composition",
},
}
ClosureForbiddenImports extends ForbiddenImports with the ownership-closure ratchets (Task 11.2, Req 12.1/12.2). It lives in its own table so the core rule file stays under the archtest file-size cap; scanners evaluate both slices together through allForbiddenImportRules.
var CoreOwnershipManifest = []CoreOwnershipEntry{ {Package: "accessmode", Category: CoreOwnershipKernelInvariant, Reason: "Base proxy execution-mode vocabulary independent of features."}, {Package: "accounting", Category: CoreOwnershipKernelInvariant, Reason: "Generic token accounting types and ledger contracts."}, {Package: "admin", Category: CoreOwnershipKernelInvariant, Reason: "Minimal admin command port definitions."}, {Package: "affinity", Category: CoreOwnershipKernelInvariant, Reason: "Backend connection affinity keys and routing selectors."}, {Package: "auth", Category: CoreOwnershipKernelInvariant, Reason: "Client authentication, credential verification, principal mapping."}, {Package: "authorityattribution", Category: CoreOwnershipKernelInvariant, Reason: "Attribution metadata for usage and concurrency leases."}, {Package: "authoritycoord", Category: CoreOwnershipKernelInvariant, Reason: "Distributed lease and quota coordination across nodes."}, {Package: "auxreq", Category: CoreOwnershipKernelInvariant, Reason: "Auxiliary request lifecycle, sub-request pipeline, cancellation."}, {Package: "b2bua", Category: CoreOwnershipKernelInvariant, Reason: "Back-to-back user agent state machine, attempt loop, upstream I/O."}, {Package: "billing", Category: CoreOwnershipKernelInvariant, Reason: "Billing identity, quote/exposure policy, immutable usage contracts."}, {Package: "capabilities", Category: CoreOwnershipKernelInvariant, Reason: "Model capability bitflags consumed by routing and backends."}, {Package: "concurrencyauthority", Category: CoreOwnershipKernelInvariant, Reason: "Concurrency lease allocation and enforcement."}, {Package: "config", Category: CoreOwnershipKernelInvariant, Reason: "Typed base proxy configuration; feature payloads stay opaque subtrees."}, {Package: "configreload", Category: CoreOwnershipKernelInvariant, Reason: "Dynamic configuration reload and generation swap coordination."}, {Package: "continuation", Category: CoreOwnershipKernelInvariant, Reason: "Request continuation token domain types."}, {Package: "continuity", Category: CoreOwnershipKernelInvariant, Reason: "Session continuity contracts and replay markers."}, {Package: "controlplane", Category: CoreOwnershipKernelInvariant, Reason: "Control-plane state management and cluster observers."}, {Package: "conversationprojection", Category: CoreOwnershipKernelInvariant, Reason: "Pure backend-effective projection, never_backend exclusion, anchors."}, {Package: "diag", Category: CoreOwnershipKernelInvariant, Reason: "Diagnostic telemetry, trace attributes, logging context."}, {Package: "execbackend", Category: CoreOwnershipKernelInvariant, Reason: "Backend executor abstraction and invocation port."}, {Package: "execctx", Category: CoreOwnershipKernelInvariant, Reason: "Execution context: deadlines, trace identity, cancellation."}, {Package: "extensions", Category: CoreOwnershipGenericExtension, Reason: "Closed standard extension planes and completion gates.", Consumers: "runtime, traffic, diag, testkit conformance"}, {Package: "geoip", Category: CoreOwnershipKernelInvariant, Reason: "Client IP geolocation lookup for regional policy routing."}, {Package: "hooks", Category: CoreOwnershipGenericExtension, Reason: "Extension hook pipeline execution and phase ordering.", Consumers: "extensions, runtime, testkit conformance"}, {Package: "http", Category: CoreOwnershipKernelInvariant, Reason: "HTTP protocol utilities, header normalization, status mapping."}, {Package: "identity", Category: CoreOwnershipKernelInvariant, Reason: "Tenant, organization, user identity representation."}, {Package: "ingressdefense", Category: CoreOwnershipKernelInvariant, Reason: "Default provider-neutral ingress self-defense policy and bounded exact-address hostile source state, required with optional features absent."}, {Package: "interleavedstate", Category: CoreOwnershipKernelInvariant, Reason: "Routing-required thinker cycle state for route selection and continuity."}, {Package: "jsonpresence", Category: CoreOwnershipKernelInvariant, Reason: "JSON empty-vs-null presence semantics."}, {Package: "jsonshape", Category: CoreOwnershipKernelInvariant, Reason: "Structural JSON validation for streams and frontends."}, {Package: "largebody", Category: CoreOwnershipGenericExtension, Reason: "Provider-neutral large-payload wire DTOs shared by frontend proof, core assessment, and backend wire open.", Consumers: "frontend profiles, core assessment, backend wire open"}, {Package: "leglifecycle", Category: CoreOwnershipKernelInvariant, Reason: "Upstream attempt leg lifecycle tracking and abort handling."}, {Package: "lineage", Category: CoreOwnershipKernelInvariant, Reason: "Request/response message causal lineage tracking."}, {Package: "localstream", Category: CoreOwnershipKernelInvariant, Reason: "In-memory canonical stream for local execution loops."}, {Package: "metering", Category: CoreOwnershipKernelInvariant, Reason: "Raw usage event metering ports and aggregation."}, {Package: "modelcatalog", Category: CoreOwnershipKernelInvariant, Reason: "Static model definitions, tokenizer mappings, context limits."}, {Package: "modelregistry", Category: CoreOwnershipKernelInvariant, Reason: "Dynamic runtime model registration and lookup."}, {Package: "modelview", Category: CoreOwnershipKernelInvariant, Reason: "Filtered model visibility views for tenants."}, {Package: "policy", Category: CoreOwnershipKernelInvariant, Reason: "Rate limit and tier policy definitions."}, {Package: "routeoverride", Category: CoreOwnershipKernelInvariant, Reason: "Operator A-leg routing-override rules and latest-wins state."}, {Package: "routing", Category: CoreOwnershipKernelInvariant, Reason: "Backend selection, fallback sequences, weighted health routing."}, {Package: "runtime", Category: CoreOwnershipKernelInvariant, Reason: "Request/attempt orchestration, output commitment, immutable generations."}, {Package: "safety", Category: CoreOwnershipKernelInvariant, Reason: "Prompt safety boundary assertions and stream guard invariants."}, {Package: "securesession", Category: CoreOwnershipKernelInvariant, Reason: "Secure-session authority: creation, verification, rotation, stores."}, {Package: "snapshotgen", Category: CoreOwnershipKernelInvariant, Reason: "Immutable runtime state snapshot generation."}, {Package: "state", Category: CoreOwnershipKernelInvariant, Reason: "Core state container and epoch tracking."}, {Package: "stream", Category: CoreOwnershipKernelInvariant, Reason: "Canonical streaming abstractions, backpressure, chunk multiplexing."}, {Package: "streamrecovery", Category: CoreOwnershipKernelInvariant, Reason: "Mid-stream disconnect recovery and idempotent retry markers."}, {Package: "terminal", Category: CoreOwnershipKernelInvariant, Reason: "Final generation completion state evaluation."}, {Package: "terminalwork", Category: CoreOwnershipKernelInvariant, Reason: "Post-response async terminal work pipeline."}, {Package: "tokenaccounting", Category: CoreOwnershipKernelInvariant, Reason: "Token counting, budget enforcement, ledger, preflight."}, {Package: "traffic", Category: CoreOwnershipKernelInvariant, Reason: "Traffic shaping and admission tokens."}, {Package: "usageauthority", Category: CoreOwnershipKernelInvariant, Reason: "Distributed usage quota coordination and lease renewal."}, {Package: "workspace", Category: CoreOwnershipKernelInvariant, Reason: "Workspace isolation boundary contracts."}, }
CoreOwnershipManifest is the durable core admission table (Task 11.1). A new top-level internal/core package fails the admission test until it gains an entry here through explicit architecture review.
var CriticalFileBudgets = []CriticalFileBudget{
{Path: "internal/core/runtime/executor.go", Max: 300},
{Path: "internal/infra/runtimebundle/options.go", Max: 300},
{Path: "internal/standardplugins/standard_table.go", Max: 350},
{Path: "internal/pluginreg/reg.go", Max: 650},
{Path: "internal/stdhttp/server.go", Max: 150},
{Path: "internal/infra/runtimehost/coordinator.go", Max: 450},
{Path: "internal/infra/runtimehost/generation.go", Max: 450},
{Path: "internal/infra/runtimebundle/candidate_compile.go", Max: 450},
{Path: "internal/infra/runtimebundle/handler_composer.go", Max: 150},
{Path: "internal/infra/runtimebundle/compile_generation.go", Max: 600},
{Path: "internal/stdhttp/request_plane.go", Max: 200},
{Path: "internal/infra/runtimebundle/process_services.go", Max: 550},
{Path: "pkg/lipruntime/build.go", Max: 150},
{Path: "pkg/lipruntime/host.go", Max: 200},
{Path: "pkg/lipruntime/facade.go", Max: 200},
{Path: "cmd/lipstd/command.go", Max: 650},
{Path: "pkg/lipruntime/reload.go", Max: 200},
{Path: "pkg/lipruntime/reload_aliases.go", Max: 150},
{Path: "pkg/lipsdk/backendplugin/convert.go", Max: 600},
{Path: "pkg/lipsdk/backendplugin/convert_frames.go", Max: 650},
{Path: "internal/core/securesession/adapters/bunstore/store.go", Max: 500},
{Path: "internal/core/securesession/adapters/bunstore/store_evidence.go", Max: 450},
{Path: "internal/core/runtime/authority_lifecycle.go", Max: 450},
{Path: "internal/core/runtime/authority_lifecycle_settle.go", Max: 600},
{Path: "internal/core/runtime/authority_lifecycle_release.go", Max: 500},
{Path: "internal/plugins/protocols/openresponses/state_machine.go", Max: 1050},
{Path: "internal/plugins/protocols/openresponses/state_machine_event_handlers.go", Max: 750},
{Path: "internal/plugins/frontends/frontendpipe/pipe.go", Max: 750},
{Path: "internal/plugins/features/keepwarm/manager.go", Max: 700},
{Path: "internal/plugins/features/keepwarm/scheduler.go", Max: 700},
{Path: "internal/standardplugins/featurehost/runtime.go", Max: 300},
{Path: "internal/standardplugins/featurehost/process.go", Max: 300},
{Path: "internal/standardplugins/featurehost/generation.go", Max: 400},
{Path: "internal/standardplugins/featurehost/inputs.go", Max: 250},
{Path: "internal/standardplugins/featurehost/bindings.go", Max: 350},
}
CriticalFileBudgets is the fixed ceiling table for hotspot files. Each value uses the measured line count plus max(100, ceil(50% of measured)), rounded up to the next 50 lines. The exactness test pins selected audited snapshots; budget checks enforce every fixed cap against the live source.
var ForbiddenDeclarations = []ForbiddenDeclRule{ {Package: "pkg/lipsdk/economics", Kind: SymbolType, Name: "RatingRequest", Reason: "stream-time rater contract deleted; billing owns monetary rating"}, {Package: "pkg/lipsdk/economics", Kind: SymbolType, Name: "RatingResult", Reason: "stream-time rater contract deleted; billing owns monetary rating"}, {Package: "pkg/lipsdk/economics", Kind: SymbolType, Name: "RaterRegistration", Reason: "stream-time rater registration deleted"}, {Package: "pkg/lipsdk/economics", Kind: SymbolType, Name: "OutputLimitStatus", Reason: "legacy monetary output-limit quote contract deleted"}, {Package: "pkg/lipsdk/economics", Kind: SymbolType, Name: "OutputLimitRequest", Reason: "legacy monetary output-limit quote contract deleted"}, {Package: "pkg/lipsdk/economics", Kind: SymbolType, Name: "OutputLimitResult", Reason: "legacy monetary output-limit quote contract deleted"}, {Package: "pkg/lipsdk/economics", Kind: SymbolType, Name: "OutputLimitQuoter", Reason: "legacy monetary output-limit quote contract deleted"}, {Package: "internal/core/runtime", Kind: SymbolMethod, Name: "enrichUsageCost", Reason: "stream-time monetary price enrichment deleted"}, {Package: "internal/core/runtime", Kind: SymbolMethod, Name: "recordTokenAccountingLedger", Reason: "direct runtime token-ledger write deleted"}, {Package: "internal/core/runtime", Kind: SymbolMethod, Name: "recordPartialTokenAccountingLedger", Reason: "direct runtime token-ledger write deleted"}, {Package: "internal/core/runtime", Kind: SymbolMethod, Name: "recordCancellationBillingMarker", Reason: "estimated stream-time billing marker deleted"}, {Package: "internal/core/runtime", Kind: SymbolMethod, Name: "rateMonetaryExposure", Reason: "runtime economics money rating deleted; billing owns monetary rating"}, {Package: "internal/core/runtime", Kind: SymbolFunc, Name: "rateMonetaryExposure", Reason: "runtime economics money rating deleted; billing owns monetary rating"}, {Package: "internal/core/runtime", Kind: SymbolFunc, Name: "rateMonetaryExposureWith", Reason: "runtime economics money rating deleted; billing owns monetary rating"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "openDurableAccountingLedger", Reason: "legacy financial token ledger composition deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "selectEconomicsRater", Reason: "EconomicsRater wiring deleted; BillingAdmission owns monetary admission"}, {Package: "internal/infra/runtimebundle", Kind: SymbolType, Name: "Built", Reason: "compatibility Built aggregate deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "Build", Reason: "compatibility runtimebundle.Build deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "requestPlaneAsBuilt", Reason: "canonical-to-legacy rehydration deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolType, Name: "RequestPlane", Reason: "broad RequestPlane aggregate deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "NewCompatRequestPlane", Reason: "RequestPlane compatibility ctor deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "ComposeRequestPlane", Reason: "ComposeRequestPlane deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "standardHTTPInputFromRequestPlane", Reason: "RequestPlane projector deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolType, Name: "CandidateRuntime", Reason: "use package-private candidateAssembly"}, {Package: "internal/infra/runtimebundle", Kind: SymbolType, Name: "ReloadHost", Reason: "renamed to concrete Host"}, {Package: "internal/infra/runtimebundle", Kind: SymbolMethod, Name: "LegacyClosers", Reason: "ResourceLedger closer projection deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "BuildBootstrap", Reason: "dual bootstrap path deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "AttachReloadHost", Reason: "host-attachment dual path deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolType, Name: "BootstrapResult", Reason: "bootstrap vocabulary deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolType, Name: "BootstrapMode", Reason: "bootstrap vocabulary deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolConst, Name: "BootstrapUnspecified", Reason: "bootstrap vocabulary deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolConst, Name: "BootstrapServe", Reason: "bootstrap vocabulary deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "LoadBootstrapEffective", Reason: "use LoadBootstrapEffectiveWithSource only"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "NewReloadHost", Reason: "use BuildHost / concrete Host"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "bindReloadHost", Reason: "legacy host bind deleted"}, {Package: "internal/stdhttp", Kind: SymbolFunc, Name: "RunWithRuntime", Reason: "deleted serve API"}, {Package: "internal/stdhttp", Kind: SymbolFunc, Name: "NewStandardHandler", Reason: "deleted Built-era handler"}, {Package: "internal/stdhttp", Kind: SymbolFunc, Name: "releaseBuiltResources", Reason: "deleted Built closer release"}, {Package: "internal/stdhttp", Kind: SymbolFunc, Name: "runClosers", Reason: "deleted closer runner"}, {Package: "internal/stdhttp", Kind: SymbolFunc, Name: "standardHTTPInputFromBuilt", Reason: "deleted Built projector"}, {Package: "internal/stdhttp", Kind: SymbolFunc, Name: "shutdownGenerationHost", Reason: "Host.Close owns shutdown"}, {Package: "internal/stdhttp", Kind: SymbolFunc, Name: "closeProcessServices", Reason: "Host.Close owns process close"}, {Package: "cmd/lipstd", Kind: SymbolFunc, Name: "tracingDeferred", Reason: "Host.Close owns tracing shutdown"}, {Package: "cmd/lipstd", Kind: SymbolFunc, Name: "deferHostTracingShutdown", Reason: "Host.Close owns tracing shutdown"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "adaptLegacyOptions", Reason: "legacy options adapter deleted"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "prepareCanonicalProduction", Reason: "legacy options helper deleted"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "filterDescriptorsByFamily", Reason: "legacy options helper deleted"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "descriptorHasFamily", Reason: "legacy options helper deleted"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "legacyRequestRegistrations", Reason: "legacy options helper deleted"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "legacyAttemptRegistrations", Reason: "legacy options helper deleted"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "legacyConcurrencyRegistration", Reason: "legacy options helper deleted"}, {Package: "pkg/lipruntime", Kind: SymbolConst, Name: "legacyProductionRaterID", Reason: "legacy options id deleted"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "mapTriggerIn", Reason: "reload field mapper deleted"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "mapTriggerOut", Reason: "reload field mapper deleted"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "mapCategoryOut", Reason: "reload field mapper deleted"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "mapResultOut", Reason: "reload field mapper deleted"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "mapHistoryOut", Reason: "reload field mapper deleted"}, {Package: "pkg/lipruntime", Kind: SymbolFunc, Name: "mapStatusOut", Reason: "reload field mapper deleted"}, {Package: "internal/core/configreload", Kind: SymbolType, Name: "TriggerKind", Reason: "contract owned by pkg/lipsdk/configreload"}, {Package: "internal/core/configreload", Kind: SymbolType, Name: "Trigger", Reason: "contract owned by pkg/lipsdk/configreload"}, {Package: "internal/core/configreload", Kind: SymbolType, Name: "Result", Reason: "contract owned by pkg/lipsdk/configreload"}, {Package: "internal/core/configreload", Kind: SymbolType, Name: "Status", Reason: "contract owned by pkg/lipsdk/configreload"}, {Package: "internal/core/configreload", Kind: SymbolType, Name: "HistoryEntry", Reason: "contract owned by pkg/lipsdk/configreload"}, {Package: "internal/core/configreload", Kind: SymbolType, Name: "ReloadTrigger", Reason: "contract owned by pkg/lipsdk/configreload"}, {Package: "internal/core/configreload", Kind: SymbolType, Name: "ReloadResult", Reason: "contract owned by pkg/lipsdk/configreload"}, {Package: "internal/core/configreload", Kind: SymbolType, Name: "ReloadStatus", Reason: "contract owned by pkg/lipsdk/configreload"}, {Package: "internal/core/configreload", Kind: SymbolType, Name: "ResultCategory", Reason: "contract owned by pkg/lipsdk/configreload"}, {Package: "internal/featurebundle", Kind: SymbolType, Name: "Merged" + "Feature" + "Surface", Reason: "legacy feature" + " surface type deleted"}, {Package: "internal/featurebundle", Kind: SymbolFunc, Name: "Merge" + "Bundles", Reason: "legacy unchecked" + " bundle merge deleted"}, {Package: "internal/featurebundle", Kind: SymbolFunc, Name: "Merge" + "BundlesChecked", Reason: "legacy checked" + " bundle merge deleted"}, {Package: "internal/featurebundle", Kind: SymbolFunc, Name: "Merge" + "FeatureSurface", Reason: "legacy singular" + " surface merge deleted"}, {Package: "internal/featurebundle", Kind: SymbolFunc, Name: "Merge" + "FeatureSurfaces", Reason: "legacy plural" + " surface merge deleted"}, {Package: "internal/featurebundle", Kind: SymbolFunc, Name: "Merge" + "BundlesViaGenerated", Reason: "legacy generated-to-legacy" + " bundle merge deleted"}, {Package: "internal/featurebundle", Kind: SymbolFunc, Name: "Merge" + "FeatureSurfaceViaGenerated", Reason: "legacy generated-to-legacy" + " surface merge deleted"}, {Package: "internal/featurebundle", Kind: SymbolMethod, Name: "To" + "Merged" + "Feature" + "Surface", Reason: "legacy surface" + " projection method deleted"}, {Package: "internal/featurebundle", Kind: SymbolMethod, Receiver: "Merged" + "Feature" + "Surface", Name: "App" + "end", Reason: "legacy mutable append" + " method deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "extensions" + "FromMerged", Reason: "legacy runtime extension" + " projection deleted"}, {Package: "internal/infra/runtimebundle", Kind: SymbolFunc, Name: "hooksConfig" + "FromMerged", Reason: "legacy hook config" + " projection deleted"}, {Package: "internal/testkit/planeparity", Kind: SymbolFunc, Name: "Assert" + "MergedSurfacesEqual", Reason: "legacy surface equality" + " testkit helper deleted"}, {Package: "internal/testkit/planeparity", Kind: SymbolFunc, Name: "Assert" + "DualPathParity", Reason: "legacy dual path" + " parity testkit helper deleted"}, {Package: "internal/testkit/planeparity", Kind: SymbolFunc, Name: "Assert" + "GeneratedSurfaceInvariants", Reason: "superseded by Assert" + "GeneratedMergeInvariants"}, {Package: "internal/core/interleavedstate", Kind: SymbolType, Name: "MemoRef", Reason: "memo reference owned by interleavedthinking feature"}, {Package: "internal/core/config", Kind: SymbolConst, Name: "DefaultInterleavedInstructions", Reason: "prompt owned by interleavedthinking feature"}, {Package: "internal/core/config", Kind: SymbolFunc, Name: "ResolveInterleavedInstructions", Reason: "instruction loading owned by interleavedthinking feature"}, {Package: "internal/core/config", Kind: SymbolType, Name: "PromptCacheConfig", Reason: "prompt-cache keepwarm configuration owned by keepwarm feature"}, {Package: "internal/core/config", Kind: SymbolMethod, Receiver: "Config", Name: "EffectiveKeepwarm", Reason: "keepwarm configuration owned by keepwarm feature"}, }
ForbiddenDeclarations is the permanent deleted-symbol inventory.
var ForbiddenImports = []ForbiddenImportRule{}/* 108 elements not displayed */
ForbiddenImports is the permanent package-level import deny-list.
var KnownPlaneFields = map[string]PlaneFieldMetadata{ "SubmitHooks": {PlaneID: "submit_hooks", Wave: Wave1_HookBus}, "RequestPartHooks": {PlaneID: "request_part_hooks", Wave: Wave1_HookBus}, "ResponsePartHooks": {PlaneID: "response_part_hooks", Wave: Wave1_HookBus}, "ToolReactors": {PlaneID: "tool_reactors", Wave: Wave1_HookBus}, "TrafficObservers": {PlaneID: "traffic_observers", Wave: Wave2_Observers}, "UsageObservers": {PlaneID: "usage_observers", Wave: Wave2_Observers}, "RawCaptureSinks": {PlaneID: "raw_capture_sinks", Wave: Wave2_Observers}, "TrafficRedactors": {PlaneID: "traffic_redactors", Wave: Wave2_Observers}, "StreamObserverFactories": {PlaneID: "stream_observer_factories", Wave: Wave2_Observers}, "RequestTransforms": {PlaneID: "request_transforms", Wave: Wave3_RequestShaping}, "PreRequestHandlers": {PlaneID: "pre_request_handlers", Wave: Wave3_RequestShaping}, "RouteHintProviders": {PlaneID: "route_hint_providers", Wave: Wave3_RequestShaping}, "CompletionGates": {PlaneID: "completion_gates", Wave: Wave3_RequestShaping}, "AttemptTransforms": {PlaneID: "attempt_transforms", Wave: Wave3_RequestShaping}, "SessionOpeners": {PlaneID: "session_openers", Wave: Wave3_RequestShaping}, "WorkspaceResolvers": {PlaneID: "workspace_resolvers", Wave: Wave3_RequestShaping}, "ToolCatalogFilters": {PlaneID: "tool_catalog_filters", Wave: Wave4_Tools}, "ToolCallPolicies": {PlaneID: "tool_call_policies", Wave: Wave4_Tools}, "ToolCallFinalizers": {PlaneID: "tool_call_finalizers", Wave: Wave4_Tools}, "ToolCallFinalizationMaxArgsBytes": {PlaneID: "tool_call_finalization_max_args_bytes", Wave: Wave4_Tools}, "ControlToolProvider": {PlaneID: "control_tool_provider", Wave: Wave4_Tools}, "controlToolProviderID": {PlaneID: "control_tool_provider", Wave: Wave4_Tools}, "controlToolProvider": {PlaneID: "control_tool_provider", Wave: Wave4_Tools}, "SecretGuards": {PlaneID: "secret_guards", Wave: Wave5a_GuardsCompaction}, "CompactionObservers": {PlaneID: "compaction_observers", Wave: Wave5a_GuardsCompaction}, "CompactionPreservers": {PlaneID: "compaction_preservers", Wave: Wave5a_GuardsCompaction}, "LocalTurnHandlers": {PlaneID: "local_turn_handlers", Wave: Wave5b_LocalTurnTerminal}, "TerminalDecisionProvider": {PlaneID: "terminal_decision_provider", Wave: Wave5b_LocalTurnTerminal}, "terminalDecisionProviderID": {PlaneID: "terminal_decision_provider", Wave: Wave5b_LocalTurnTerminal}, "terminalDecisionProvider": {PlaneID: "terminal_decision_provider", Wave: Wave5b_LocalTurnTerminal}, "SessionClassifier": {PlaneID: "session_classifier", Wave: Wave5c_Residual}, "sessionClassifier": {PlaneID: "session_classifier", Wave: Wave5c_Residual}, "sessionClassifierID": {PlaneID: "session_classifier", Wave: Wave5c_Residual}, }
KnownPlaneFields maps struct field and identifier names to plane metadata.
var KnownPlaneIDs = map[string]PlaneFieldMetadata{ "submit_hooks": {PlaneID: "submit_hooks", Wave: Wave1_HookBus}, "request_part_hooks": {PlaneID: "request_part_hooks", Wave: Wave1_HookBus}, "response_part_hooks": {PlaneID: "response_part_hooks", Wave: Wave1_HookBus}, "tool_reactors": {PlaneID: "tool_reactors", Wave: Wave1_HookBus}, "traffic_observers": {PlaneID: "traffic_observers", Wave: Wave2_Observers}, "usage_observers": {PlaneID: "usage_observers", Wave: Wave2_Observers}, "raw_capture_sinks": {PlaneID: "raw_capture_sinks", Wave: Wave2_Observers}, "traffic_redactors": {PlaneID: "traffic_redactors", Wave: Wave2_Observers}, "stream_observer_factories": {PlaneID: "stream_observer_factories", Wave: Wave2_Observers}, "request_transforms": {PlaneID: "request_transforms", Wave: Wave3_RequestShaping}, "pre_request_handlers": {PlaneID: "pre_request_handlers", Wave: Wave3_RequestShaping}, "route_hint_providers": {PlaneID: "route_hint_providers", Wave: Wave3_RequestShaping}, "completion_gates": {PlaneID: "completion_gates", Wave: Wave3_RequestShaping}, "attempt_transforms": {PlaneID: "attempt_transforms", Wave: Wave3_RequestShaping}, "session_openers": {PlaneID: "session_openers", Wave: Wave3_RequestShaping}, "workspace_resolvers": {PlaneID: "workspace_resolvers", Wave: Wave3_RequestShaping}, "tool_catalog_filters": {PlaneID: "tool_catalog_filters", Wave: Wave4_Tools}, "tool_call_policies": {PlaneID: "tool_call_policies", Wave: Wave4_Tools}, "tool_call_finalizers": {PlaneID: "tool_call_finalizers", Wave: Wave4_Tools}, "tool_call_finalization_max_args_bytes": {PlaneID: "tool_call_finalization_max_args_bytes", Wave: Wave4_Tools}, "secret_guards": {PlaneID: "secret_guards", Wave: Wave5a_GuardsCompaction}, "compaction_observers": {PlaneID: "compaction_observers", Wave: Wave5a_GuardsCompaction}, "compaction_preservers": {PlaneID: "compaction_preservers", Wave: Wave5a_GuardsCompaction}, "local_turn_handlers": {PlaneID: "local_turn_handlers", Wave: Wave5b_LocalTurnTerminal}, "terminal_decision_provider": {PlaneID: "terminal_decision_provider", Wave: Wave5b_LocalTurnTerminal}, "session_classifier": {PlaneID: "session_classifier", Wave: Wave5c_Residual}, "control_tool_provider": {PlaneID: "control_tool_provider", Wave: Wave4_Tools}, }
KnownPlaneIDs maps canonical plane IDs to plane metadata.
var LineBudgets = []LineBudget{
{Dir: "internal/core", Max: 216000},
{Dir: "internal/pluginreg", Max: 7000},
{Dir: "internal/stdhttp", Max: 14000},
{Dir: "internal/infra/runtimebundle", Max: 22000},
{Dir: "internal/standardplugins/featurehost", Max: 9000},
{Dir: "internal/compactionfacts", Max: 6000},
{Dir: "internal/capabilityfacts", Max: 6000},
{Dir: "cmd/lipstd", Max: 6000},
{Dir: "pkg/lipruntime", Max: 6000},
}
LineBudgets uses the same fixed recursive-tree policy as PackageTreeBudgets. Overlapping entries must stay synchronized with the package-tree table.
var PackageTreeBudgets = []PackageTreeBudget{
{Tree: "internal/infra/runtimebundle", Max: 22000},
{Tree: "internal/standardplugins/featurehost", Max: 9000},
{Tree: "internal/stdhttp", Max: 14000},
{Tree: "cmd/lipstd", Max: 6000},
{Tree: "pkg/lipruntime", Max: 6000},
}
PackageTreeBudgets uses measured lines plus max(5000, ceil(50% of measured)), rounded up to the next 1000. Values are fixed snapshots and match overlapping LineBudgets entries exactly.
var RetiredPackageDirs = []string{
"internal/core/toolcallrepair",
"internal/core/secretguard",
"internal/core/compactiondetect",
"internal/core/compactioncontinuity",
"internal/core/conversationview",
"internal/core/interleavedthinking",
"internal/core/keepwarm",
"internal/core/terminaldecisionpolicy",
"internal/reasoningreplay",
"internal/infra/reasoningcompose",
"internal/infra/secretguardcompose",
"internal/infra/secretaudit",
"internal/infra/compactioncompose",
}
RetiredPackageDirs lists retired package directory trees that must not contain any production Go files.
var RuntimeConvergenceAffectedSurfaces = []AffectedSurfaceBaseline{
{Tree: "internal/infra/runtimebundle", BaselineLines: 9898},
{Tree: "internal/infra/runtimehost", BaselineLines: 3056},
{Tree: "internal/stdhttp", BaselineLines: 4666},
{Tree: "cmd/lipstd", BaselineLines: 985},
{Tree: "pkg/lipruntime", BaselineLines: 1037},
}
RuntimeConvergenceAffectedSurfaces is the Requirement 11.5 inventory.
Functions ¶
func AlgLegacyStrategyIsolationSpec ¶
func AlgLegacyStrategyIsolationSpec() algStrategyIsolationSpec
AlgLegacyStrategyIsolationSpec is design ratchet 8: the legacy semantic-verifier strategy must not reach the proxy-owned control tool, so the two strategies keep their fixed vocabularies (Requirement 9.5).
func AlgPreferredStrategyIsolationSpec ¶
func AlgPreferredStrategyIsolationSpec() algStrategyIsolationSpec
AlgPreferredStrategyIsolationSpec is design ratchet 7: the preferred explicit-completion strategy must construct no verifier and reach no verifier call, because it judges a completion protocol rather than a semantic verdict (Requirement 9.4).
func BillingExposureDeletionTargetPresent ¶
func BillingExposureDeletionTargetPresent(root string, target BillingExposureDeletionTarget) (bool, error)
BillingExposureDeletionTargetPresent reports whether a recorded brownfield target still exists in production source.
func BillingFinalConvergenceDeletionTargetPresent ¶
func BillingFinalConvergenceDeletionTargetPresent(root string, target BillingFinalConvergenceDeletionTarget) (bool, error)
BillingFinalConvergenceDeletionTargetPresent reports whether a recorded deletion target still exists in the working tree.
func BillingFinalConvergenceDeletionTargetPresentFS ¶
func BillingFinalConvergenceDeletionTargetPresentFS(fs archtestFS, target BillingFinalConvergenceDeletionTarget) (bool, error)
func CountBillingExposurePackageLines ¶
CountBillingExposurePackageLines counts non-test .go lines under rel, skipping .worktrees, vendor, testdata, and test files.
func CountBillingExposureSurfaceLines ¶
func CountBillingExposureSurfaceLines(root string, surface BillingExposureSurface) (int, error)
CountBillingExposureSurfaceLines counts non-test production lines for one surface.
func CountBillingFinalConvergenceRootLines ¶
func CountBillingFinalConvergenceRootLines(root string, entry BillingFinalConvergenceRoot, excludedGlobs []string) (int, error)
func CountBillingFinalConvergenceRootLinesFS ¶
func CountBillingFinalConvergenceRootLinesFS(fs archtestFS, entry BillingFinalConvergenceRoot, excludedGlobs []string) (int, error)
func CountFileLines ¶
CountFileLines counts physical lines in one file.
func CountNonTestGoLines ¶
CountNonTestGoLines recursively counts physical lines in non-test .go files.
func DeclExists ¶
func DeclExists(f *ast.File, r ForbiddenDeclRule) bool
DeclExists reports whether rule matches a declaration in f.
func DiscoverDeclaredInterfaceAssertions ¶
DiscoverDeclaredInterfaceAssertions returns all asserted interface names declared as `var _ <Interface> = ...` in f.
func DiscoverDialectSensitivePackages ¶
func DiscoverDialectSensitivePackages(repoRoot string) (map[string][]DialectFinding, error)
DiscoverDialectSensitivePackages scans production Go files and groups dialect-sensitive findings by package directory.
func DiscoverMigrationRoots ¶
DiscoverMigrationRoots walks production trees to find directories containing versioned Bun migration files.
func FileImportPaths ¶
FileImportPaths returns the import paths declared in f.
func FindRepoRoot ¶
FindRepoRoot walks upward from dir until go.mod is found.
func FormatExtensionPlanesManifestSection ¶
FormatExtensionPlanesManifestSection renders the markdown section for manifest declaration & generation status.
func FormatExtensionPlanesMirrorSection ¶
FormatExtensionPlanesMirrorSection renders the markdown section for mirror measurements per wave.
func FormatExtensionPlanesPathSection ¶
func FormatExtensionPlanesPathSection() string
FormatExtensionPlanesPathSection renders the markdown section for path classification.
func FormatExtensionPlanesReport ¶
FormatExtensionPlanesReport renders all extension-plane architecture report sections.
func FormatRuntimeConvergencePackageBudgets ¶
FormatRuntimeConvergencePackageBudgets renders the advisory Markdown section.
func GenerateExtensionPlanesBaselineJSON ¶
GenerateExtensionPlanesBaselineJSON generates formatted baseline JSON for extension planes.
func GenerateFeaturePlanesCode ¶
GenerateFeaturePlanesCode parses plane_manifest.go source bytes and returns the formatted Go code for plane_generated.go.
func HasIntegrationBuildTag ¶
HasIntegrationBuildTag checks if the source code contains //go:build integration or // +build integration.
func IsAllowedObserverProjection ¶
IsAllowedObserverProjection reports whether qualifiedSymbol is in the qualified-symbol allowlist for observer projection.
func IsAllowedStageConsumer ¶
IsAllowedStageConsumer checks if a fully-qualified Go symbol is explicitly recorded in AllowedStageConsumers.
func IsGeneratedFile ¶
IsGeneratedFile reports whether f (or src/path) contains a canonical generated code header comment before the package clause. In accordance with the Go generated-code convention, the marker must be a single-line comment matching '^// Code generated .* DO NOT EDIT\.$' occurring before the package declaration. Filename suffixes alone are not exempt.
func IsThinDelegate ¶
IsThinDelegate reports whether a function/method is a strictly thin delegate whose body contains either:
- exactly one return statement calling Get or FrozenIdentity from pkg/lipsdk/feature, or RequestExecutionView, OR
- an optional initial receiver nil guard (if receiver == nil { return nil }) with no else or side effects, followed by exactly one return statement calling Get, FrozenIdentity, or RequestExecutionView.
func MatchImportPattern ¶
MatchImportPattern reports whether importPath matches a simple pattern. Patterns may be exact paths, suffix "/name", or contain a substring marker.
func MatchPathPrefix ¶
MatchPathPrefix reports whether path equals prefix or is under prefix/.
func PackageDirFromRel ¶
PackageDirFromRel returns the repo-relative package directory for a .go file (parent of the file, forward slashes).
func ParseGoSource ¶
ParseGoSource parses src with SkipObjectResolution and ParseComments.
func ProductionScanRoots ¶
func ProductionScanRoots() []string
ProductionScanRoots are the top-level trees walked for production guardrails.
func QualifiedSymbol ¶
QualifiedSymbol returns the fully-qualified symbol name for a FuncDecl given its relative file path. For methods: "pkg/path.(*ReceiverType).MethodName" or "pkg/path.(ReceiverType).MethodName" For functions: "pkg/path.FunctionName"
func ValidateCapabilityEvidence ¶
func ValidateCapabilityEvidence(repoRoot string, cap dbparity.Capability) error
ValidateCapabilityEvidence validates that a capability's evidence anchor: - is non-empty / not blank - resolves to an existing file (not a directory) within repoRoot - the file is non-empty (> 0 bytes) - if a symbol anchor is specified (:SymbolName), the symbol exists in the file AST - for non-common capabilities, Rationale is non-empty
func WalkAllGoFiles ¶
WalkAllGoFiles is an alias for WalkGoFiles.
func WalkGoFiles ¶
WalkGoFiles walks all .go files (including _test.go) under ProductionScanRoots. For performance during multi-suite test runs, files for each root are loaded into an in-memory snapshot on first access. The callback receives repo-relative slash path, absolute path, and an isolated copy of file bytes.
func WalkProductionGoFiles ¶
WalkProductionGoFiles walks non-test .go files under ProductionScanRoots. For performance during multi-suite test runs, files for each root are loaded into an in-memory snapshot on first access. The callback receives repo-relative slash path, absolute path, and an isolated copy of file bytes.
func WriteExtensionPlanesBaseline ¶
WriteExtensionPlanesBaseline writes the baseline JSON artifact to testdata/architecture/extension_planes_baseline.json.
func WriteGeneratedFileAtomic ¶
WriteGeneratedFileAtomic atomically installs one generated file via temp write + sync + rename.
Types ¶
type AffectedSurfaceBaseline ¶
AffectedSurfaceBaseline locks one Req 11.5 surface baseline.
type AffectedSurfaceMeasurement ¶
AffectedSurfaceMeasurement is one surface's baseline-versus-current delta.
type BillingExposureBaselineFile ¶
type BillingExposureBaselineFile struct {
SchemaVersion int `json:"schema_version"`
Feature string `json:"feature"`
Phase string `json:"phase"`
RequireNetLOCReduction bool `json:"require_net_loc_reduction"`
ForbidHoldSymbols bool `json:"forbid_hold_symbols"`
AuthoritativeFlow string `json:"authoritative_flow"`
CurrentFlow string `json:"current_flow"`
TargetFlow string `json:"target_flow"`
BaselineTotal int `json:"baseline_total"`
Surfaces []BillingExposureSurface `json:"surfaces"`
DeletionTargets []BillingExposureDeletionTarget `json:"deletion_targets"`
PlannedRatchets []BillingExposurePlannedRatchet `json:"planned_ratchets"`
}
BillingExposureBaselineFile is the committed inventory plus activated final ratchets.
func DecodeBillingExposureBaseline ¶
func DecodeBillingExposureBaseline(raw []byte) (BillingExposureBaselineFile, error)
DecodeBillingExposureBaseline parses a billing-exposure baseline document.
func LoadBillingExposureBaseline ¶
func LoadBillingExposureBaseline(root string) (BillingExposureBaselineFile, error)
LoadBillingExposureBaseline reads the committed 0.1 JSON lock.
type BillingExposureDeletionTarget ¶
type BillingExposureDeletionTarget struct {
ID string `json:"id"`
Kind string `json:"kind"` // type, const, func, ident, schema
Package string `json:"package,omitempty"`
Name string `json:"name,omitempty"`
Files []string `json:"files,omitempty"`
Marker string `json:"marker,omitempty"`
LegacyRecoveryFiles []string `json:"legacy_recovery_files,omitempty"`
RetirementVerifierFiles []string `json:"retirement_verifier_files,omitempty"`
Present bool `json:"present"`
Status string `json:"status"`
Reason string `json:"reason"`
}
BillingExposureDeletionTarget records a brownfield symbol/file/schema that later phases must retire. Task 0.1 records present=true. Task 0.4 evaluates the same inventory as planned until ForbidHoldSymbols is true (task 7.1).
type BillingExposureMeasurement ¶
type BillingExposureMeasurement struct {
Surfaces []BillingExposureSurfaceMeasurement
Total int
}
BillingExposureMeasurement is the live count for the locked surface set.
func MeasureBillingExposureBaseline ¶
func MeasureBillingExposureBaseline(root string) (BillingExposureMeasurement, error)
MeasureBillingExposureBaseline recounts production lines for every locked surface.
type BillingExposurePlannedRatchet ¶
type BillingExposurePlannedRatchet struct {
ID string `json:"id"`
Status string `json:"status"` // planned | active
ActivationFlag string `json:"activation_flag,omitempty"`
ActivationTask string `json:"activation_task"`
Requirements []string `json:"requirements"`
DeletionTargetIDs []string `json:"deletion_target_ids,omitempty"`
Files []string `json:"files,omitempty"`
CurrentMarkers []string `json:"current_markers,omitempty"`
ForbiddenWhenActivated []string `json:"forbidden_when_activated,omitempty"`
RequiredWhenActivated []string `json:"required_when_activated,omitempty"`
EndState string `json:"end_state"`
}
BillingExposurePlannedRatchet is an end-state architecture forbid. Status "planned" asserts inventory until the named activation flag is flipped.
func BillingExposurePlannedRatchetByID ¶
func BillingExposurePlannedRatchetByID(doc BillingExposureBaselineFile, id string) (BillingExposurePlannedRatchet, bool)
BillingExposurePlannedRatchetByID returns a named planned ratchet.
type BillingExposureSurface ¶
type BillingExposureSurface struct {
ID string `json:"id"`
Kind string `json:"kind"` // package or glob
Path string `json:"path"`
Match string `json:"match,omitempty"`
BaselineLines int `json:"baseline_lines"`
}
BillingExposureSurface describes one production billing-convergence surface.
type BillingExposureSurfaceMeasurement ¶
type BillingExposureSurfaceMeasurement struct {
ID string
Kind string
Path string
Match string
CurrentLines int
}
BillingExposureSurfaceMeasurement is one surface's current production LOC.
type BillingFinalConvergenceBaselineFile ¶
type BillingFinalConvergenceBaselineFile struct {
SchemaVersion int `json:"schema_version"`
BaselineSHA string `json:"baseline_sha"`
CountingMethod string `json:"counting_method"`
DenominatorLOC int `json:"denominator_loc"`
IncludedRoots []BillingFinalConvergenceRoot `json:"included_roots"`
IncludedFiles []BillingFinalConvergenceFile `json:"included_files"`
IncludedDeclarations []BillingFinalConvergenceDeclaration `json:"included_declarations"`
ExcludedGlobs []string `json:"excluded_globs"`
SeedSymbols []string `json:"seed_symbols"`
SymbolFollowingVersion int `json:"symbol_following_version"`
DeletionTargets []BillingFinalConvergenceDeletionTarget `json:"deletion_targets"`
PlannedRatchets []BillingFinalConvergencePlannedRatchet `json:"planned_ratchets"`
}
BillingFinalConvergenceBaselineFile is the checked-in Phase-0 artifact.
func DecodeBillingFinalConvergenceBaseline ¶
func DecodeBillingFinalConvergenceBaseline(raw []byte) (BillingFinalConvergenceBaselineFile, error)
DecodeBillingFinalConvergenceBaseline parses a baseline document.
func LoadBillingFinalConvergenceBaseline ¶
func LoadBillingFinalConvergenceBaseline(root string) (BillingFinalConvergenceBaselineFile, error)
LoadBillingFinalConvergenceBaseline reads the checked-in Phase-0 JSON artifact.
type BillingFinalConvergenceDeclaration ¶
type BillingFinalConvergenceDeclaration struct {
File string `json:"file"`
Name string `json:"name"`
Kind string `json:"kind"` // type|const|var|func|method
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
Loc int `json:"loc"` // end_line - start_line + 1
DeclaredNames []string `json:"declared_names"`
Cause string `json:"cause"` // symbol-followed:v1 | executor-config
CausedBy string `json:"caused_by,omitempty"`
}
BillingFinalConvergenceDeclaration is one followed or pinned declaration contributing to the denominator (design 12.3 step 5).
func ComputeBillingFinalConvergenceSymbolInventory ¶
func ComputeBillingFinalConvergenceSymbolInventory(root string, doc BillingFinalConvergenceBaselineFile) ([]BillingFinalConvergenceDeclaration, error)
func ComputeBillingFinalConvergenceSymbolInventoryFS ¶
func ComputeBillingFinalConvergenceSymbolInventoryFS(fs archtestFS, doc BillingFinalConvergenceBaselineFile) ([]BillingFinalConvergenceDeclaration, error)
type BillingFinalConvergenceDeletionTarget ¶
type BillingFinalConvergenceDeletionTarget struct {
ID string `json:"id"`
Kind string `json:"kind"` // type|const|func|method|field|ident|schema
Package string `json:"package,omitempty"`
Name string `json:"name,omitempty"`
Files []string `json:"files,omitempty"`
Marker string `json:"marker,omitempty"`
HistoricalReaders []string `json:"historical_readers,omitempty"`
Present bool `json:"present"`
Status string `json:"status"` // planned|active
RetiringPhase string `json:"retiring_phase,omitempty"`
Reason string `json:"reason"`
CurrentConsumers []string `json:"current_consumers,omitempty"`
CurrentWriters []string `json:"current_writers,omitempty"`
RetentionRationale string `json:"retention_rationale,omitempty"`
}
BillingFinalConvergenceDeletionTarget records a brownfield symbol/schema that later phases retire. Phase 0 records present=true and status="planned".
type BillingFinalConvergenceDenominatorMeasurement ¶
type BillingFinalConvergenceDenominatorMeasurement struct {
RootLines int
FileLines int
DeclarationLines int
DenominatorLOC int
Roots []BillingFinalConvergenceRootMeasurement
Files []BillingFinalConvergenceFileMeasurement
SymbolDeclarations []BillingFinalConvergenceDeclaration
ExecutorConfigMissing []string
}
BillingFinalConvergenceDenominatorMeasurement is the recomputed denominator breakdown for deterministic reproducibility checks.
func MeasureBillingFinalConvergenceCurrentDenominator ¶
func MeasureBillingFinalConvergenceCurrentDenominator(root string, doc BillingFinalConvergenceBaselineFile) (BillingFinalConvergenceDenominatorMeasurement, error)
MeasureBillingFinalConvergenceCurrentDenominator measures the denominator against the working tree.
func MeasureBillingFinalConvergenceDenominator ¶
func MeasureBillingFinalConvergenceDenominator(root string, doc BillingFinalConvergenceBaselineFile) (BillingFinalConvergenceDenominatorMeasurement, error)
MeasureBillingFinalConvergenceDenominator recomputes the physical-go-lines-v1 denominator from the artifact inventory against the pinned Git commit SHA.
func MeasureBillingFinalConvergenceDenominatorFS ¶
func MeasureBillingFinalConvergenceDenominatorFS(fs archtestFS, doc BillingFinalConvergenceBaselineFile) (BillingFinalConvergenceDenominatorMeasurement, error)
MeasureBillingFinalConvergenceDenominatorFS recomputes the physical-go-lines-v1 denominator from the artifact inventory against the given FS.
type BillingFinalConvergenceFile ¶
type BillingFinalConvergenceFile struct {
ID string `json:"id"`
Path string `json:"path"`
BaselineLines int `json:"baseline_lines"`
}
BillingFinalConvergenceFile is a whole production .go file counted wholesale (runtime billing_*.go and runtimebundle billing composition).
type BillingFinalConvergencePlannedRatchet ¶
type BillingFinalConvergencePlannedRatchet struct {
ID string `json:"id"`
Status string `json:"status"` // planned|active
ActivationFlag string `json:"activation_flag,omitempty"`
ActivationTask string `json:"activation_task"`
Requirements []string `json:"requirements"`
DeletionTargetIDs []string `json:"deletion_target_ids,omitempty"`
EndState string `json:"end_state"`
}
BillingFinalConvergencePlannedRatchet is a non-activated end-state forbid.
type BillingFinalConvergenceRoot ¶
type BillingFinalConvergenceRoot struct {
ID string `json:"id"`
Path string `json:"path"`
BaselineLines int `json:"baseline_lines"`
}
BillingFinalConvergenceRoot is a whole-file package root counted wholesale.
type CoreOwnershipCategory ¶
type CoreOwnershipCategory string
CoreOwnershipCategory classifies why a top-level internal/core package may remain in the kernel after feature-ownership full closure (Req 12.3/13.2).
const ( // CoreOwnershipKernelInvariant is required for correct base proxy behavior // with all optional standard features disabled, or is a universal invariant. CoreOwnershipKernelInvariant CoreOwnershipCategory = "kernel invariant" // CoreOwnershipGenericExtension is a feature-neutral extension or // orchestration mechanism with recorded independent consumers. CoreOwnershipGenericExtension CoreOwnershipCategory = "generic extension mechanism" )
type CoreOwnershipEntry ¶
type CoreOwnershipEntry struct {
Package string
Category CoreOwnershipCategory
Reason string
Consumers string
}
CoreOwnershipEntry justifies one surviving top-level internal/core package. Consumers is required for generic extension mechanisms and names at least two independent consumers/producers or a universal invariant.
type CriticalFileBudget ¶
CriticalFileBudget caps the non-test line count for hotspot files.
type DialectFinding ¶
DialectFinding records a discovered database dialect indicator in production source code.
func (DialectFinding) String ¶
func (f DialectFinding) String() string
type ExtensionPlaneManifestStatus ¶
type ExtensionPlaneManifestStatus struct {
PlaneCount int `json:"plane_count"`
PlaneIDs []string `json:"plane_ids"`
PlaneMultiplicities map[string]string `json:"-"`
GeneratedOutputCurrency string `json:"generated_output_currency"`
IsGeneratedUpToDate bool `json:"is_generated_up_to_date"`
ManifestPath string `json:"manifest_path"`
GeneratedPath string `json:"generated_path"`
}
ExtensionPlaneManifestStatus captures declaration count, plane IDs, and generated-output currency.
func MeasureManifestStatus ¶
func MeasureManifestStatus(root string) (ExtensionPlaneManifestStatus, error)
MeasureManifestStatus parses plane_manifest.go and checks generated output currency.
type ExtensionPlanePathEntry ¶
type ExtensionPlanePathEntry struct {
Path string `json:"path"`
Category string `json:"category"` // "generated" or "hand_authored"
Role string `json:"role"`
Description string `json:"description,omitempty"`
}
ExtensionPlanePathEntry classifies one repository path in the extension plane architecture.
type ExtensionPlanePathManifest ¶
type ExtensionPlanePathManifest struct {
Generated []ExtensionPlanePathEntry `json:"generated"`
HandAuthored []ExtensionPlanePathEntry `json:"hand_authored"`
}
ExtensionPlanePathManifest holds segregated generated and hand-authored paths.
func StandardExtensionPlanePaths ¶
func StandardExtensionPlanePaths() ExtensionPlanePathManifest
StandardExtensionPlanePaths returns standard classified generated and hand-authored paths.
type ExtensionPlanesBaselineDocument ¶
type ExtensionPlanesBaselineDocument struct {
SchemaVersion int `json:"schema_version"`
Description string `json:"description"`
ActiveWave string `json:"active_wave"`
ActiveWaveOrdinal int `json:"active_wave_ordinal"`
TotalPlanes int `json:"total_planes"`
TotalRemainingMirrors int `json:"total_remaining_mirrors"`
ActiveForbiddenMirrors int `json:"active_forbidden_mirrors"`
Manifest ExtensionPlaneManifestStatus `json:"manifest"`
WaveMeasurements []WaveMirrorFamily `json:"wave_measurements"`
PathClassifications ExtensionPlanePathManifest `json:"path_classifications"`
}
ExtensionPlanesBaselineDocument is the serializable baseline artifact structure.
func BuildExtensionPlanesBaselineDocument ¶
func BuildExtensionPlanesBaselineDocument(root string) (*ExtensionPlanesBaselineDocument, error)
BuildExtensionPlanesBaselineDocument constructs the baseline artifact data.
type ForbiddenDeclRule ¶
type ForbiddenDeclRule struct {
Package string // repo-relative package dir (e.g. internal/infra/runtimebundle)
Kind SymbolKind // declaration kind
Receiver string // optional receiver base type name for SymbolMethod
Name string // exact symbol name
Reason string // short rationale
}
ForbiddenDeclRule forbids a package-scope declaration by exact name.
type ForbiddenImportRule ¶
type ForbiddenImportRule struct {
SourcePattern string // repo-relative package dir pattern
TargetPattern string // import path (exact package) or substring marker starting with /
Reason string
ExceptPrefix []string // allowed import path prefixes
}
ForbiddenImportRule forbids an import edge from source packages to a target pattern.
type ForbiddenMirrorPredicate ¶
type ForbiddenMirrorPredicate func(relPath string, node ast.Node, fset *token.FileSet, maxCompletedWave MigrationWave) (MirrorFinding, bool)
ForbiddenMirrorPredicate inspects an AST node in a file and returns a finding if forbidden.
type LineBudget ¶
LineBudget caps recursive non-test lines for a broader architectural layer.
type MigrationWave ¶
type MigrationWave int
MigrationWave represents the progressive wave boundary for plane consolidation.
const ( Wave0_Baseline MigrationWave = 0 Wave1_HookBus MigrationWave = 1 Wave2_Observers MigrationWave = 2 Wave3_RequestShaping MigrationWave = 3 Wave4_Tools MigrationWave = 4 Wave5a_GuardsCompaction MigrationWave = 5 Wave5b_LocalTurnTerminal MigrationWave = 6 Wave5c_Residual MigrationWave = 7 )
func (MigrationWave) String ¶
func (w MigrationWave) String() string
type MirrorFinding ¶
type MirrorFinding struct {
File string
Line int
ShapeKind MirrorShapeKind
PlaneID string
Identifier string
Detail string
Wave MigrationWave
}
MirrorFinding is one violation where a forbidden mirror exists past its wave.
func ScanFileForForbiddenMirrors ¶
func ScanFileForForbiddenMirrors(relPath string, src []byte, fset *token.FileSet, f *ast.File, maxCompletedWave MigrationWave) []MirrorFinding
ScanFileForForbiddenMirrors inspects a single parsed Go file.
func ScanForbiddenMirrors ¶
func ScanForbiddenMirrors(root string, maxCompletedWave MigrationWave) ([]MirrorFinding, error)
ScanForbiddenMirrors walks all production files and finds forbidden mirrors past maxCompletedWave.
func (MirrorFinding) String ¶
func (f MirrorFinding) String() string
type MirrorShapeKind ¶
type MirrorShapeKind string
MirrorShapeKind classifies the forbidden hand-authored mirror pattern.
const ( MirrorFeatureBundleField MirrorShapeKind = "FeatureBundleField" MirrorNamedTransportField MirrorShapeKind = "NamedTransportField" MirrorAppendBranch MirrorShapeKind = "AppendBranch" MirrorProjectionBranch MirrorShapeKind = "ProjectionBranch" MirrorExtensionsOptionsField MirrorShapeKind = "ExtensionsOptionsField" MirrorGenerationOpField MirrorShapeKind = "GenerationOperationField" MirrorRequestRuntimeSnapshotField MirrorShapeKind = "RequestRuntimeSnapshotField" MirrorDiagArm MirrorShapeKind = "DiagnosticsArm" MirrorStageConsumer MirrorShapeKind = "StageConsumer" MirrorClosedPlaneStorageMap MirrorShapeKind = "ClosedPlaneStorageMap" MirrorClosedPlaneMapLogic MirrorShapeKind = "ClosedPlaneMapLogic" MirrorClosedPlaneReflection MirrorShapeKind = "ClosedPlaneReflection" )
type OverlayMeasurement ¶
OverlayMeasurement is one architecture-overlay allowance: the files a feature added to the convergence surfaces, their measured non-test lines, the ratchet cap, and whether the cap holds.
func MeasureConnectorArchitectureOverlay ¶
func MeasureConnectorArchitectureOverlay(root string) (OverlayMeasurement, error)
MeasureConnectorArchitectureOverlay counts non-test lines in affected-surface production files that import connector discovery/trust/catalog/ABI packages.
type PackageParityWrappers ¶
type PackageParityWrappers struct {
PackageDir string
HasSQLite bool
SQLiteFile string
SQLiteDeclCount int
HasPostgresDirect bool
PostgresDirectFile string
PostgresDirectDeclCount int
PostgresHasBuildTag bool
}
PackageParityWrappers records discovered parity test wrappers in a package directory.
func DiscoverPackageParityWrappers ¶
func DiscoverPackageParityWrappers(repoRoot, pkgDir string) (PackageParityWrappers, error)
DiscoverPackageParityWrappers inspects all _test.go files in pkgDir (relative to repoRoot).
type PackageTreeBudget ¶
PackageTreeBudget caps recursive non-test .go lines for a package tree.
type PlaneFieldMetadata ¶
type PlaneFieldMetadata struct {
PlaneID string
Wave MigrationWave
}
PlaneFieldMetadata holds canonical plane metadata for mirror detection.
type RuleFinding ¶
RuleFinding is one violation of a permanent architecture rule.
func EvaluateBillingAttemptSequenceAuthority ¶
func EvaluateBillingAttemptSequenceAuthority(root string) ([]RuleFinding, error)
EvaluateBillingAttemptSequenceAuthority rejects positional, lexical, and timestamp sources for customer leg ordering and requires the rating adapter to copy the persisted B2BUA attempt sequence verbatim (the only authoritative order source).
func EvaluateBillingCallScopedStateOwnership ¶
func EvaluateBillingCallScopedStateOwnership(root string) ([]RuleFinding, error)
EvaluateBillingCallScopedStateOwnership rejects executor-global lifetime-growing billing-call registries and requires call-scoped state to live on request/stream objects, not on the executor. Ordinary provider maps such as a string-keyed Backends catalog and request-scoped bookkeeping (for example a per-stream recorded-leg set) are not flagged.
func EvaluateBillingCustomerOperatorIndependence ¶
func EvaluateBillingCustomerOperatorIndependence(root string) ([]RuleFinding, error)
EvaluateBillingCustomerOperatorIndependence rejects any customer-rating path that resolves or carries operator rates. Customer snapshot resolution, the customer join resolver, the customer rating inputs, and the customer post-usage worker must stay free of provider-cost data. Task 18.1 retired the scalar token-to-money fallback, so the provider join resolver must not read operator rates either; estimates belong to the V2 provider-quantity valuation and the operator-rate catalog remains for historical references.
func EvaluateBillingExposureDeletionRatchet ¶
func EvaluateBillingExposureDeletionRatchet(root string, doc BillingExposureBaselineFile) ([]RuleFinding, error)
EvaluateBillingExposureDeletionRatchet checks hold/collector deletion targets. The manifest records the retired targets, while schema migration files and explicit legacy-recovery readers remain outside the normal call-path scan. Once ForbidHoldSymbols is true, executable ownership must be absent.
func EvaluateBillingExposureIdentityRatchet ¶
func EvaluateBillingExposureIdentityRatchet(root string, doc BillingExposureBaselineFile) ([]RuleFinding, error)
EvaluateBillingExposureIdentityRatchet checks A-leg-only customer settlement identity.
func EvaluateBillingExposureLOCRatchet ¶
func EvaluateBillingExposureLOCRatchet(doc BillingExposureBaselineFile, measured BillingExposureMeasurement) []RuleFinding
EvaluateBillingExposureLOCRatchet locks measured production LOC. Net reduction is required only after require_net_loc_reduction is true (task 7.2).
func EvaluateBillingExposureLOCRatchetAtPhase ¶
func EvaluateBillingExposureLOCRatchetAtPhase(root string, doc BillingExposureBaselineFile, measured BillingExposureMeasurement) []RuleFinding
EvaluateBillingExposureLOCRatchetAtPhase keeps the final LOC ratchet honest while Phase 2 is still integrating its transport seam. The approved gate is not weakened: once task 7.2 is checked, the normal immutable baseline check runs again. This avoids treating a Phase-2 plumbing delta as a Phase-7 deletion result.
func EvaluateBillingFinalConvergenceCurrentDeletionRatchet ¶
func EvaluateBillingFinalConvergenceCurrentDeletionRatchet(root string, doc BillingFinalConvergenceBaselineFile) ([]RuleFinding, error)
EvaluateBillingFinalConvergenceCurrentDeletionRatchet checks the planned or active deletion inventory on the working tree.
func EvaluateBillingFinalConvergenceDeletionRatchet ¶
func EvaluateBillingFinalConvergenceDeletionRatchet(root string, doc BillingFinalConvergenceBaselineFile) ([]RuleFinding, error)
EvaluateBillingFinalConvergenceDeletionRatchet checks the planned deletion inventory at the baseline SHA commit.
func EvaluateBillingFinalConvergenceDeletionRatchetFS ¶
func EvaluateBillingFinalConvergenceDeletionRatchetFS(fs archtestFS, doc BillingFinalConvergenceBaselineFile, isCurrentTree bool) ([]RuleFinding, error)
EvaluateBillingFinalConvergenceDeletionRatchetFS checks the deletion targets. If isCurrentTree is true, planned ratchets do not enforce presence in the current working tree. If isCurrentTree is false (baseline validation), planned ratchets enforce presence.
func EvaluateBillingFinalConvergenceLOCRatchet ¶
func EvaluateBillingFinalConvergenceLOCRatchet(doc BillingFinalConvergenceBaselineFile, measured BillingFinalConvergenceDenominatorMeasurement) []RuleFinding
EvaluateBillingFinalConvergenceLOCRatchet checks the denominator lock. While the LOC ratchet is not activated (Phase 0), the recomputed denominator must equal the recorded denominator_loc. Activation (Phase 7.2) requires final LOC <= floor(denominator_loc * 0.90).
func EvaluateBillingFinalConvergencePhase1BridgeForbid ¶
func EvaluateBillingFinalConvergencePhase1BridgeForbid(root string) ([]RuleFinding, error)
EvaluateBillingFinalConvergencePhase1BridgeForbid rejects production source that reconstructs the deleted TUR/LUR rating path. Tests and historical migration sources are intentionally outside this guard.
func EvaluateBillingHoldAndStreamMoneyLock ¶
func EvaluateBillingHoldAndStreamMoneyLock(root string) ([]RuleFinding, error)
EvaluateBillingHoldAndStreamMoneyLock verifies the committed hold-deletion and no-stream-money ratchets remain active and green (requirement 8.7). It asserts the committed baseline flags are active, the deleted stream-time monetary declarations are still forbidden, the hold-lifecycle target inventory is intact, and the committed deletion/identity ratchets pass against the current tree.
func ScanAbsentFiles ¶
func ScanAbsentFiles(root string) ([]RuleFinding, error)
ScanAbsentFiles reports paths from AbsentFiles that still exist.
func ScanAgentLoopGuardFeaturePackage ¶
func ScanAgentLoopGuardFeaturePackage(files []algSourceFile) []RuleFinding
func ScanAgentLoopGuardOwnershipViolations ¶
func ScanAgentLoopGuardOwnershipViolations(repoRoot string) ([]RuleFinding, error)
ScanAgentLoopGuardOwnershipViolations walks the live production tree and reports every ALG ownership and strategy-isolation violation.
func ScanAgentLoopGuardStrategyReachability ¶
func ScanAgentLoopGuardStrategyReachability(files []algSourceFile, spec algStrategyIsolationSpec) []RuleFinding
ScanAgentLoopGuardStrategyReachability walks the feature's call graph from one strategy branch of the ALG constructor and reports any reachable reference to that strategy's forbidden dependency.
The index covers the WHOLE feature, root package and subpackages alike, so a strategy's construction graph is followed across the package boundary it actually crosses in the shipped layout: the preferred receiver delegates the decision to protocolpolicy, and the legacy receiver delegates to causepolicy and progress. A walk confined to one package would have stopped at the first of those calls.
WHAT THE WALK COVERS, exactly:
- The receiver's own methods are seeded wholesale: every method declared on the strategy's approved receiver type in the feature ROOT package is in scope whether or not the strategy case body calls it.
- The statements of the strategy's case body inside the constructor.
- Every plain same-package function reachable from those seeds by repeated plain-call hops (a bodyless identifier call resolved against the CALLING file's own package), transitively.
- Every qualified call from those seeds into an INDEXED FEATURE PACKAGE (protocolpolicy.Evaluate, progress.Evaluate, ...), resolved through the calling file's import aliases, transitively. Each such call is resolved against the qualified package's own exported function declarations, so the hop chain continues there under the same rules.
WHAT THE WALK DOES NOT COVER, and why that is a deliberate approximation:
- It does NOT follow a method reached through a receiver VARIABLE. A call like e.judge(ctx) records pkgIdent="e", which resolves to no feature package, so the walk stops there. Methods of a receiver type are covered by the wholesale seeding above, not by following the qualifier.
- It does NOT follow method values (judge := verifier.Judge), composite literals (verifier.Config{}), package-level function variables (var z = verifier.New(...)), or any interface or struct-field indirection. Those forms are references without an attributable callee.
- It does NOT resolve types, so it cannot tell which type a receiver variable holds.
- It does NOT follow a qualified call into a package OUTSIDE the indexed feature tree, even when that package is generic core or an SDK contract. Such a package's own body is a different ratchet's subject; what is checked at the hop itself is the package qualifier, which is the only attributable fact a selector call carries here.
- It does NOT check the IMPORTS of a file it reaches; only the receiver's own files are import-checked (see below).
Fail-open on unresolvable calls is the correct choice here, not a shortcut. A strict variant that fails closed on every unresolvable call - or that checks the IMPORTS of every file the walk reaches - is NOT green on the live tree: the preferred strategy's seeded methods and the shared allowStop helper in provider.go pull that file in, and provider.go legitimately imports the verifier for the legacy strategy. Failing closed would therefore report the approved live layout as a violation. Closing the remaining forms needs type resolution (go/types), which this syntax-only index does not carry.
Consequently the enforced guarantee is narrow and stated as such: no forbidden CALL appears in the strategy case body, in the receiver's own methods, in any indexed feature package those reach, or in the plain-function chains they reach. That is stronger than a bare grep of the receiver's file - it follows arbitrarily many hops and crosses the feature's own package boundaries - and it is the whole of what is claimed.
func ScanClosedPlaneViolations ¶
func ScanClosedPlaneViolations(repoRoot string) ([]RuleFinding, error)
ScanClosedPlaneViolations walks production Go files to verify that arbitrary-plane map/reflection fallback has been completely excised from the feature plane lifecycle.
func ScanFileAgentLoopGuardOwnership ¶
func ScanFileAgentLoopGuardOwnership(relPath string, fset *token.FileSet, f *ast.File) []RuleFinding
ScanFileAgentLoopGuardOwnership applies every per-file ALG ratchet. The repository walk and the negative fixtures call this same function, so a fixture can never prove a different rule than the ratchet runs.
func ScanFileClosedPlaneViolations ¶
ScanFileClosedPlaneViolations inspects an AST for closed-plane architectural violations.
func ScanFileForbiddenImports ¶
func ScanFileForbiddenImports(rel, abs string, src []byte) ([]RuleFinding, error)
ScanFileForbiddenImports checks a single file's source for forbidden imports.
func ScanFileRetiredPackage ¶
func ScanFileRetiredPackage(rel string) *RuleFinding
ScanFileRetiredPackage checks if a repo-relative file path belongs to a retired package.
func ScanForbiddenDeclarations ¶
func ScanForbiddenDeclarations(root string) ([]RuleFinding, error)
ScanForbiddenDeclarations reports package-scope declarations matching ForbiddenDeclarations in production Go files.
func ScanForbiddenDeclarationsIncludingTests ¶
func ScanForbiddenDeclarationsIncludingTests(root string) ([]RuleFinding, error)
ScanForbiddenDeclarationsIncludingTests reports package-scope declarations matching ForbiddenDeclarations in all Go files, including tests (_test.go), excluding generated files.
func ScanForbiddenImports ¶
func ScanForbiddenImports(root string) ([]RuleFinding, error)
ScanForbiddenImports reports production import edges matching ForbiddenImports and file-scoped purity rules.
func ScanRetiredPackages ¶
func ScanRetiredPackages(root string) ([]RuleFinding, error)
ScanRetiredPackages reports any production Go files located under RetiredPackageDirs.
func ValidateAlgControlToolExclusivePlane ¶
func ValidateAlgControlToolExclusivePlane(shape algControlToolPlaneShape) []RuleFinding
ValidateAlgControlToolExclusivePlane proves that the control-tool plane admits at most one occupant, admits it only from the feature source, and refuses a typed nil before publication. One finding is reported per violated property so a fixture can assert its own specific defect.
func ValidateBillingExposurePlannedRatchets ¶
func ValidateBillingExposurePlannedRatchets(doc BillingExposureBaselineFile) []RuleFinding
ValidateBillingExposurePlannedRatchets checks the 0.4 end-state inventory.
func ValidateBillingFinalConvergencePlannedRatchets ¶
func ValidateBillingFinalConvergencePlannedRatchets(doc BillingFinalConvergenceBaselineFile) []RuleFinding
ValidateBillingFinalConvergencePlannedRatchets checks the checked-in activation lock: both final ratchets exist, are activated at task 7.2, and retain their immutable activation flags.
func (RuleFinding) String ¶
func (f RuleFinding) String() string
type ShrinkageMeasurement ¶
type ShrinkageMeasurement struct {
BaselineSHA string
Surfaces []AffectedSurfaceMeasurement
BaselineTotal int
CurrentTotal int
Delta int // raw current-baseline (includes overlay lines)
Connector OverlayMeasurement
PathOverlays []OverlayMeasurement
Growth OverlayMeasurement // usage-economics growth allowance (per-file growth above locked baselines)
SourceOwnership OverlayMeasurement // config-source ownership growth above the pre-feature baselines
ConvergenceDelta int // Delta - overlay lines (legacy Req 11.5 component)
RequiredMax int
Pass bool
}
ShrinkageMeasurement is the Requirement 11.5 aggregate plus architecture overlays.
func FormatRuntimeConvergenceShrinkage ¶
func FormatRuntimeConvergenceShrinkage(root string) (string, ShrinkageMeasurement, error)
FormatRuntimeConvergenceShrinkage renders the machine-checkable Markdown section.
func MeasureRuntimeConvergenceShrinkage ¶
func MeasureRuntimeConvergenceShrinkage(root string) (ShrinkageMeasurement, error)
MeasureRuntimeConvergenceShrinkage compares current lines to the locked baseline and separates the architecture overlays from the legacy convergence component.
type SymbolKind ¶
type SymbolKind string
SymbolKind classifies a package-scope declaration.
const ( SymbolFunc SymbolKind = "func" SymbolType SymbolKind = "type" SymbolVar SymbolKind = "var" SymbolConst SymbolKind = "const" SymbolMethod SymbolKind = "method" // FuncDecl with receiver; Name is method name )
type WaveMirrorFamily ¶
type WaveMirrorFamily struct {
Wave MigrationWave `json:"wave"`
WaveName string `json:"wave_name"`
FamilyName string `json:"family_name"`
Description string `json:"description"`
PlaneCount int `json:"plane_count"`
Planes []string `json:"planes"`
MeasuredMirrors int `json:"measured_mirrors"`
ActiveForbidden int `json:"active_forbidden"`
}
WaveMirrorFamily contains measured mirror metrics for one migration wave family.
func MeasureWaveMirrors ¶
func MeasureWaveMirrors(root string) ([]WaveMirrorFamily, int, int, error)
MeasureWaveMirrors scans the repository and collects mirror counts for each wave family.
func StandardWaveDefinitions ¶
func StandardWaveDefinitions() []WaveMirrorFamily
StandardWaveDefinitions returns the ordered metadata for all migration wave families.
Source Files
¶
- agent_loop_guard_feature_index.go
- agent_loop_guard_ownership_ast.go
- agent_loop_guard_ownership_ratchet.go
- agent_loop_guard_strategy_isolation_ratchet.go
- agent_loop_guard_terminal_owner_census.go
- authority_detectors.go
- backend_multi_user_policy_census.go
- billing_convergence_baseline.go
- billing_convergence_fs.go
- billing_convergence_growth.go
- billing_convergence_growth_history.go
- billing_convergence_phase1.go
- billing_convergence_ratchet.go
- billing_convergence_scanner.go
- billing_correctness_ratchet.go
- billing_exposure_baseline.go
- billing_exposure_ratchet.go
- billing_hold_lock_ratchet.go
- billing_independence_ratchet.go
- billing_sequence_ratchet.go
- billing_state_ownership_ratchet.go
- budgets.go
- budgets_shrinkage.go
- closed_plane_ratchet.go
- closed_plane_ratchet_helpers.go
- closed_plane_ratchet_selector.go
- closure_import_rules.go
- closure_reflect_scan.go
- core_ownership.go
- database_parity_discovery.go
- import_rules.go
- overlay_measure.go
- overlay_source_ownership.go
- plane_emitter.go
- plane_emitter_diag.go
- plane_emitter_helpers.go
- plane_emitter_hook.go
- plane_extractor.go
- plane_generator.go
- plane_generator_validation.go
- plane_report.go
- plane_rules.go
- plane_rules_delegate.go
- plane_rules_inspectors.go
- plane_rules_tables.go
- source_scan.go
- symbol_rules.go
Directories
¶
| Path | Synopsis |
|---|---|
|
tools
|
|
|
changesurface
Package changesurface reports extension blast radius from Git paths.
|
Package changesurface reports extension blast radius from Git paths. |
|
changesurface/cmd
command
|