Sovereign 8s.is mirror of 8b-is/spherepop-toss
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
peterlodri 12862a1170 Run the SpherePOP record rules and the TOSS fold as one tested pair
The ledger refuses illegal order rather than recording it politely: a bind before
a pop fails, nothing follows a refusal, and a subject cannot collapse around an
unwarranted claim. The fold drives that ledger with nine material steps, and the
seam between the two is the interesting part, so it is stated instead of implied:
nine steps produce five recorded steps and six events, and the four silent steps
are the two laminae and the two presses, where the material is constrained but
nothing is adjudicated.

Two limits are measured rather than mentioned: a fully consistent rewrite is
invisible from inside a content-addressed ledger, and attenuation forbids
escalation but not skipping. Both have fixtures.
2026-10-26 02:04:14 +09:00
tests Run the SpherePOP record rules and the TOSS fold as one tested pair 2026-10-26 02:04:14 +09:00
.gitignore Run the SpherePOP record rules and the TOSS fold as one tested pair 2026-10-26 02:04:14 +09:00
pop.py Run the SpherePOP record rules and the TOSS fold as one tested pair 2026-10-26 02:04:14 +09:00
README.md Run the SpherePOP record rules and the TOSS fold as one tested pair 2026-10-26 02:04:14 +09:00
toss.py Run the SpherePOP record rules and the TOSS fold as one tested pair 2026-10-26 02:04:14 +09:00

spherepop-toss — the POP record kernel and the TOSS fold

Two ideas that name the same discipline from opposite ends.

SpherePOP is the record: five event kinds, content-hash bound identifiers, an append-only ledger, and rules that refuse illegal order. TOSS is the material: nine monozukuri steps that take a closed sphere and leave one flat laminated panel at the centre [0,0].

They meet in one sentence — commitment is attenuation — and this repo is the place where the sentence is executed instead of admired.

python3 pop.py --demo            # four events, one collapsed subject, chain verified
python3 toss.py --run            # fold a sphere: nine steps, six events, one proof
python3 toss.py --run --json     # the same proof, machine-readable
python3 -m unittest discover -s tests -v    # 27 tests

Standard library only. Python 3.11+.

The POP kernel

kind what it does refused when
pop opens a subject the subject was already opened
bind attaches a claim no pop, or the subject was refused
verify warrants a specific bind nothing bound, unknown bind, or already warranted
collapse closes the subject any bind is unwarranted, or nothing was warranted
refuse stops the subject no pop, or only verified binds (a refusal must not erase a warrant)

Identifiers are src|sha256(canonical body), where the canonical body is sorted-key, separator-free JSON. Same event, same id, on any machine. verify_chain() re-derives every id and every link; root() folds the whole history into one hash — and that hash is the only thing worth publishing, for the reason in the second limitation below.

The TOSS fold

1 製材     spherePop      reshape_rw   POP       one unbroken ribbon
2 接着①    crossWeave7x2  layer_rw     —         seven veneers at ninety degrees
3 成型①    dieMold1       press_rw     —         first thermal press
4 インサート insert4        drill_rw     BIND      four Onime nuts
5 接着②    crossWeaveTop2 seal_rw      —         laminate over the hardware
6 成型②    dieMold2       seal_rw      —         hidden hardware seal, zero screws
7 トリム    ncTrim         trim_rw      REFUSE    the offcut is opened and refused
8 研磨     koguchiPolish  polish_ro    VERIFY    chamfer so surfaces meet square
9 仕上げ    foldToCenter   place_ro     COLLAPSE  fold into [0,0]

Nine material steps produce only five recorded steps and six events. The four silent steps — the two laminae and the two presses — are exactly the ones where the material is under constraint while nothing is adjudicated. Nobody has to decide anything while a press is closed. That seam between the material and the record is a choice, marked as one here rather than smuggled in as a derivation.

freedom 8 → 1 is non-increasing at every step, and strictly decreasing at all of them except 5 → 6, where the second press closes the same seam and so removes nothing new. The test asserts the flat step is exactly [6], so a future edit that flattens something else fails loudly.

Two limitations, measured rather than mentioned

1. A consistent rewrite is invisible from inside. If someone edits a payload, recomputes its id, and relinks the following event, verify_chain() returns True — because the history is now internally consistent. No content-addressed ledger can catch that alone. The defence is publishing root() somewhere the rewriter does not control. test_a_consistent_rewrite_is_invisible_without_an_anchor asserts both halves: the chain passes, and the root changes.

2. Attenuation forbids escalation, not skipping. In Vaked, examples/spherepop/spherepop-lifecycle.vaked checks clean, and so does spherepop-shortcut.vaked, which draws a claim closing without ever being warranted. A closed subject holds less than a bound one, so the bad shape is a narrowing edge and the checker has nothing to say. Order is a rule, not a lattice. That is why pop.py enforces E-COLLAPSE-UNWARRANTED and the mesh only enforces the shape.

The one thing the graph can catch is the sharpest rule of all: spherepop-refusal-leak.vaked hands a refused subject back to a claiming surface and produces exactly one E-CAP-ATTENUATION — because closed cannot become claimable without escalation.

Verified on this machine

claim evidence
kernel + fold test suite 27 tests, OK
spherepop-lifecycle.vaked {"diagnostics": []}
spherepop-shortcut.vaked {"diagnostics": []} (the limitation, confirmed)
spherepop-refusal-leak.vaked exactly 1 E-CAP-ATTENUATION
same sphere, twice identical root()
different sphere different root()
the fold's state collapsed, chain intact

Files

pop.py                      the record kernel (Ledger, Event, five kinds, chain)
toss.py                     the fold: nine steps, freedom ladder, proof emitter
tests/test_pop_toss.py      27 tests, including the two limitations

replayable ⇒ admissible · a plausible branch may be ranked; only a verified branch may be bound · {<3,<3,<3}+1