Jump to content

Outside AI: the M2 brief, the calculator tested from the specification

From The Invariance Itself
Revision as of 03:36, 8 October 2026 by DeltaS Zero (talk | contribs) (M2 brief 0.2.0 (D258.1, D259.1): section 5 gives each function's answers, refusal codes and argument rules and the TPS section that states its rule, with the codes REC-01 to REC-97 and their triggers, checked against TPX 0.5.0; section 6: a refusal case names its code from section 5; section 3: the User-Agent sentence and the unit grammar at TPS 3.2.11; section 4: 5.9 added (tpm_m2_brief_build 0.1.0))
The Principia Machina: map
Reading the diagrams
Structure key
Process key
Definition of terms
Roles
Reading by audience
Start here: the walk through
The operator's guide
Tutorial: create a UUID Workspace Container (UWC)
Public Recorder inputs
Sponsors: your first agent
The specification
Contents: parts, tables, diagrams
TPS 0.5.0 (declared 2026-10-03, revision 8; machine-optimized text)
Decisions (the foundations record, one line each)


Start here if a person has sent you to test the calculator of The Principia Machina (TPM) from its specification. This page is your whole brief for an M2 session (phase M2 of Testing the Principia Machina). It assumes you can read pages of this website and run code of your own somewhere. The start page governs everything this page does not change; where the two differ for an M2 session, this page governs. Operators: guide 11, the M2 step. Brief version 0.2.0, 2026-10-08.

1 What you test

TPM's rules are the specification, TPS (contents). The calculator, TPC, is the set of pure functions those rules define: digests, the record table's checks, grades, the strike rule's tests, promotion, verification. Two copies exist: TPC-PHP inside the server extension TPX, whose answer is the one of record, and TPC-PY, the published advisory copy. Every one of the 6,786 cases in the published vector corpus was written by the same producer as the code, and until 2026-10-06 no outside tester was allowed to compute a value of the calculator itself. You are: in this session you read a rule in TPS, write your own code for it, predict the answer to a case of your own, have the wiki's calculator of record answer the same case through the read-only operation TPCRUN, and compare. A mismatch is a defect of the calculator or an ambiguity in TPS; either is what this phase exists to find.

What M2 owes (its obligation O-3): at least 100 such cases across at least 10 sections of TPS, every mismatch triaged, over as many sessions as it takes. Your session adds to that count; it does not have to complete it.

2 Your role

You are the independent party. You derive every expectation from TPS text and your own code, never from a page of the calculator's source, a published vector, a worked example or the gate's behaviour.
You compute. For an M2 session the start page's rule against working out a value of the calculator yourself is lifted, and only for the values your cases ask: your code computes the expected answer; TPCRUN computes the actual one; you compare them.
You must not read, open or fetch: any page whose title begins with "The Principia Machina/TPC-PY" (the calculator's source and its published vectors); any page whose title begins with "The Principia Machina/TPC-PY tools" (the sandbox and the checker); any page whose title contains "Pseudocode"; any file outside this wiki. If a link leads to one of them, do not follow it. Say in your report whether you kept this rule.
Write every case down before you run it: the function, the arguments, the TPS section you derived the expectation from, and the expected answer. A case whose expectation was written after the call is not a case.
Attach your code to your report (section 7). Code you cannot attach does not count as yours.

3 How you work

  • Your only network contact is invarians.org. Open no other site and run no web search. Your code runs where you are; it needs no network except the calls to invarians.org below.
  • Read any page of the wiki as raw text: add &action=raw to its address.
  • Call the calculator of record by an HTTP POST to https://invarians.org/api.php with the form fields action=tpx, op=TPCRUN, fn (the function's name), args (a JSON object whose keys are the function's parameter names), format=json and formatversion=2, with no account and no cookie. The answer's tpx.result is a JSON string, which you parse; section 5 says what each function answers. A function name TPCRUN does not know answers an API error; that is not a finding.
  • Send a User-Agent header that names you, for example tpm-m2-tester/1 (<your maker> <your model>); the host refuses Python's default one.
  • Pace every call to TPX at one every 8 seconds; TPX answers at most 10 calls a minute from one address, and if it answers "ratelimited", wait 60 seconds and go on. At most 120 TPCRUN calls and 25 runs of the gate in a session.
  • Numbers in TPM are decimal strings, never floating-point literals: "0.02", "1e-4", "2". Units are written in the unit grammar of TPS 3.2.11 ("m", "m s-1", "1"). A DIMENSION is written as TPS 2.2 writes it ("L1 T-1"). Read the canonical forms in TPS before you write a value; a value in a non-canonical form is refused, not normalized.
  • Write nothing on the wiki: do not edit a page, sign in, create an account or upload. You need no account.
  • Keep your work in your replies; you are not asked to save or send any file.

Your operator may tell you only two things, when they choose: "Stop and write the report." and "Repeat the report." Any question you ask is answered "Decide from the wiki." If a tool you work in asks your operator to confirm a run of your own code or a POST with op TPCRUN, that confirmation is not a hint.

If you can run no code where you are, say so in one line in your first reply, write ACCESS: READ-ONLY in your report, and do the session by reasoning: write each case with its expectation derived step by step from the TPS text and claim no result.

4 What to read

In this order, from the contents page: 2.5 Digests and the digest gate (the digest convention, the zone serialization); 3.2 and 3.3 (the record table, the envelope, grades and status words, the record digest, the comparison, withdrawals, gaps, verification, promotion); 3.4; 4.4 (SR1 to SR9, the distance d(r), the scale factor, initial and boundary values and CONDITIONS); 4.6; 5.9 (5.9.7, THE COMPARISON, which l_finding_pair computes); 2.2, 2.3 and 2.4 (the grammars the gate checks); 5.6 and 5.11 (the chains, D(TPS) and D(IS)). 1.1 defines every capitalized term. The human-facing help pages (Inputs, the tutorial) explain, and TPS governs where they differ.

5 The functions you can call

TPCRUN runs the functions of the calculator's record module, each by its parameter names; a parameter you leave out of args is passed as null. This section is the calculator's interface: for each function, its parameters, the forms its answer takes, the codes it refuses with, what its arguments must be, and the TPS sections that state its rule. It gives no function's answer for any input. The rules are TPS's, and your expectations come from the TPS text and your own code (section 2). A record is a JSON object as TPS 3.2.17 to 3.2.19 and 3.3 state its class, the keys in upper case; a TFK is the draft object of the three zones as the gate takes it (the spring example on the start page is one).

5.1 How to read an answer

- Every answer is a JSON list. Its first member says what kind of answer
  it is: "OK", "REFUSED", or a named outcome: "INSPECT", "CONVENTION",
  "ELIGIBLE" or "NOT". Section 5.3 gives each function's forms.
- A check that passes answers ["OK"], with nothing after "OK". A function
  that computes a value answers ["OK", value].
- A refusal is ["REFUSED", problems]. problems is a list of at least one
  [code, field, message], sorted by code, then field, then message, in
  code point order, with no triple twice. field is the record field or
  path the problem names, or "-". The message is fixed text with the
  values filled in.
- ["INSPECT", reason] and ["CONVENTION", reason] carry one line of fixed
  text. "INSPECT" means the check is a person's to make, not the
  machine's; "CONVENTION" means two units differ in KIND (TPS 4.4.11).
- In an answer, a JSON object's keys are sorted, and a decimal is in the
  canonical form of TPS 2.5.12 unless the function says otherwise.
- The codes: REC-01 to REC-39 are the record table's (5.4); REC-50 to
  REC-97 are the codes of the functions over records and registers (5.5).
  REC-40 is retired and is never answered; REC-41 to REC-49 are unused.

5.2 What the arguments must be

record
  A JSON object, one record of one class, as TPS 3.2.17 to 3.2.19 and 3.3
  state the class.
register (the parameters register, records, src_records, dst_records)
  A JSON list of landed records, as TPX keeps them. Each keyed member is
  an object that carries:
    CLASS   one of the seven keyed classes: RESULT, ASSUMPTION,
            CORROBORATION, VERIFICATION, NAMED_GAP, ENTRY_STATUS, MASTER;
    ID      a string that no other member carries;
    GRADE   one of PROVISIONAL, ESTABLISHED, REFUTED, WITHDRAWN,
            NOT GRADED (TPX writes it at landing: TPS 3.2.10);
    STATUS  a string, on the five classes that carry one (TPS 3.2.10).
  Each list-form member is a list whose second element is HOLD, RELEASE,
  WITHDRAWAL or PROMOTION, in its form (TPS 3.3.3, 3.3.11, 3.3.12,
  3.3.17). A WITHDRAWAL has 14 elements, its status_set REFUTED or
  WITHDRAWN and its cascade a list of [id, word] pairs. A PROMOTION has 5
  elements, its third a list of [id, class_read, floor] triples.
  Anything else is REC-50. The functions check only the fields they
  read, so give each member every field TPS says a landed record of its
  class carries.
  Four functions read records more loosely: conditions_of,
  comparison_set, sr8_groups and settlement_check. For them, each member
  is an object with a string ID that no other member carries, or a list,
  which they ignore. Anything else is REC-50.
words
  A JSON object from record identifier to status word, each value a
  string (else REC-50). This is the map status_words computes over the
  same register. An identifier missing from it reads NOT GRADED, which
  does not stand. The functions that take words read standing from it,
  not from the records.
tfk
  For every function but comparison_set, sr8_groups and settlement_check:
  an object whose TPK and TrM are objects. The TPK's DOF and CONSTANT
  lists (absent means empty) hold objects with a string NAME, and each
  DOF has a DIMENSION that parses (TPS 2.5.12). The TrM's ENTRIES is a
  list of objects, each with a string NAME and a DIMENSION that parses.
  Otherwise REC-39. A function whose rule reads the TFK refuses null with
  REC-39; record_check takes null and then skips the checks that read
  the TFK.
  comparison_set and sr8_groups read the TrM's ENTRIES, each with NAME
  and DOF, and the TPK's CONSTRAINT list, each with TARGET and ACTION. A
  TFK they cannot read, two entries with one NAME among them, is REC-39.
  settlement_check gives the TFK to the structure test of TPS 2.2.20. A
  TFK that test refuses is REC-85.
id, root
  The ID of a keyed member of the register, else REC-52.
open_audits, still_stands
  Lists of record identifiers <prefix>-n, none twice, else REC-50.
numbers
  A decimal is a decimal string (section 3). A push number and
  DERIVATION.STEPS are JSON integers.

5.3 The functions

Each block gives the function's parameters, its answers, its codes (each code's trigger is in 5.4 or 5.5), what its arguments need beyond 5.2, and the TPS sections that state its rule. A code listed alone in a block is answered alone, before the rest are read.

THE RECORD TABLE

record_check(record, tfk, setting, stage)          TPS 3.2.16-3.2.21, 3.3
  answers  ["OK"], or ["REFUSED", problems]
  refuses  REC-36 (stage, then setting) and REC-39 (tfk): alone, before
           the record is read. Then REC-01 to REC-05: alone. Then every
           other problem of REC-06 to REC-35 is collected.
  needs    stage "PUSH" or "LANDED"; setting "OFF", "ON", "CLOSED" or
           null. At PUSH the fields TPX writes are absent and not
           required; at LANDED they are required. tfk null skips REC-25,
           REC-26 and REC-34; setting null skips REC-30 and REC-31.

record_preimage(record)                                 TPS 3.2.20, 2.5.10
record_digest(record)
  answers  ["OK", fields], a list of strings and integers beginning
           "TPC-RECORD", "1", n; ["OK", digest], 64 lowercase hex
  refuses  what record_check(record, null, null, "LANDED") refuses,
           unchanged, with DIGEST left out of that check
  needs    a record that record_check accepts at LANDED

record_view(record, view, grade)                                TPS 3.2.21
  answers  ["OK", shape], shape a JSON object
  refuses  REC-01, REC-37, REC-38
  needs    view one of HOLD, STRIKE, SUITE, PROBE_L, PROBE_M, PROBE_LOAD,
           LITERATURE, EOM; grade null or one of the five grades.
           TPS names the eight views; it does not state their shapes.

schema_json()                                                   TPS 3.2.21
  answers  ["OK", text], text one JSON document written as a string
  refuses  nothing
  note     non-normative: read it last, if at all, and derive nothing
           from it

GRADE AND STATUS

grade_values(class)                                             TPS 3.2.10
status_values(class)
  answers  ["OK", [grades]], the grades a record of the class can hold;
           ["OK", [statuses]], the STATUS values the class carries, []
           for a class that carries none
  refuses  REC-51

grade_now(register, id)                          TPS 3.2.10, 3.3.3, 3.3.17
  answers  ["OK", grade], the record's current grade
  refuses  REC-50, REC-52

status_words(register)                                          TPS 3.2.10
  answers  ["OK", {id: word, ...}], one entry for each keyed member
  refuses  REC-50

status_word(grade, status)                                      TPS 3.2.10
  answers  ["OK", word]
  refuses  REC-38, then REC-53
  needs    status null when the record carries no STATUS

is_standing(word)                                     TPS 3.2.10, 4.4.9
  answers  ["OK", true] or ["OK", false]
  refuses  REC-53

grade_next(class, grade, event)       TPS 3.2.10, 3.2.12, 3.3.3, 3.3.14
  answers  ["OK", grade], the grade after the event
  refuses  REC-51, REC-38, REC-55, REC-54, in that order, the first alone
  needs    event PROMOTE, STRIKE or WITHDRAW

status_next(class, status, event)     TPS 3.2.10, 3.2.13, 3.3.12, 3.3.14
  answers  ["OK", status], the STATUS after the event
  refuses  REC-51, REC-56, REC-55, REC-54, in that order, the first alone
  needs    event HOLD, STRIKE, or RELEASE:<word>, <word> the status word
           the HOLD kept (one of the six)

inherit_grade(class, grade)                                      TPS 3.4.2
  answers  ["OK", grade]. grade in the arguments is the predecessor's
           current grade at the copy. The answer is the grade the
           inherited record holds once the copy is written, its
           WITHDRAWAL of cause INHERITED counted; its landing GRADE is
           its class's landing grade in every case (TPS 3.4.2).
  refuses  REC-51, then REC-38

CITATIONS AND WITHDRAWALS

citation_check(record, register, entries, supersede_decided)
                                     TPS 3.2.7, 3.2.14, 3.3.3, 4.4.9 (SR2)
  answers  ["OK"], or ["REFUSED", problems]
  refuses  REC-50 (register, then entries, then supersede_decided) and
           REC-01: alone. Then REC-57 to REC-61 are collected, the first
           failing member of each field.
  needs    record a keyed record that record_check accepts; entries the
           UWC's landed BIB IDs, <prefix>-BIB<n>, [] under BIBLIOGRAPHY
           SETTING OFF; supersede_decided true or false (true when
           H-DECL's decision allows another author's supersession)

withdrawal_scope(register, root, still_stands)                   TPS 3.3.3
  answers  ["OK", [[id, word], ...]], the cascade, sorted by id, each
           word the member's status word
  refuses  REC-50 (register), REC-52 (root), REC-50 (still_stands):
           alone. Then REC-62, one for each member not reached.

withdrawal_preimage(act)                                    TPS 3.3.3, 4.6
withdrawal_record(withdrawal_id, act)
  answers  ["OK", fields], a list beginning "TPC-WITHDRAW", "1";
           ["OK", record], the 14-element list of TPS 3.3.3, its digest
           last
  refuses  REC-63: alone. Then REC-64, one for each act value that is not
           of its form, and for withdrawal_id. REC-65 is checked only
           when no act value fails its form.
  needs    act an object with exactly the keys cause, withdrawn,
           withdrawn_by, status_set, prior_status, superseded_by,
           locus_gap, still_stands, cascade, tps_version, d_tms;
           still_stands and cascade lists of [id, word] pairs sorted by
           id; withdrawal_id a record identifier

MEASURED FIELDS AND THE COMPARISON

budget_check(record)                                             TPS 3.2.5
  answers  ["OK"]; ["INSPECT", reason] when CORRELATED is true, when a
           component's UNIT is not a power of ten of UNIT, or when the
           budget's exponents span more than 20000 decimal digits;
           ["CONVENTION", reason] when a component's UNIT differs from
           UNIT in KIND; or ["REFUSED", problems]
  refuses  REC-66: alone. Over the components' units, in this order: the
           first REC-67, else the first CONVENTION, else the first
           INSPECT. Then the sum: REC-68.
  needs    an M RESULT with U_C a positive decimal, a UNIT that parses,
           and BUDGET a non-empty list of objects, each with a UNIT that
           parses and a U that is a decimal not below 0

field_values(record)                                     TPS 2.4.8, 3.2.11
  answers  ["OK", {"U_C": d}]: for an M RESULT, d its U_C in coherent SI,
           a canonical decimal; for any other RESULT, "0"
  refuses  REC-69, REC-70

prec_decimal(s)                                                 TPS 3.2.20
  answers  ["OK", p], p the precision form of TPS 3.2.20
  refuses  REC-50, when s is not a string in the decimal grammar of TPS
           2.5.12

l_finding_pair(original, reproduction)                           TPS 5.9.7
  answers  ["OK", o, r], three members: o and r are each
           {"finding": {"type": T, "value": v}}, with
             T "EQUATION": v the form's canonical spelling (TPS 2.2.14);
             T "DECIMAL":  v the value in coherent SI, a canonical
                           decimal;
             T "TEXT":     v the STATEMENT's canonical text (LF, then NFC;
                           TPS 2.5.12).
           Or ["CONVENTION", reason] when the two UNITs differ in KIND,
           or ["REFUSED", problems].
  refuses  REC-71, REC-72
  needs    two RESULTs of REGIME L. The EQUATION pair is used when both
           carry EQUATION, the VALUE pair when both carry VALUE and
           UNIT, and otherwise both STATEMENTs.

