Documentation
¶
Overview ¶
Package t401 freezes the neutral scale envelope and explicit authoring seams used by T40.1. Production packages must not import spike packages.
Index ¶
- Constants
- Variables
- func CheckDimension(name string, observed, admitted uint64) error
- func DecodeStrict[T any](data []byte) (T, error)
- func FrozenCallerControlFixture(profile Profile) (string, []byte, error)
- func FrozenSemanticGoFixture(profile Profile, family string, ordinal uint64) (string, []byte, error)
- func FrozenStructuralGoFixture(profile Profile, ordinal uint64) (string, []byte, error)
- func MarshalCanonical(value any) ([]byte, error)
- func ProfileDigest(profile Profile) (string, error)
- func QuerySetDigest(queries []string) (string, error)
- func SHA256(data []byte) string
- func ValidateComparison(receipt ComparisonReceipt) error
- func ValidateEnvelope(envelope Envelope) error
- func ValidateManifest(manifest Manifest, profile Profile, oracle Oracle) error
- func ValidateOracle(oracle Oracle, profile Profile) error
- func ValidateProfile(profile Profile) error
- func ValidateReceipt(receipt Receipt, profile Profile, manifest Manifest) error
- func ValidateReproducibilityReceipt(receipt ReproducibilityReceipt) error
- type AdapterExpectation
- type Aggregate
- type ArtifactIdentity
- type AuthorBuildObservation
- type AuthorRequest
- type BlobReaderTrial
- type BoundaryProbe
- type ByteMetric
- type ComparisonClaims
- type ComparisonReceipt
- type ComparisonRequest
- type Dimension
- type DimensionError
- type Envelope
- type EnvelopeClaims
- type FailurePoint
- type GeneratorIdentity
- type HistoricalDiagnostic
- type LaneProjection
- type Manifest
- type ModeMeasurement
- type Oracle
- type OracleFailure
- type OracleFamily
- type OracleRevision
- type Profile
- type ProfileClaims
- type ProfileShape
- type ReaderMode
- type Receipt
- type ReproducibilityClaims
- type ReproducibilityProfile
- type ReproducibilityReceipt
- type ReproducibilityRequest
- type ResourceObservation
- type RevisionIdentity
- type StageExpectation
- type TemplateFamily
- type ToolIdentity
- type Transition
Constants ¶
const ( EnvelopeSchema = "t401-neutral-scale-envelope-v1" ProfileSchema = "t401-neutral-scale-profile-v1" OracleSchema = "t401-independent-scale-oracle-v1" ManifestSchema = "t401-neutral-git-manifest-v1" ReceiptSchema = "t401-neutral-author-receipt-v1" ReproducibilitySchema = "t401-neutral-author-reproducibility-v1" ComparisonSchema = "t401-zoekt-blob-reader-comparison-v1" StructuralProfileName = "structural-2m-v1" SemanticProfileName = "semantic-262144-v1" RepositoryName = "example.invalid/t401-neutral-scale" )
Variables ¶
var ( ErrDimensionExceeded = errors.New("t401 profile dimension exceeded") ErrInjected = errors.New("t401 author failure injected") )
Functions ¶
func CheckDimension ¶
func DecodeStrict ¶
func FrozenCallerControlFixture ¶
FrozenCallerControlFixture returns the exact committed go.mod selected by the caller candidate policy for either frozen profile.
func FrozenSemanticGoFixture ¶
func FrozenSemanticGoFixture(profile Profile, family string, ordinal uint64) (string, []byte, error)
FrozenSemanticGoFixture returns one exact baseline-A Go input from the retained semantic author. It is intentionally narrow: readiness diagnostics can measure real extractor output without copying the frozen templates or materializing the complete Git repository.
func FrozenStructuralGoFixture ¶
FrozenStructuralGoFixture returns one exact baseline-A structural Go input without authoring the two-million-owner repository.
func MarshalCanonical ¶
func ProfileDigest ¶
func QuerySetDigest ¶
func ValidateComparison ¶
func ValidateComparison(receipt ComparisonReceipt) error
func ValidateEnvelope ¶
func ValidateManifest ¶
func ValidateOracle ¶
func ValidateProfile ¶
func ValidateReceipt ¶
func ValidateReproducibilityReceipt ¶
func ValidateReproducibilityReceipt(receipt ReproducibilityReceipt) error
Types ¶
type AdapterExpectation ¶
type AdapterExpectation struct {
Family string `json:"family"`
Adapter string `json:"adapter"`
Protocol string `json:"protocol,omitempty"`
ImportPath string `json:"import_path,omitempty"`
ClientType string `json:"client_type,omitempty"`
Method string `json:"method,omitempty"`
Operation string `json:"operation,omitempty"`
Plane string `json:"plane,omitempty"`
State string `json:"state"`
Reason string `json:"reason,omitempty"`
}
type Aggregate ¶
type Aggregate struct {
PhysicalOwners uint64 `json:"physical_owners"`
RegularFiles uint64 `json:"regular_files"`
EligibleGoFiles uint64 `json:"eligible_go_files"`
IDLCandidates uint64 `json:"idl_candidates"`
ControlFiles uint64 `json:"control_files"`
RepositoryLanePlacements uint64 `json:"repository_lane_placements"`
CallerLanePlacements uint64 `json:"caller_lane_placements"`
UniqueGoBlobs uint64 `json:"unique_go_blobs"`
UniqueIDLBlobs uint64 `json:"unique_idl_blobs"`
DeclaredRepositoryGoBytes uint64 `json:"declared_repository_go_bytes"`
LogicalSourceBytes uint64 `json:"logical_source_bytes"`
ControlBytes uint64 `json:"control_bytes"`
ModeledDomainPartitions uint64 `json:"modeled_domain_partitions"`
ModeledDomainMembers uint64 `json:"modeled_domain_members"`
DomainPartitionModel string `json:"domain_partition_model"`
ObservationRecords uint64 `json:"observation_records"`
ObservationGaps uint64 `json:"observation_gap_classifications"`
ExtractorFacts uint64 `json:"extractor_facts"`
ExtractorGapFacts uint64 `json:"extractor_gap_facts"`
ExtractorStagingRows uint64 `json:"extractor_staging_rows"`
CanonicalObservationBytes uint64 `json:"canonical_observation_bytes"`
CanonicalExtractorBytes uint64 `json:"canonical_extractor_bytes"`
CanonicalResultByteModel string `json:"canonical_result_byte_model"`
}
type ArtifactIdentity ¶
type AuthorBuildObservation ¶
type AuthorBuildObservation struct {
Ordinal uint64 `json:"ordinal"`
Artifacts []ArtifactIdentity `json:"artifacts"`
Revisions []RevisionIdentity `json:"revisions"`
Git ToolIdentity `json:"git"`
BareGitLogicalBytes uint64 `json:"bare_git_logical_bytes"`
BareGitAllocatedBytes uint64 `json:"bare_git_allocated_bytes"`
}
type AuthorRequest ¶
type BlobReaderTrial ¶
type BlobReaderTrial struct {
Schema string `json:"schema"`
BinaryAuthority string `json:"binary_authority"`
Fixture string `json:"fixture"`
Modes []ReaderMode `json:"modes"`
Queries []string `json:"queries"`
Checks []string `json:"checks"`
GiantMeasurement string `json:"giant_measurement"`
ProductionSelected bool `json:"production_selected"`
}
func FrozenBlobReaderTrial ¶
func FrozenBlobReaderTrial() BlobReaderTrial
type BoundaryProbe ¶
type ByteMetric ¶
type ComparisonClaims ¶
type ComparisonClaims struct {
SameBinary bool `json:"same_binary"`
SmallNeutralFixture bool `json:"small_neutral_fixture"`
SelectsProductionReader bool `json:"selects_production_reader"`
EstablishesGiantCost bool `json:"establishes_giant_cost"`
ChangesProductionPosture bool `json:"changes_production_posture"`
}
type ComparisonReceipt ¶
type ComparisonReceipt struct {
Schema string `json:"schema"`
Binary ToolIdentity `json:"binary"`
FixtureProfileDigest string `json:"fixture_profile_digest"`
FixtureManifestDigest string `json:"fixture_manifest_digest"`
FixtureTree string `json:"fixture_tree"`
Queries []string `json:"queries"`
QuerySetDigest string `json:"query_set_digest"`
Modes []ModeMeasurement `json:"modes"`
IndexBytesEqual bool `json:"index_bytes_equal"`
IndexedContentEqual bool `json:"indexed_content_equal"`
QueryResultsEqual bool `json:"query_results_equal"`
BoundaryProbes []BoundaryProbe `json:"boundary_probes"`
Claims ComparisonClaims `json:"claims"`
}
func CompareBlobReaders ¶
func CompareBlobReaders(ctx context.Context, request ComparisonRequest) (ComparisonReceipt, error)
type ComparisonRequest ¶
type DimensionError ¶
func (*DimensionError) Error ¶
func (err *DimensionError) Error() string
func (*DimensionError) Unwrap ¶
func (err *DimensionError) Unwrap() error
type Envelope ¶
type Envelope struct {
Schema string `json:"schema"`
Profiles []Profile `json:"profiles"`
Oracles []Oracle `json:"oracles"`
FailurePoints []FailurePoint `json:"failure_points"`
BlobReaderTrial BlobReaderTrial `json:"blob_reader_trial"`
HistoricalDiagnostic HistoricalDiagnostic `json:"historical_diagnostic"`
Claims EnvelopeClaims `json:"claims"`
}
func BuildEnvelope ¶
type EnvelopeClaims ¶
type EnvelopeClaims struct {
Synthetic bool `json:"synthetic"`
GiantAuthoringExplicit bool `json:"giant_authoring_explicit"`
GeneratesGiantInTests bool `json:"generates_giant_in_tests"`
EstablishesTargetSLO bool `json:"establishes_target_slo"`
EstablishesAccuracy bool `json:"establishes_accuracy"`
QualifiesSupportedScale bool `json:"qualifies_supported_scale"`
SelectsBlobReader bool `json:"selects_blob_reader"`
ChangesProductionBehavior bool `json:"changes_production_behavior"`
AuthorizesRelease bool `json:"authorizes_release"`
}
type FailurePoint ¶
type FailurePoint struct {
Name string `json:"name"`
Boundary string `json:"boundary"`
LeavesTarget bool `json:"leaves_target"`
}
func FrozenFailurePoints ¶
func FrozenFailurePoints() []FailurePoint
type GeneratorIdentity ¶
type GeneratorIdentity struct {
Name string `json:"name"`
Version string `json:"version"`
GitObjectFormat string `json:"git_object_format"`
PathOrder string `json:"path_order"`
PathLayout string `json:"path_layout"`
TemplatePolicy string `json:"template_policy"`
BlobReusePolicy string `json:"blob_reuse_policy"`
Timestamp int64 `json:"timestamp"`
AuthorName string `json:"author_name"`
AuthorEmail string `json:"author_email"`
}
type HistoricalDiagnostic ¶
type HistoricalDiagnostic struct {
Artifact string `json:"artifact"`
SHA256 string `json:"sha256"`
Outcome string `json:"outcome"`
Scope string `json:"scope"`
}
func FrozenHistoricalDiagnostic ¶
func FrozenHistoricalDiagnostic() HistoricalDiagnostic
type LaneProjection ¶
type LaneProjection struct {
Name string `json:"name"`
Selection string `json:"selection"`
Unit string `json:"unit"`
Placements uint64 `json:"placements"`
UniqueGoBlobs uint64 `json:"unique_go_blobs"`
DeclaredBytes uint64 `json:"declared_bytes"`
LogicalBytes uint64 `json:"logical_bytes"`
ProductionCandidateParity bool `json:"production_candidate_parity"`
}
type Manifest ¶
type Manifest struct {
Schema string `json:"schema"`
Profile string `json:"profile"`
ProfileDigest string `json:"profile_digest"`
Repository string `json:"repository"`
Projection bool `json:"projection"`
Aggregate Aggregate `json:"aggregate"`
Revisions []RevisionIdentity `json:"revisions"`
ByteMetrics []ByteMetric `json:"byte_metrics"`
FailurePoints []string `json:"failure_points"`
}
type ModeMeasurement ¶
type ModeMeasurement struct {
Name string `json:"name"`
Environment string `json:"environment_value"`
IndexSHA256 string `json:"index_sha256"`
IndexBytes uint64 `json:"index_bytes"`
ShardCount uint64 `json:"shard_count"`
ContentSHA256 string `json:"indexed_content_sha256"`
QuerySHA256 string `json:"query_results_sha256"`
FilesSeen uint64 `json:"files_seen"`
Resources ResourceObservation `json:"resources"`
}
type Oracle ¶
type Oracle struct {
Schema string `json:"schema"`
Profile string `json:"profile"`
ProfileDigest string `json:"profile_digest"`
Aggregate Aggregate `json:"aggregate"`
Dimensions []Dimension `json:"dimensions"`
ExpectedOutcomes []StageExpectation `json:"expected_outcomes"`
Families []OracleFamily `json:"families"`
Revisions []OracleRevision `json:"revisions"`
Failures []OracleFailure `json:"failures"`
}
func DeriveOracle ¶
DeriveOracle calculates expected corpus and transition results from only the closed profile input. It deliberately does not accept a Phebs generation, Git manifest, index, extraction output, or publication receipt.
type OracleFailure ¶
type OracleFamily ¶
type OracleRevision ¶
type Profile ¶
type Profile struct {
Schema string `json:"schema"`
Name string `json:"name"`
Kind string `json:"kind"`
Scale string `json:"scale"`
ParentProfileDigest string `json:"parent_profile_digest,omitempty"`
Seed string `json:"seed"`
Generator GeneratorIdentity `json:"generator"`
Shape ProfileShape `json:"shape"`
Families []TemplateFamily `json:"template_families"`
Adapters []AdapterExpectation `json:"adapter_expectations"`
Lanes []LaneProjection `json:"lane_projections"`
Aggregate Aggregate `json:"aggregate"`
Dimensions []Dimension `json:"dimensions"`
ExpectedOutcomes []StageExpectation `json:"expected_outcomes"`
Transitions []Transition `json:"transitions"`
Claims ProfileClaims `json:"claims"`
}
func FrozenProfiles ¶
func ProjectionProfile ¶
func StructuralPartitionProfile ¶
StructuralPartitionProfile is the bounded throughput fixture: exactly one full 4,096-record candidate partition with the frozen structural profile's 4,608-byte Go blobs and 512 reuse classes. It remains a synthetic projection bound to the frozen parent and is not a scale result.
type ProfileClaims ¶
type ProfileClaims struct {
Synthetic bool `json:"synthetic"`
ExplicitAuthoringOnly bool `json:"explicit_authoring_only"`
EstablishesTargetSLO bool `json:"establishes_target_slo"`
EstablishesAccuracy bool `json:"establishes_accuracy"`
QualifiesSupportedScale bool `json:"qualifies_supported_scale"`
AuthorizesRelease bool `json:"authorizes_release"`
}
type ProfileShape ¶
type ProfileShape struct {
Cells uint64 `json:"cells"`
EligibleGoPathsPerCell uint64 `json:"eligible_go_paths_per_cell"`
CallerPathsPerCell uint64 `json:"caller_paths_per_cell"`
GoFileBytes uint64 `json:"go_file_bytes"`
GoBlobReuseClasses uint64 `json:"go_blob_reuse_classes"`
IDLFileBytes uint64 `json:"idl_file_bytes"`
ControlFiles uint64 `json:"control_files"`
}
type ReaderMode ¶
type Receipt ¶
type Receipt struct {
Schema string `json:"schema"`
Outcome string `json:"outcome"`
Profile string `json:"profile"`
ProfileDigest string `json:"profile_digest"`
Artifacts []ArtifactIdentity `json:"artifacts"`
Revisions []RevisionIdentity `json:"revisions"`
Git ToolIdentity `json:"git"`
ByteMetrics []ByteMetric `json:"byte_metrics"`
HistoricalDiagnostic HistoricalDiagnostic `json:"historical_diagnostic"`
Claims ProfileClaims `json:"claims"`
}
func AuthorClosedSystem ¶
func AuthorClosedSystem(ctx context.Context, request AuthorRequest) (Receipt, error)
AuthorClosedSystem applies the closed V25 host-command contract without changing the historical AuthorRequest shape.
func AuthorClosedSystemWithGit ¶
func AuthorClosedSystemWithGit( ctx context.Context, request AuthorRequest, path, sha256 string, environment []string, ) (Receipt, error)
AuthorClosedSystemWithGit uses one already-verified canonical Git path for every V25 authoring command.
type ReproducibilityClaims ¶
type ReproducibilityClaims struct {
Synthetic bool `json:"synthetic"`
SourceFree bool `json:"source_free"`
SeparateAuthorInvocations bool `json:"separate_author_invocations"`
EstablishesTargetSLO bool `json:"establishes_target_slo"`
QualifiesSupportedScale bool `json:"qualifies_supported_scale"`
AuthorizesRelease bool `json:"authorizes_release"`
}
type ReproducibilityProfile ¶
type ReproducibilityProfile struct {
Profile string `json:"profile"`
Kind string `json:"kind"`
Scale string `json:"scale"`
ProfileDigest string `json:"profile_digest"`
Builds []AuthorBuildObservation `json:"builds"`
ProfileBytesEqual bool `json:"profile_bytes_equal"`
OracleBytesEqual bool `json:"oracle_bytes_equal"`
ManifestBytesEqual bool `json:"manifest_bytes_equal"`
RevisionIdentityEqual bool `json:"revision_identity_equal"`
}
func CompareAuthoredPair ¶
func CompareAuthoredPair(firstPath, secondPath string) (ReproducibilityProfile, error)
CompareAuthoredPair validates and compares two complete author outputs. It is also used by projection tests; full retained authority is granted only by ValidateReproducibilityReceipt over both frozen profiles.
type ReproducibilityReceipt ¶
type ReproducibilityReceipt struct {
Schema string `json:"schema"`
Profiles []ReproducibilityProfile `json:"profiles"`
Claims ReproducibilityClaims `json:"claims"`
}
func BuildReproducibilityReceipt ¶
func BuildReproducibilityReceipt(request ReproducibilityRequest) (ReproducibilityReceipt, error)
BuildReproducibilityReceipt compares two separately authored frozen outputs per profile. Paths are input authority only and never enter the result.
type ReproducibilityRequest ¶
type ResourceObservation ¶
type ResourceObservation struct {
RSSState string `json:"rss_state"`
SampledMaxRSSBytes uint64 `json:"sampled_max_rss_bytes"`
RSSMethod string `json:"rss_method"`
DescriptorState string `json:"descriptor_state"`
SampledMaxDescriptors uint64 `json:"sampled_max_descriptors"`
DescriptorMethod string `json:"descriptor_method"`
IncludesDescendants bool `json:"includes_descendants"`
}
type RevisionIdentity ¶
type StageExpectation ¶
type TemplateFamily ¶
type TemplateFamily struct {
Name string `json:"name"`
Plane string `json:"plane"`
Suffix string `json:"suffix"`
Outcome string `json:"outcome"`
Reason string `json:"reason,omitempty"`
Inputs uint64 `json:"inputs"`
RecordsPerInput uint64 `json:"records_per_input"`
GapsPerInput uint64 `json:"gaps_per_input"`
StagingRowsPerInput uint64 `json:"staging_rows_per_input"`
CanonicalBytesPerInput uint64 `json:"canonical_bytes_per_input"`
}
type ToolIdentity ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
t401-author
command
|
|
|
t401-compare
command
|
|
|
t401-envelope
command
|
|
|
t401-reproducibility
command
|