vicoproplus/moon_textstat/cmd/gate does not have a README file

    Actual

    type Actual

    The value actually returned by one gate cell, normalized to the four shapes the L3 table can expect (EDouble is reduced to its IEEE-754 bit pattern; a raised TextstatError becomes ARaised).

    Failure

    type Failure

    One mismatched cell together with the value it returned.

    injected marks a failure record that belongs to the cell --inject=<n> targeted and whose mismatch exists only because that expectation was perturbed (AD section 6). It does not mean "the injection targeted this cell": a targeted cell that fails its own expectation too is recorded from the un-injected cell with false, because it is a genuine finding. T-37 always writes false, and T-38 is the only producer that may set it to true.

    FieldEntry

    type FieldEntry

    One row of the index: the field name, its comparison kind, and the probe that reads it off a TextStats.

    The probe is what keeps the row honest: it names a real struct field, so the row cannot survive a rename or a retype in types.mbt.

    FieldKind

    type FieldKind derive(Eq)

    The comparison shape AD section 2 fixes for one [ALIGN] field.

    counter values are compared by integer value; score values by their IEEE-754 bit pattern (never by printed text); word_list values by set equality (order and multiplicity are not contractual).

    FieldValue

    type FieldValue

    The value of one field, normalized to the shape its kind implies.

    A score carries the UInt64 bit pattern, so -0.0 and 0.0 stay distinguishable and no decimal text is ever compared (AD section 2.2).

    GateConfig

    type GateConfig

    The parsed command line. The argument set is closed (AD section 6).

    inject is 0 when absent or explicitly --inject=0. A nonzero value is only meaningful for --group=selfcheck and --group=zh, where it is a 1-based index into that group's selected cells (AD section 6: those are the two groups --inject=<n> takes effect on).

    ZhFailure

    type ZhFailure

    One mismatched Chinese cell together with the value it returned.

    enforce_field_index

    fn enforce_field_index() -> Unit

    Enforce the field index on the gate's execution path (AD section 4: the gate looks expected values up by field name, and a name the index does not know is an environment failure).

    The check always reads the delivered table (@gate_data.all_cells()), never the selected or injected cells: --inject=<n> rewrites one expectation in memory, and a perturbed expectation must not be able to turn a healthy index into a reported problem.

    On success nothing is printed, so the two-line stdout contract of AD section 6 is untouched. On failure every problem is printed with the gate: diagnostic prefix used by the other environment failures, and the process exits with 2 (AD section 3.2: a malformed table is an environment problem, not a cell mismatch, so no failure record is written).

    field_index_evidence

    fn field_index_evidence(cells : Array[
    Cell
    ]) -> String

    The A-11.3 evidence line, derived from the delivered table.

    fields=<n>/19 is the headline: it is the number of declared fields observed in the table, so a full run prints fields=19/19.

    field_index_problems

    fn field_index_problems(cells : Array[
    Cell
    ]) -> Array[String]

    Every assertion of A-11.3 over one cell table; an empty result means the index and the table agree.

    The checks are deliberately two-directional so that neither side can pass vacuously:

    1. the index has exactly 19 rows, with 19 distinct names;
    2. each row's probe reads a distinct real field of the declared kind (sentinel witness — a rename in types.mbt fails the build instead);
    3. every cell has a non-empty shape, group, sample_id, lang, and a source with the AD section 8 provenance prefix;
    4. every cell's shape derives a field name that is inside the index (a 20th name fails here);
    5. every non-error cell's expected-value constructor matches the declared kind (a Double formula compared as Int, or the word list compared as anything but a list, fails here); EError cells are only allowed in the errors group;
    6. every declared field is exercised at least once, and the number of distinct observed names is exactly 19 (a missing field fails here).