Skip to main content

Module capability

Module capability 

Source
Expand description

What is representable, per draft, per site, per stream — and why not.

One function answers that question — classify — and it has exactly two callers: Capabilities::supports / Capabilities::supports_on, which publish the table a scenario author reads before a run, and the engine’s executor, which decides what actually happens during one. That is the whole of the design: the table and the engine are the same code, so the table cannot become a documented lie about the engine. tests/action_matrix.rs asserts it against observed behaviour on all thirteen drafts.

§Where each Refusal comes from

Not every refusal is a (site, kind) fact, so not every refusal is classify’s to produce:

tests/action_matrix.rs::every_declared_refusal_is_reachable_or_declared_table_only asserts that split per variant, in both directions.

§The table answers for a build, not only for a draft

DraftVersion carries all thirteen variants under every feature set, so Capabilities::for_draft answers for drafts this binary cannot speak. A reduced-draft build — --no-default-features --features draft07, a shipped configuration and one of CI’s fourteen rows — cannot frame a byte of the twelve drafts it left out, and ProxySessionConfig::default().draft is Draft14 with nothing validating it against the compiled set. draft_is_compiled is therefore a fact classify reads, exactly like the draft number, and the object and control sites on an uncompiled draft are Support::Unreachable rather than Support::Yes. The two fail in different decoders and report different events, so they are two reads of the same fact rather than one; see Instead, which is where each names what a run emits in its place. In the default all-drafts build every row of the table is unchanged.

Structs§

CapCtx
The facts classify needs.
Capabilities
What a draft can express, queryable before a run.
UnsupportedMatcherKey
A class rule keyed on something no unit it could claim ever carries.

Enums§

ActionKind
A capability, named independently of whether Action can express it.
Instead
What a run reports in place of the action event a Support::Unreachable cell can never produce.
MatcherKey
One value key a Matcher can be built on.
NotAttemptable
Why a Support::NotAttemptable cell cannot be reached.
Precondition
A runtime fact a Support::Conditional verdict depends on.
Refusal
Why an action could not be executed.
Site
Where a decision was taken.
Support
Whether a capability is available.

Constants§

DEFAULT_DRAFT
The draft a session configuration takes when the caller names none.

Functions§

classify
The single source of truth for what is executable.
draft_is_compiled
Whether this build compiled a codec for draft.
supports_matcher
Whether a rule keyed on field can ever claim a unit arriving as kind, on draft, in this build.