acceptance

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package acceptance is GitHub issue #108's tier: every cohort estate under live/e2e/estates is applied against the floci emulator, its state file is deleted, and the plan rebuilt from ownership markers alone is asserted empty - the definition of done a user can check for themselves, run per cohort as a measurement.

The result is recorded per cohort in live/cohort-acceptance.json - pass, or the first phase that failed - and the committed artifact is a ratchet: a cohort recorded as passing must keep passing, and a run that widens the passing set is expected to commit the regenerated artifact. What this package deliberately does NOT report is admitted-type counts. #105 measured why: admitting six types moved unadmitted-type sites from 961 to 845 and moved the number of configurations that actually work by zero. The only number here is cohorts that apply and replan empty.

Nothing in live/e2e/run.sh is reused. That script is 2515 lines around one demo fixture; this tier is built on internal/live/flocitest's primitives (CohortDirs, CopyFixtureDir, StartFloci, the cross-process init lock) precisely so that adding a cohort means adding a directory, not editing a harness.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	GeneratedBy string `json:"generated_by"`
	// Image is the emulator image the run used, digest included.
	Image string `json:"image"`
	// Provider is the AWS provider release the fixtures pin.
	Provider string `json:"provider"`
	Totals   struct {
		Cohorts int `json:"cohorts"`
		Pass    int `json:"pass"`
		Fail    int `json:"fail"`
	} `json:"totals"`
	Cohorts []CohortResult `json:"cohorts"`
}

Artifact is live/cohort-acceptance.json's whole shape.

type CohortResult

type CohortResult struct {
	Name string `json:"name"`
	// Status is "pass" or "fail". "unsupported" is reserved for a cohort a
	// capability probe rules out before any apply; #99's probe reported
	// every listable admitted type implemented, so no cohort carries it
	// today and the field earns its place only when the emulator loses
	// something.
	Status string `json:"status"`
	// Phase is PhasePass, or the first phase that failed.
	Phase Phase `json:"phase"`
	// Resources is the number of resource blocks the cohort declares.
	Resources int `json:"resources"`
	// FailedResources names the addresses the failing phase reported, when
	// it reported any: apply errors name the resource that refused,
	// replan-not-empty names the addresses with proposed changes.
	FailedResources []string `json:"failed_resources,omitempty"`
	// Detail is the first error line of the failing phase, enough to find
	// the full output in the test log without pasting it all here.
	Detail string `json:"detail,omitempty"`
	// TimedOut is set when the failing phase was killed at its deadline
	// rather than exiting - the API Gateway availability waiter against
	// floci is the known shape.
	TimedOut bool `json:"timed_out,omitempty"`
}

CohortResult is one cohort's verdict.

type Phase

type Phase string

Phase names how far a cohort got. The values are ordered: each phase requires every earlier one.

const (
	// PhaseInit: terraform/tofu init failed - a harness or registry
	// problem, not a fixture verdict.
	PhaseInit Phase = "init"
	// PhaseApply: the stock apply against the emulator did not create
	// every resource. The fixture, the provider or the emulator refused;
	// FailedResources carries what the apply output named.
	PhaseApply Phase = "apply"
	// PhaseReplan: live-plan errored after the state was deleted.
	PhaseReplan Phase = "replan"
	// PhaseEmpty: live-plan exited cleanly but the run could not confirm
	// an empty plan - it proposed changes (FailedResources carries the
	// addresses), or printed output this harness does not recognize, which
	// is recorded as a failure to assert rather than presumed empty.
	PhaseEmpty Phase = "empty"
	// PhasePass: applied, state deleted, replanned empty.
	PhasePass Phase = "pass"
)

Jump to

Keyboard shortcuts

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