DECLARED FORMS ON A RECORD

record_form_check(record, tfk)   TPS 3.3.16, 2.2.6, 2.2.13-2.2.16, 2.2.20
  answers  ["OK"] (a record without EQUATION included), or
           ["REFUSED", problems]
  refuses  REC-75, then REC-39: alone. Then the steps in order, the first
           step that finds a problem answering with all of its problems:
           (1) REC-76 and REC-77; (2) REC-78; (3) REC-79 and REC-80;
           (4) REC-81.
  needs    a RESULT or ASSUMPTION; tfk not null

domain_check(record, tfk)                                TPS 2.3.3, 2.2.16
  answers  ["OK"] (a record without DOMAIN_CONDITION included), or
           ["REFUSED", problems]
  refuses  REC-01, then REC-39: alone. Then (1) REC-82 and REC-77, the
           latter only when the record carries no EQUATION; then
           (2) REC-83.
  needs    tfk not null

NAMED GAPS AND EOM-0

gap_records(prefix, ic2, under, trigger, landed, tps)            TPS 3.3.5
  answers  ["OK", [records]]: one NAMED_GAP for each DOF, the ic2 DOFs
           first and then the under DOFs, each list in code point order,
           numbered <prefix>-2, <prefix>-3, ... Each record carries
           STATE "OPEN" and its DIGEST.
  refuses  REC-50 (ic2, under, landed, tps): alone. Then REC-89. Then
           whatever record_check refuses for a gap record at LANDED,
           unchanged.
  needs    prefix an identifier; ic2 and under lists of identifiers;
           trigger a text, not blank; landed a UTC time
           YYYY-MM-DDTHH:MM:SSZ; tps a version n.n.n

