acceptance

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package acceptance holds the Slice 2 acceptance tests that need a whole server rather than one package: the sentinel-secret scan of spec section 12.2, and the end-to-end walks of section 16 that cross every layer.

Nothing here needs a phone, Docker or a network, so nothing here is behind a gate. Parking a test behind a gate it does not need is how a clause stays unverified for a phase (spec section 13.2).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseArtifacts

func DatabaseArtifacts(dataDir string) []string

DatabaseArtifacts are the three files spec section 12.2 names by hand: the database, its write-ahead log and its shared-memory index. They are listed explicitly as well as walked, because a `-wal` that has been checkpointed away between the write and the scan would make the scan pass for the wrong reason -- so a test asserts these exist before trusting a clean result.

Types

type Sentinel

type Sentinel struct {
	// Name is what a failure calls it: "acct A's OSID cookie".
	Name string
	// Value is the value itself. It is a fixture, never a real secret.
	Value string
}

Sentinel is one value that must never appear at rest or in a log.

type Sighting

type Sighting struct {
	Sentinel Sentinel
	Where    string
	// Context is a short excerpt with the sentinel itself replaced, so a
	// failure message can be read without leaking the value a second time
	// into a test log that may itself be captured.
	Context string
}

Sighting is one place a sentinel was found.

func ScanFiles

func ScanFiles(root string, sentinels []Sentinel) ([]Sighting, error)

ScanFiles walks root and reports every sentinel found in any file under it.

It reads whole files as bytes rather than as text, deliberately. The acceptance test of spec section 12.2 is a `strings | grep`: a value written into a SQLite page, a WAL frame or a JSON blob is still a disclosure even though nothing would print it, and a scan that only looked at what a formatter would emit would miss exactly the cases that matter.

A file it cannot read is reported as an error rather than skipped: a scan that quietly skips is a scan that passes for the wrong reason.

func ScanText

func ScanText(text, where string, sentinels []Sentinel) []Sighting

ScanText reports every sentinel in one body of text -- a captured log, an audit payload, an error message.

func (Sighting) String

func (s Sighting) String() string

Jump to

Keyboard shortcuts

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