Expand description
Test-only transaction phase markers, compiled into the release executable and armed only by an environment variable.
What:
Test-only transaction phase markers for crash and interleaving suites.
An explicit environment variable arms one marker:
CLI_GIT_TEST_ONLY_PHASE_SIGNAL=<phase>:kill ends the process with SIGKILL at the phase,
<phase>:kill:<directory> writes <directory>/<phase>.reached first,
and <phase>:pause:<directory> writes that marker and waits until <directory>/<phase>.release exists.
A repeatable phase numbers its files by occurrence: <phase>-<n>.reached.
Why:
Crash suites need a deterministic point to kill the wrapper.
The marker is compiled into the release executable, but only the explicit variable arms it,
and a malformed value fails the invocation at every phase it reaches instead of being ignored
(src/policy-engine/commit-transaction-test-phase.ts).
In TS you’d write (pseudocode):
await reachTransactionPhase({ phase: 'ref-updated' });Structs§
- Phase
Signal - What: One parsed marker. Why: Parsing happens at every phase reached, so a malformed value fails wherever it is read.
- Phase
Signal Error - What: The marker variable is malformed. Why: The invocation fails with this text instead of ignoring the value.
Enums§
- Phase
- What: One transaction phase a marker can name. Why: The landing reaches four of them; the others are reached by the commit path and the replay.
- Phase
Action - What:
What a marker does at its phase.
Why:
killends the process;pausehands control to the test until the release file exists. - Phase
Marker Error - What: Why a reached phase could not be completed. Why: A malformed value and a failed marker write are both fatal to the invocation.
Constants§
- PHASE_
SIGNAL_ VARIABLE - Environment variable arming one phase marker.
- TRANSACTION_
TEST_ PHASES - Every phase in transaction order, which the refusal message lists.
Functions§
- parse_
phase_ signal - What:
Parses the marker variable.
Why:
The phase must match exactly, the action must be
killorpause, a pause needs a directory, and a directory must be absolute. An empty directory afterkillcounts as no directory, as the incumbent’s parser reads it. - reach_
transaction_ phase - What: Reaches one phase, reading the marker variable from the process environment. Why: The landing calls this at each marked phase; an unset variable costs one environment lookup.