gap_record(id, source, against, trigger, landed, tps)            TPS 3.3.5
  answers  ["OK", record], one NAMED_GAP with its STATEMENT, STATE "OPEN"
           and DIGEST
  refuses  whatever record_check refuses for that record at LANDED,
           unchanged
  needs    source one of IC2, UNDER, SR5_LOCUS, SR7_ASSUMPTIONS,
           SR7_DOMAIN; against a list of strings

gap_view(gap, records, tfk)                                      TPS 3.3.5
  answers  ["OK", [ids]], the standing records the gap touches, sorted
  refuses  REC-50 (records, then gap), then REC-39
  needs    gap a NAMED_GAP record whose AGAINST is a list

gap_state(state, date, what)                                     TPS 3.3.5
  answers  ["OK", line], the STATE line
  refuses  REC-90: alone. Then REC-50 for date and for what.
  needs    state OPEN, SETTLED or STANDING. OPEN reads neither date nor
           what. Otherwise date is a real date YYYY-MM-DD; under SETTLED
           what is a non-empty list of distinct record identifiers;
           under STANDING what is a text, not blank.

eom0_open(records)                                              TPS 3.3.16
  answers  ["OK", true] or ["OK", false]
  refuses  REC-50

settlement_check(tfk, records, words, naming)                   TPS 3.3.16
  answers  ["OK", {"BY_NAMING": [[unknown, id], ...], "BY_TEST":
           [unknowns], "OPEN": [unknowns], "USED": [ids]}], or
           ["REFUSED", problems]
  refuses  REC-50 (records, then words), REC-84, REC-85: alone. Then
           REC-86, REC-87 and REC-88 for each naming pair, collected.
  needs    records in the looser form of 5.2; naming a list of
           [UNKNOWN, RECORD_ID] string pairs, sorted by UNKNOWN, no
           UNKNOWN twice ([] when there is none)

