scale

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebtFrontendBackendPairs   = "frontend_backend_pairs"
	DebtFrontendProfilePairs   = "frontend_profile_pairs"
	DebtNestedPairMaterializer = "nested_pair_materializer"
	DebtPerProfileFactory      = "per_profile_factory"
	DebtPerProfileRegistration = "per_profile_registration"
	DebtPerProfileGoroutine    = "per_profile_goroutine"
	DebtCentralListMutation    = "central_list_mutation"
	DebtSentinelGrowth         = "sentinel_growth"
)

Variables

This section is empty.

Functions

func CreateDeterministicGitChange

func CreateDeterministicGitChange(repoRoot, relativePath, before, after string) (string, error)

CreateDeterministicGitChange creates a temporary repository, commits before, applies after, and returns Git's own unified diff. Callers therefore test the same diff representation used by change-surface tooling rather than a hand-built string.

func ValidateNonCartesianFixture

func ValidateNonCartesianFixture(frontends []SyntheticFrontendFixture, profiles []SyntheticProviderProfileFixture) error

ValidateNonCartesianFixture proves the actual deterministic fixture has independent frontend and profile dimensions. Source is generated from the supplied fixture data, so callers cannot substitute an unrelated snippet as scalability evidence.

Types

type CartesianDebtFinding

type CartesianDebtFinding struct {
	Category string
	File     string
	Detail   string
}

CartesianDebtFinding is one structurally identified scalability debt.

type CartesianDebtReport

type CartesianDebtReport struct {
	TotalCells               int
	AllCellsCallsDiscovered  int
	NestedLoopsDiscovered    int
	CentralTableEntriesCount int
	FrontendBackendPairs     int
	FrontendProfilePairs     int
	NestedPairMaterializers  int
	PerProfileFactories      int
	PerProfileRegistrations  int
	PerProfileGoroutines     int
	CentralListMutations     int
	SentinelGrowth           int
	Findings                 []CartesianDebtFinding
}

CartesianDebtReport contains evidence of current FE x BE debt and provider-profile structures.

func ScanCurrentCartesianDebt

func ScanCurrentCartesianDebt(repoRoot string) (CartesianDebtReport, error)

func ScanRepository

func ScanRepository(repoRoot string) (CartesianDebtReport, error)

ScanRepository inspects source that actually exists under repoRoot. It does not accept a fabricated path list as evidence.

type RealSharedBoundaryInspector

type RealSharedBoundaryInspector struct{}

RealSharedBoundaryInspector inspects real repository file paths and symbols to verify that provider profile changes do not mutate shared core, API, proto, or central tables.

func (RealSharedBoundaryInspector) InspectDiff

func (r RealSharedBoundaryInspector) InspectDiff(repoRoot, diff string) (SharedBoundaryFootprint, error)

InspectDiff parses complete unified diffs. It reconstructs the new file from the hunk body (using the repository version for omitted context), so additions in new files and partial hunks are checked structurally rather than by path text.

func (RealSharedBoundaryInspector) InspectFileChanges

func (r RealSharedBoundaryInspector) InspectFileChanges(profileID string, modifiedFiles []string, sentinelPairGrowth int) SharedBoundaryFootprint

InspectFileChanges analyzes a set of modified file paths for a provider-profile change and measures real shared-boundary footprint across actual repository packages.

func (RealSharedBoundaryInspector) InspectProfileAgainstCentralLists

func (r RealSharedBoundaryInspector) InspectProfileAgainstCentralLists(profileID string) SharedBoundaryFootprint

InspectProfileAgainstCentralLists inspects actual central backend lists in standardplugins to ensure a given profile ID is not registered as a separate essential backend kind.

type SharedBoundaryFootprint

type SharedBoundaryFootprint struct {
	ProfileID              string
	SharedCoreEdits        int
	SharedAPIEdits         int
	ProtoEdits             int
	CentralTableEdits      int
	EssentialListAdditions int
	SentinelPairGrowth     int
	StructuralViolations   []string
}

SharedBoundaryFootprint contains actual change counts across repository zones.

func (SharedBoundaryFootprint) ValidateZeroSharedFootprint

func (f SharedBoundaryFootprint) ValidateZeroSharedFootprint() error

ValidateZeroSharedFootprint asserts that a provider profile addition makes zero shared boundary edits.

type SyntheticFrontendFixture

type SyntheticFrontendFixture struct {
	ID      string
	Profile string
}

SyntheticFrontendFixture represents a test frontend definition.

func FiveFrontendsFixture

func FiveFrontendsFixture() []SyntheticFrontendFixture

FiveFrontendsFixture returns a standard set of 5 synthetic frontend fixtures.

type SyntheticProviderProfileFixture

type SyntheticProviderProfileFixture struct {
	ID       string
	FamilyID string
	Endpoint string
}

SyntheticProviderProfileFixture represents a test provider profile definition bound to a backend family.

func ThousandProviderProfilesFixture

func ThousandProviderProfilesFixture() []SyntheticProviderProfileFixture

ThousandProviderProfilesFixture returns 1,000 synthetic provider profiles bound across 4 backend families.

Jump to

Keyboard shortcuts

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