Skip to main content

Module e2e

Module e2e 

Source
Expand description

e2e attest / e2e verify — the e2e decision nudge.

attest runs the e2e command of the runner’s choosing and records the decision as a branch-keyed receipt; verify confirms in CI that a branch changing the scoped source carries a receipt in its own diff. CI never runs e2e, and the command is unrestricted — the choice of command (the full suite, a targeted subset, a no-op) is the judgment the receipt records.

Structs§

Attestation
A record of one e2e decision — written to RECEIPTS_DIR/<branch_slug>.json and committed by attest.

Enums§

Verification
The outcome of verify — whether a committed receipt answers the branch’s e2e nudge.

Constants§

RECEIPTS_DIR
Where the branch-keyed receipts live, relative to the package root. Each receipt is <branch_slug>.json, so parallel branches write distinct files.

Functions§

attest
Run command in repo, write the branch’s receipt to repo/RECEIPTS_DIR/<branch_slug>.json, prune the receipts other branches left behind (and the retired single-file attestation), and commit. Returns the attestation.
branch_slug
The standardized receipt slug for a branch name — the receipt lives at e2e-attestations/<slug>.json. Lowercased; every character outside [a-z0-9._-] becomes -; runs of - collapse to one; truncated to 80 characters; leading/trailing - and . trimmed; an empty result falls back to branch. Deterministic and git-free, so a script can locate a branch’s receipt; exposed on the CLI as e2e slug.
verify
Verify the e2e decision at repo — the CI side of the nudge. Reads only receipt presence and content diffs: never runs e2e, never inspects a recorded command or exit code, never compares commit SHAs.
verify_extra_scoped
Verify the e2e decision at repo, joining extra scopes outside scope into what counts as scoped source.
verify_scoped
Verify the e2e decision at repo, with scope (rather than all of repo) defining what counts as scoped source.
verify_since
Equivalent to verify_extra_scoped with no extra roots and no excludes.