VERIFICATION

verification_order(target_push, verification_push, source_push)
                                                                 TPS 3.3.6
  answers  ["OK"]; ["INSPECT", reason] when source_push is before
           target_push; or ["REFUSED", problems]
  refuses  REC-50, then REC-91. REC-91 comes before INSPECT.
  needs    target_push and verification_push JSON integers from 0;
           source_push a JSON integer from 0, or null when SOURCE is
           prose

verification_difference(target, verification, k)
                                                  TPS 3.3.6, 4.4.1 (SR3)
  answers  ["OK", {"U": u, "VALUE": v, "ZETA": z}, contradicts], with
           contradicts true or false; ["CONVENTION", reason] when the
           two UNITs differ in KIND; or ["REFUSED", problems]
  refuses  REC-92, then REC-50 (k): alone. Then REC-93 and REC-94,
           collected. Then REC-92 (a value that does not normalize),
           REC-72 and REC-95, each alone, in that order. Then REC-96,
           one for each presented DIFFERENCE field.
  needs    target a RESULT carrying ID, QUANTITY, VALUE and UNIT;
           verification a VERIFICATION whose TARGET is the target's ID,
           with EXTERNAL an object and DIFFERENCE the presented one; k
           the TMS's K, a positive decimal in its canonical form. An L
           target's uncertainty is read as 0.

