valis / Reference / API reference

Retirement - API reference

Exported surface for the retirement subsystem. Part of the API reference.

Package valis/src/retirement

Conditions

retirement-incomplete

Signalled by a retirement that attempted every release it owed and could not complete at least one of them. Its presence is the guarantee that a retire which left something running did not answer as though it had not.

Generic functions

retirement-incomplete-failures

(retirement-incomplete-failures condition)

Undocumented: this exported symbol needs a docstring.

retirement-incomplete-released

(retirement-incomplete-released condition)

Undocumented: this exported symbol needs a docstring.

retirement-incomplete-subject

(retirement-incomplete-subject condition)

Undocumented: this exported symbol needs a docstring.

Functions

report-retirement

(report-retirement subject released failures)

The single exit of a retirement. Returns RELEASED when FAILURES is empty; otherwise signals RETIREMENT-INCOMPLETE naming SUBJECT, what was released, and every step that did not happen.

Routing every retire through here is what makes the property structural rather than a habit: there is no path on which a retirement holding a recorded failure can answer with a success value.

Macros

attempting

(attempting (failures step) &body body)

Run BODY as one release step named STEP, collecting into the place FAILURES.

Returns BODY's value when the step succeeds. When it signals, records (STEP . condition) at the end of FAILURES and returns NIL, so the retirement can go on to attempt the releases that follow - one wedged step must never strand the rest of a teardown.

This defers a condition; it does not discard one. Everything recorded here is reported by REPORT-RETIREMENT, which is the only place the collected set is allowed to decide an answer.