Jump to content

The Principia Machina/Testing/M2 The calculator from the specification: Difference between revisions

From The Invariance Itself
m 1 revision imported
m 1 revision imported
Line 14: Line 14:
// The two sources of test cases for the calculator.
// The two sources of test cases for the calculator.
digraph sources {
digraph sources {
   rankdir=LR; node [shape=box, style=filled, fillcolor="#eaecf0", color="#a2a9b1", fontcolor="#202122", fontname="Helvetica", fontsize=10]; edge [fontname="Helvetica", fontsize=9, color="#54595d", fontcolor="#202122"];
   rankdir=TB; node [shape=box, style=filled, fillcolor="#eaecf0", color="#a2a9b1", fontcolor="#202122", fontname="Helvetica", fontsize=10]; edge [fontname="Helvetica", fontsize=9, color="#54595d", fontcolor="#202122"];
   TPS [label="TPS\nthe rule text", shape=box3d];
   TPS [label="TPS\nthe rule text", shape=box3d];
   B [label="the builder\nwrote the code and\nthe 6,786 published cases", fillcolor="#cedff2"];
   B [label="the builder\nwrote the code and\nthe 6,786 published cases", fillcolor="#cedff2"];
Line 33: Line 33:
// TPCRUN: the path from a tester's case to the server's calculator.
// TPCRUN: the path from a tester's case to the server's calculator.
digraph tpcrun {
digraph tpcrun {
   rankdir=LR; node [shape=box, style=filled, fillcolor="#eaecf0", color="#a2a9b1", fontcolor="#202122", fontname="Helvetica", fontsize=10]; edge [fontname="Helvetica", fontsize=9, color="#54595d", fontcolor="#202122"];
   rankdir=TB; node [shape=box, style=filled, fillcolor="#eaecf0", color="#a2a9b1", fontcolor="#202122", fontname="Helvetica", fontsize=10]; edge [fontname="Helvetica", fontsize=9, color="#54595d", fontcolor="#202122"];
   T [label="tester\n(no account needed)", fillcolor="#ffedad"];
   T [label="tester\n(no account needed)", fillcolor="#ffedad"];
   API [label="api.php\naction=tpx\nop=TPCRUN\nfn, args"];
   API [label="api.php\naction=tpx\nop=TPCRUN\nfn, args"];
Line 71: Line 71:
// Track C (Hub/Outside AI, section 6.4): the register checked from outside with STATUS, POLL and TPCRUN.
// Track C (Hub/Outside AI, section 6.4): the register checked from outside with STATUS, POLL and TPCRUN.
digraph trackc {
digraph trackc {
   rankdir=LR; node [shape=box, style=filled, fillcolor="#eaecf0", color="#a2a9b1", fontcolor="#202122", fontname="Helvetica", fontsize=9]; edge [fontname="Helvetica", fontsize=9, color="#54595d"];
   rankdir=TB; nodesep=0.25; ranksep=0.4; node [shape=box, style=filled, fillcolor="#eaecf0", color="#a2a9b1", fontcolor="#202122", fontname="Helvetica", fontsize=9]; edge [fontname="Helvetica", fontsize=9, color="#54595d"];
   C1 [label="C1 declarations\nthe genesis line,\nthe declared versions"];
   C1 [label="C1 declarations\nthe genesis line,\nthe declared versions"];
   C2 [label="C2 state\nSTATUS: DECLARED,\nrecords, next id"];
   C2 [label="C2 state\nSTATUS: DECLARED,\nrecords, next id"];
Line 79: Line 79:
   C6 [label="C6 grades\nTPCRUN grade_now;\nthe reading views", fillcolor="#cedff2"];
   C6 [label="C6 grades\nTPCRUN grade_now;\nthe reading views", fillcolor="#cedff2"];
   C7 [label="C7 chains\nevery hash recomputed\nand linked"];
   C7 [label="C7 chains\nevery hash recomputed\nand linked"];
   C1 -> C2 -> C3 -> C4 -> C5 -> C6 -> C7;
   {rank=same; C1 -> C2 -> C3 -> C4;}
  C4 -> C5;
  {rank=same; C6 -> C5 [dir=back]; C7 -> C6 [dir=back];}
}
}
</graphviz>
</graphviz>

Revision as of 00:47, 6 October 2026

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)


Phase M2 of Testing the Principia Machina. State: accepted 2026-10-05, with M1 and M3, as Step A. The read-only operation TPCRUN is live and every outside session since 2026-10-04 has used it; the tester-written case set the plan asks for is still to be grown.

Objective

The plan (tpm_third_party_plan 0.2.0, section 4) states M2 as the calculator, tested from the specification. Nothing new is built: the named-function command of M1 exposes the calculator's functions. The tester writes its own test cases from the rule text of the specification – the digest convention, the unit grammar, the form grammar, SR3, SR8, promotion – never from the published corpora; predicts; then runs them. Any mismatch is either a calculator defect or an ambiguity in the specification (class S4).

The plan's acceptance: at least 100 tester-written cases across at least 10 sections of the specification, with every mismatch triaged.

Why it matters: every one of the 6,786 cases in the published vector corpus was written by the same producer as the code. A case derived by an outside reader from the rule text is the first independent one.

What exists

  • TPCRUN, an operation of the API module action=tpx, live since TPX 0.4.0 (2026-10-04): it runs one named function of the server's calculator, TPC-PHP, on arguments the caller gives, and answers with the result. It is read-only and open to anonymous callers at a limited rate, so a tester needs no account. Its answer is the server's own calculator, the residence of record.
  • The calculator's two residences: TPC-PHP inside TPX, whose answer is the one of record, and TPC-PY 0.3.0, the published copy, declared on 2026-10-03 and conformed to TPS 0.5.0. Both run the same 33 corpora, 6,786 cases, byte-identical.

How it was tested

Through TPCRUN, in the outside sessions of Step A and in the operator's tests, against values stored on the live wiki:

Date (UTC) Who Function Cases Outcome
2026-10-04 the operator's test, then the outside AI record_digest 4 stored digests, SPR-1 to SPR-4 every one recomputed equal
2026-10-05 the operator's test (15 checks) record_digest 5 stored digests, SPR-1 to SPR-5 equal
2026-10-05 the operator's test the PROMOTION record's digest (a list record) 1 equal
2026-10-05 the operator's test verification_difference 1 (SPR-5 against its outside value: U 2e-4, VALUE 1e-4, ZETA 0.5) equal to the stored DIFFERENCE
2026-10-05 the operator's test grade_now 2 (SPR-3 ESTABLISHED, SPR-4 PROVISIONAL) as read on the page
2026-10-05 the outside AI (Gemini), read-only record_digest, the PROMOTION record, the DIFFERENCE, the grades 5 + 1 + 1 + 2 every one equal (C3, C4, C5 of track C)
2026-10-05 the builder's recheck, anonymous the same the same equal

Since the import of 2026-10-05 the checks above are written on the wiki as track C of Outside AI: start here (C1 to C7), so any later session runs them without a brief being handed out.

Results against the plan

The operation the plan needs exists, is live and has been driven by two outside parties and the operator against every value the first UWC stores. The plan's count – 100 cases written by the tester from the rule text, across 10 sections – has not been reached: the cases run so far recompute stored values rather than probe the grammars (the digest convention, the unit grammar, the form grammar, SR3, SR8, promotion) from first principles. M2 was accepted with Step A on 2026-10-05 under the re-cut scope of D237.1; growing the tester-written set is open work for the next outside sessions and is tracked on the project's ledger.

Findings carried out of M2

F-TPCRUN-1 (low): TPCRUN with an unknown function name answers an internal API error rather than a refusal with its own code; for the next 0.5.x. F-STATUS-1: the STATUS operation without a prefix answers with PHP error text and a path; same. Both on Findings.

Previous: M1. Next: M3. Back to Testing the Principia Machina.