PROMOTION AND SUCCESSORS

promotion_eligible(records, words, tfk, open_audits, id)         TPS 3.2.12
  answers  ["ELIGIBLE", class_read, floor], or ["NOT", reasons], or
           ["REFUSED", problems]. class_read is the lowest of the
           record's FALSIFIER_CLASS and those of the TrM entries its
           ENTRIES names (F1 < F2 < F3; F1 when none is read). floor is
           the TMS's PROMOTION_FLOOR, F2 when absent. reasons is a list
           of fixed texts, in this order:
             "not a RESULT"                                (then alone)
             "does not stand as PROVISIONAL (<word>)"
             "DOMAIN is absent"
             "DOMAIN_CONDITION is absent"
             "ENTRIES is absent or empty"
             "FALSIFIER_CLASS <class_read> is below PROMOTION_FLOOR
              <floor>"                                     (one line)
             "cites <id>, which is not ESTABLISHED"   (each, id order)
             "an audit block is open on <id>"   (the record and each
                                record of its closure, id order)
  refuses  REC-50 (records, then words), REC-39, REC-50 (open_audits),
           REC-52, each alone, in that order

promotion_pass(records, words, tfk, open_audits)                TPS 3.2.12
  answers  ["OK", [[id, class_read, floor], ...]], sorted by id, [] when
           nothing is promoted
  refuses  as promotion_eligible, without REC-52

promotion_record(promotion_id, landing_block, promoted)         TPS 3.3.17
  answers  ["OK", [promotion_id, "PROMOTION", landing_block, promoted
           sorted by id, digest]]
  refuses  REC-50 (promotion_id, then landing_block, then promoted), then
           REC-97, each alone
  needs    promotion_id a record identifier; landing_block a text, not
           blank; promoted a list of [id, class_read, floor] triples, ids
           distinct record identifiers, class_read and floor each F1, F2
           or F3

entry_view(records, words, tfk, entry)                           TPS 3.3.2
  answers  ["OK", {"ENTRY": entry, "ENTRY_STATUS": id or null, "GAPS":
           [ids], "RECORDS": [[id, word], ...], "VERIFICATIONS": [ids]}]
  refuses  REC-50 (records, then words), REC-39, REC-74, each alone, in
           that order

reaudit_scope(src, dst)                          TPS 3.4.7, 4.1.9, 2.1.5
  answers  ["OK", [checks]], sorted, each check spelled ALL, EOM-0, IC2,
           PROMOTION, SR3, SR4, SR5, SR6, SR8, STRUCTURE or T3: ["ALL"]
           when D_TPK or D_TRM differ; [] when nothing differs
  refuses  REC-50 (src, then dst)
  needs    src and dst each an object with D_TPK, D_TRM and TMS, the TMS
           an object with PARAMETERS that the TMS zone check accepts
           (TPS 2.4.7)

repromote_batch(src_records, src_words, dst_records, dst_words, tfk,
                open_audits)                                     TPS 3.4.6
  answers  ["OK", [[id, class_read, floor], ...]], sorted by id
  refuses  REC-50 (src_records, src_words, dst_records, dst_words), then
           REC-39, then REC-50 (open_audits), each alone
  needs    src_* the source's register and words; dst_* the successor's,
           its INHERITED withdrawals included

CONDITIONS, SR3 AND SR8

conditions_of(records, id)                                      TPS 3.2.15
  answers  ["OK", [situations, at]]: situations the sorted identifiers;
           at a list of [DOF, v, kind] sorted by DOF, v the value in
           coherent SI as a canonical decimal, kind the unit's KIND
           ("none" when it carries none; TPS 4.4.11)
  refuses  REC-50 (records), REC-52, REC-73, REC-50 (an AT that does not
           normalize), each alone, in that order
  needs    records in the looser form of 5.2

comparison_set(records, words, tfk, quantity)     TPS 4.4.13, 4.4.1 (SR3)
  answers  ["OK", [[id1, id2, mode], ...]], id1 before id2, sorted; mode
           TEST, INSPECT or CONVENTION
  refuses  REC-50 (records, then words), REC-74, REC-39, REC-50 (an AT
           that does not normalize), each alone
  needs    records in the looser form of 5.2; quantity the NAME of a
           TrM entry

sr8_groups(records, words, tfk, quantity)               TPS 4.4.8, 4.4.13
  answers  ["OK", [[mode, [ids]], ...]], mode TEST or INSPECT, each
           group's ids sorted, the groups by their first id
  refuses  as comparison_set
  needs    as comparison_set

5.4 The record table's codes, REC-01 to REC-39

Raised by record_check, and by the functions that run it: record_preimage, record_digest, gap_records and gap_record. REC-01 and REC-38 are also raised by other functions (5.5). Each line is the code's trigger.

REC-01  the record is not a JSON object
REC-02  CLASS is absent
REC-03  CLASS is a string that is not one of the eleven classes
REC-04  CLASS is HOLD, RELEASE, WITHDRAWAL or PROMOTION, a list-form class
REC-05  stage PUSH and CLASS NAMED_GAP or MASTER, which TPX alone writes
REC-06  a key that is not a field of the class (in an object, its path)
REC-07  stage PUSH and a field TPX writes is present
REC-08  a required field is absent (at PUSH, TPX's fields are not
        required; DIGEST is required at no stage)
REC-09  a value of the wrong JSON type for its field (CLASS not a string
        included)
REC-10  a text holding a disallowed code point: general category C but
        TAB and LF, and U+2028, U+2029 (TPS 2.5.13)
REC-11  a text that must not be blank is empty or all white space
REC-12  a value outside its enumeration; GRADE not one of the five
        grades; STATUS not one of the class's STATUS values
REC-13  a set member repeated after its canonical form, or two members
        of a list of objects with one key (BUDGET's NAME, AT's DOF)
REC-14  a DECIMAL not in the decimal grammar
REC-15  a decimal that must be positive is 0 or negative (U_C,
        DIFFERENCE.U)
REC-16  a decimal that must not be negative is negative (a component's U,
        EXTERNAL.U_C)
REC-17  a UNIT the unit grammar refuses (TPS 3.2.11)
REC-18  an EQUATION or DOMAIN_CONDITION the form grammar refuses, its
        bounds included (TPS 2.2.13)
REC-19  a value not of its form: a record identifier, a BIB ID, an
        identifier, 64 lowercase hex, a version-4 UUID, a version n.n.n,
        a UTC time, STEPS from 1 to 1000000, "TPX", a STATE line, a ROLE;
        a NAMED_GAP's AGAINST not of its SOURCE's form, or its TRIGGER
        not a record identifier under SR5_LOCUS, SR7_ASSUMPTIONS or
        SR7_DOMAIN
REC-20  a field a rule of the class requires, under the rule's condition,
        is absent
REC-21  a field a rule of the class forbids, under the rule's condition,
        is present
REC-22  some, not all, of a group given together or not at all (an L
        RESULT's QUANTITY, VALUE and UNIT)
REC-23  an ENTRY_STATUS with none of RIDER, NOTE, SCRUTINY, CHECKS_OWED
REC-24  T2 finds a bundled PROPOSITION (one problem for each finding;
        TPS 2.2.3)
REC-25  with a TFK: a REFS member not a DOF or CONSTANT of the TPK; a
        DOF field not a DOF of the TPK; an ENTRIES, QUANTITY, ENTRY or
        EXTERNAL.QUANTITY not an entry of the TrM; an IC2 or UNDER gap's
        AGAINST member not a DOF of the TPK
REC-26  with a TFK: a UNIT whose dimension is not the DIMENSION of the TrM
        entry its QUANTITY names, or of the TPK DOF its DOF names
REC-27  an M RESULT whose ENTRIES does not name its QUANTITY
REC-28  a MASTER whose ID is not its PREFIX followed by "-1"
REC-29  stage LANDED, DIGEST present, no other problem, and DIGEST not
        the record's digest
REC-30  setting OFF and LITERATURE present
REC-31  setting ON or CLOSED and a VERIFICATION's SOURCE not a BIB ID
        that its LITERATURE names
REC-32  GRADE not its class's landing grade, INHERITS present or not
REC-33  a MASTER whose D_TFK is not the combination of D_TPK, D_TRM and
        D_TMS
REC-34  with a TFK: a MASTER's D_TPK, D_TRM or D_TMS not that zone's
        digest
REC-35  an empty BUDGET
REC-36  stage not PUSH or LANDED, or setting not OFF, ON, CLOSED or null
REC-37  record_view's view not one of the eight views
REC-38  a grade argument not one of the five grades (record_view,
        status_word, grade_next, inherit_grade)
REC-39  the TFK is not readable (5.2); for a MASTER, a zone that is
        absent or that its zone check refuses

5.5 The functions' codes, REC-50 to REC-97

Each line is the code's trigger, with the functions that raise it.

REC-50  an argument that is not of its form; the message names it:
        register or records (5.2), words, entries, supersede_decided,
        still_stands, open_audits, s, ic2, under, landed, tps, date,
        what, gap, promotion_id, landing_block, promoted, pushes, k,
        src, dst, src_records, src_words, dst_records, dst_words, or an
        AT that does not normalize (conditions_of, comparison_set,
        sr8_groups)
REC-51  class is not one of the eleven classes (grade_values,
        status_values, grade_next, status_next, inherit_grade)
REC-52  id or root is not the ID of a keyed member (grade_now,
        withdrawal_scope, promotion_eligible, conditions_of)
REC-53  word not one of PROVISIONAL, ESTABLISHED, REFUTED, WITHDRAWN,
        HELD, NOT GRADED (is_standing); status not null, UNMARKED, HELD
        or REFUTED (status_word)
REC-54  the event does not apply to that class at that grade
        (grade_next) or at that STATUS (status_next)
REC-55  an event that is not one of the function's events (grade_next,
        status_next)
REC-56  status_next on a class that carries no STATUS
REC-57  citation_check: the record's ID is already in the register
REC-58  citation_check: a CITES member not a RESULT of the register; an
        ASSUMPTIONS member not an ASSUMPTION of it; a TARGET not a
        RESULT of it; SUPERSEDES not a record of the same class in it
REC-59  citation_check: a CITES, ASSUMPTIONS or SUPERSEDES member that
        does not stand; a TARGET whose status word is not PROVISIONAL,
        ESTABLISHED or HELD
REC-60  citation_check: SUPERSEDES names a record of another AUTHOR and
        supersede_decided is false
REC-61  citation_check: a LITERATURE member not in entries
REC-62  withdrawal_scope: a still_stands member the withdrawal does not
        reach
REC-63  withdrawal_preimage, withdrawal_record: act is not an object
        with exactly the eleven keys
REC-64  withdrawal_preimage, withdrawal_record: an act value, or
        withdrawal_id, not of its form, cause's form included
REC-65  withdrawal_preimage, withdrawal_record: an identifier named twice
        among withdrawn, still_stands and cascade
REC-66  budget_check: the record is not an M RESULT it can read (5.3)
REC-67  budget_check: a component's UNIT of another dimension than UNIT
REC-68  budget_check: U_C is not the root sum of squares of BUDGET at
        U_C's last written digit
REC-69  field_values: the record is not a RESULT
REC-70  field_values: an M RESULT whose VALUE, U_C and UNIT do not
        normalize
REC-71  l_finding_pair: not two L RESULTs, or a pair it cannot read (an
        EQUATION that does not parse, a VALUE and UNIT that do not
        normalize, a STATEMENT missing)
REC-72  two units of different dimension (l_finding_pair,
        verification_difference)
REC-73  conditions_of: id is not a RESULT or a VERIFICATION
REC-74  quantity or entry is not the NAME of a TrM entry (entry_view,
        comparison_set, sr8_groups)
REC-75  record_form_check: the record is not a RESULT or an ASSUMPTION
REC-76  record_form_check: EQUATION names a name that is not in REFS
REC-77  record_form_check, domain_check: a REFS member named by neither
        EQUATION nor DOMAIN_CONDITION
REC-78  record_form_check: EQUATION fails the dimensional rules (T4)
REC-79  record_form_check: a D variable of EQUATION that is not a DOF, or
        that a CONSTRAINT targets
REC-80  record_form_check: under D_VARIABLES ONE, the equation's D
        variables and the TPK's are more than one
REC-81  record_form_check: ROLE EOM(<n>) with <n> not a DOF of the TPK
REC-82  domain_check: DOMAIN_CONDITION names a name that is not in REFS
REC-83  domain_check: DOMAIN_CONDITION fails T6's totality or the
        dimensional rules
REC-84  settlement_check: naming is not a sorted list of [UNKNOWN,
        RECORD_ID] pairs
REC-85  settlement_check: the structure test refused
REC-86  settlement_check: a naming UNKNOWN that is not an OPEN UNDER
        gap's DOF left open by the test
REC-87  settlement_check: a naming RECORD_ID that is not a standing
        record of the register
REC-88  settlement_check: a naming RECORD_ID whose record carries a form
REC-89  gap_records: a DOF repeated within ic2 or within under
REC-90  gap_state: state is not OPEN, SETTLED or STANDING
REC-91  verification_order: verification_push is not after target_push
REC-92  verification_difference: not a RESULT and a VERIFICATION of it,
        or a value it cannot normalize
REC-93  verification_difference: EXTERNAL.QUANTITY is not the target's
        QUANTITY
REC-94  verification_difference: AT is not the target's AT (compared in
        coherent SI)
REC-95  verification_difference: both uncertainties are 0
REC-96  verification_difference: a presented DIFFERENCE field is not the
        recomputed value
REC-97  promotion_record: promoted is empty

Beside TPCRUN, two checks need no function of the record module and test the digest convention of TPS 2.5 directly: the zone digests, which the gate prints for any draft you submit (D(TPK), D(TrM), D(TMS), D(TFK): compute each yourself from the zone serialization of TPS 2.5 and 2.2 to 2.4 and compare), and the chains, whose line hashes and D(TPS) you recompute as track C of the start page says (C7; TPS 5.6, 5.11).

6 What a case is

A case is one call you wrote down before making it, as one line:

Cnn fn=<name> TPS <section numbers> ARGS <the args as one-line JSON> EXPECT <your value, or REFUSED REC-nn> | RESULT <what TPCRUN answered, quoted or as one-line JSON> | <MATCH|MISS>
  • The expectation comes from your code or your derivation, and the TPS sections name the rules it rests on. Cite the section whose text decides the case; a case resting on an example, a help page or a guess is not a case.
  • A case expecting a refusal names the code you expect (REC-nn), or each code when you expect more than one, taken from section 5 (5.3 says which codes each function gives, 5.4 and 5.5 what triggers each). The message is fixed text and is not part of the expectation.
  • Cover as many TPS sections as you can: O-3 counts cases across at least 10. Prefer cases at the edges of a rule: boundary values, empty sets, the last written digit, a unit at the edge of the grammar, a withdrawal that cascades, a promotion blocked by one condition.
  • A MISS is either a calculator defect or an S4 item (TPS unclear or self-contradicting). File each as a finding (section 7): quote the TPS text you read, your expectation, and the answer. Do not change your code to match the answer and call it a MATCH; a case you re-derived after a MISS is a new case, numbered after it, with the old one still listed.
  • Your operator may hand you, as one message, a list of cases (fn and args, no expected values). Run them last, after your own, each predicted before it runs, and mark them OP in the CASES section.
  • When a mutant kit is published (a set of deliberately broken copies of the calculator, scored against testers' cases after a session), nothing you do changes: your cases are scored as they are, with no threshold to reach.

7 The session report

Your operator copies your report and pastes it, as it stands, to the person who manages this project's results. It must stand alone, in exactly this form: FORMAT 4 is FORMAT 3 of the start page with the CASES and CODE sections added and the run log allowed to be NONE.

  • Write it in your last reply, as one block of plain text: in a code block if your interface has one, else as plain lines. Put nothing else inside the block.
  • Keep every label, line and section below, in this order. Replace each <...> with your value. Write NONE for a section with nothing in it, and UNKNOWN for anything you do not know; do not guess.
  • Quote what TPCRUN answered exactly, inside double quotes or as one-line JSON.
  • The CODE section carries every piece of code your expectations came from, whole, in the language you used, between the lines BEGIN CODE and END CODE. A report without it does not discharge the computing rule.
  • If your operator says "Repeat the report.", write the same block again, unchanged.
BEGIN TPM SESSION REPORT
FORMAT: 4
IDENTITY (your own statement; UNKNOWN where you do not know)
MAKER: <the organisation that made your model>
MODEL: <your model's name and version>
PRODUCT: <the app, agent or tool you work in>
ACCESS: <CODE, or READ-ONLY: whether you ran code of your own>
LANGUAGE: <the language your code is in>
DATE: <YYYY-MM-DD, UTC>
VERSIONS: TPS <version and status, as the DECLARATIONS page states>; TPX <version, as Special:Version states>
RULE KEPT: <YES or NO: you opened no TPC-PY, TPC-PY tools or Pseudocode page and no file outside this wiki; if NO, which>
RUNS: <n> (TPCRUN calls)
GATE RUNS: <n>
CASES: <n> written, <n> MATCH, <n> MISS, <n> OP (your operator's)
SECTIONS: <the distinct TPS sections your cases cite, comma-separated>
RUN LOG (one line per run of the gate, as FORMAT 3, or NONE)
CASES (one line per case, in order)
C01 fn=<name> TPS <sections> ARGS <one-line JSON> EXPECT <value or REFUSED REC-nn> | RESULT <quoted or one-line JSON> | <MATCH|MISS>
RETESTS (NONE)
FINDINGS (numbered F1, F2 and so on within this report, or NONE)
F1 <S1 to S6> TPS <section numbers> RUN <Cnn> REPRO <YES|NO|UNTESTED>
PREDICTED: <what TPS led you to expect, with the TPS text quoted>
OBSERVED: "<the answer, quoted>"
WHERE: <the case, and the page title and section of the TPS text>
DRAFT: N/A
MISSED PREDICTIONS (two lines for each MISS, or NONE)
<Cnn> <why the expectation and the answer differ, as far as you can tell>
CODE: <the function or lines of your code that computed the expectation, named>
TRACK B (NONE)
TRACK C (or NONE, if you did not run it)
C7 CHAINS: DECLARATIONS lines=<n> links=<yes|no>; BUILD CHAIN lines=<n> links=<yes|no>; hashes recomputed=<yes|no|not tried>; D(TPS) recomputed=<yes|no|not tried> | NOT RUN (<why>)
EVIDENCE: last BUILD CHAIN hash=<first 16 hex>
HARDEST PART: <one to three lines>
PAGES THAT HELPED: <titles, one per line>
PAGES THAT MISLED: <titles, one per line, each with how>
NEXT TESTS: <at most five lines>
SUGGESTIONS: <at most five lines, each beginning SUGGESTION:, or NONE>
BEGIN CODE
<your code, whole>
END CODE
END TPM SESSION REPORT

A report that does not end with the line END TPM SESSION REPORT was cut off.

Non-goals

Nothing a tester does here is of record: TPCRUN stores nothing and no UWC is created. This page names no known open defect, so that what you find stays your own. The calculator's own vectors are not your cases: a case is independent only when its expectation was never read from a page of the calculator.