/ Stream
build 2026.12.03 · --:--:-- UTC · RSS

BabbTools for the frontier.

mascot mascot
All materials

Option 9 direction test — report (Stage D prep)

OPTION9-REPORT.md View the source file

Run: Sun 2026-11-29, Python stdlib only, local. Files: option9_test.py (the test) and this report, in ~/workspace/stream-unfolding-work/direction-bit/. Reproduce: python3 option9_test.py in that directory (verified: two consecutive runs byte-identical). It imports direction_bit_test.py from the same directory and reuses its harness unchanged (corpus parsing, to_facts, rule-B fold, fixture, replay, preset decoder). No GitHub writes, no Lab tool work, no repo writes of any kind.

Material tested: the note 16b transcript (L:1–L:16), the 75-entry kernel-model corpus, the mark-boundary entry-exit fixture, and the three v0.1 compact-header presets — the same material as the direction-bit test.

Sources:

  • Option 9 definition: the task brief (direction as a 2-bit mode over a named pair).
  • Pairs normal/reversal/edge semantics: ~/workspace/pairs/modules/pairs.py (14 pairs, each with normal/reversal/edge) and ~/workspace/pairs/lib/entry.py (infer_pair returns COMPOUND when the two-account model does not honestly describe the entry).
  • Per-relation contracts: note 19 §5 (docs/creation/review/19-generative-world-model-and-matrix.md).
  • Corpus + harness: ~/workspace/stream-stage-c/ (copies of babbworks/stream docs/kernel-model/test/ at main 5d18970).
  • Presets: docs/compact-header/bitpack-header-draft-v0.1.md and bitpack-header-test-vectors-v0.1.md at main 5d18970.
  • Prior result: DIRECTION-BIT-REPORT.md in this directory (D1b 4/5, failing O4 on 4 entries).

Option 9, stated

Direction is a 2-bit mode over a named pair, replacing the 1-bit D:

ModeNameMeaning
00normaltraverse the pair in its defined direction
01reversalsame pair, sign flipped (traverse outward)
10edgeno traversal; relabel / recognise / accrue / impair — the home of is facts and of QUERY
11compoundthe fact is not honestly a single pair; it names its legs instead

The named pair, per relation (note 19 §5):

  • IN — membership of a referent in a boundary/run. Defined: in. Reversal: out.
  • IS — claim of a property about a subject. Defined: assert (into the record). Reversal: withdraw / supersede.
  • MAY — permission held by a subject. Defined: grant (into the allowed set). Reversal: revoke.
  • TO — flow of a conserved quantity between subject and object. Defined: incoming to the anchor. Reversal: outgoing from the anchor.

Every pair's defined direction is an into direction. That is what makes the projection below uniform across relations.

The table

RelationVerbPhaseModeAnchorSource / rationale
inOPENinstant00 normalmembership pairnote 19 §5 IN: open. Pairs normal = traverse in defined direction.
inCOMMITinstant01 reversalmembership pairnote 19 §5 IN: close. Pairs reversal = same pair, sign flipped.
inACTbegin10 edgerun-scope (not a traversable boundary)Pairs edge = reclassification. The run is a scope, not a boundary the act crosses (D1-strict); phase carries begin/end, so the mode does not re-encode it. Begin and end take the same mode: the mode describes the act's relation to its run-scope; the begin/end distinction lives in phase.
inACTend10 edgerun-scope (not a traversable boundary)Pairs edge = reclassification (running → complete). Phase already carries the close; D re-encoding it double-counts the same distinction (DIRECTION-BIT-REPORT O4). The actual flows live in the attached use facts, which keep their own TO modes.
inATTENDbegin00 normalevent membershipnote 19 §5 IN: enter. Pairs normal. (Preset-only verb; not in the corpus. Used for O5.)
inFAILsample10 edgefailure recognisedPairs edge = recognise. A sample is looking, not crossing (DIRECTION-BIT-REPORT O1/O4). (Preset-only verb; not in the corpus. Used for O5.)
isCREATEinstant00 normalrecordnote 19 §5 IS: assert. Pairs normal: a new referent enters the record. CREATE is the only IS main verb that introduces a new referent, so it is the pair's normal member; ESTIMATE/NOTE are edge recognitions below.
isESTIMATEinstant10 edgeclaimed quantity accruedPairs edge = accrue/recognise. A claimed quantity is recognised, not a new referent entering; no traversal.
isNOTEinstant10 edgeannotation recognisedPairs edge = recognise. A note annotates an existing thing; no traversal.
isAMENDinstant01 reversalprior assertionnote 19 §5 IS: withdraw. Pairs reversal: correcting an entry is done by reversing it; a supersede undoes the prior assert.
mayGRANTinstant00 normalallowed setnote 19 §5 MAY: grant. Pairs normal (grantee enters the allowed set).
mayREVOKEinstant01 reversalallowed setnote 19 §5 MAY: revoke. Pairs reversal = grant flipped. (Synthetic for O3; no REVOKE entry exists in the corpus.)
toBINDinstant00 normalthe binding (object anchor)note 19 §5 TO: incoming. Binding attaches/brings in; Pairs normal.
toPAYinstant01 reversalpayer (subject anchor)note 19 §5 TO: outgoing from the payer. Pairs reversal: money leaves the payer's holding.
toACKinstant01 reversalacknowledger (subject anchor)note 19 §5 TO: outgoing. The denial goes out from the acknowledger. Pairs reversal.
toMEASUREsample10 edgemeter reading recognisedPairs edge = recognise. A sample is looking, not crossing; a reading is recognised/accrued, not traversed.
toQUERYbegin10 edgequestion posed (no flow yet)Pairs edge = recognise. The question as posed carries no observable flow in its payload (DIRECTION-BIT-REPORT O4); posing it recognises a need for information. It is not a traversal of the TO pair — nothing flows yet.
toQUERYend00 normaltask (object anchor)note 19 §5 TO: incoming. The use flows into the task. Pairs normal.

This table is the whole assignment. The script prints it from the same MODE_TABLE dict it predicts from, and the report reproduces it verbatim. No prediction rule looks anything up silently. Every attached is fact in the corpus (payload properties) is edge by the same rule — a property stated, never traversed — which is the sense in which mode 10 is the home of is facts; among IS main verbs, CREATE is the normal assert and AMEND its reversal, while ESTIMATE and NOTE are edge recognitions (see sensitivities: that CREATE/AMEND split is a judgment call, but it is not load-bearing for the score in the way ACT end and QUERY begin are).

Projection to the stored 1-bit D (a stated convention, not a derivation): D = 1 iff the mode is reversal (01). Normal traverses inward and edge traverses nothing, so both project to 0. Compound (11) has no projection: a fact naming several traversals, some in and some out, cannot be stored in one bit. O4 for Option 9 is therefore a joint test of this table and this projection — the mode is predicted from content, projected to D, and compared with stored D.

The table (5 observables)

CandidateO1 to legs conserveO2 entry/exit fixtureO3 grant/revocationO4 75/75 verbsO5 v0.1 presets
Option 9PASSPASSPASSPASS (75/75)FAIL (2/3)
D1b (for comparison)PASSPASSPASSFAIL (71/75)PASS (3/3)

Option 9 passes 4/5 — the same count as D1b, with the failure moved from O4 to O5. It does not pass all five. The failure is not a near-miss in the assignment: it is a disagreement in the data (see O5 and the invariance argument below).

O4 — Do the 75 corpus entries keep their verb names? PASS (75/75)

Mode predicted from content, projected to D, compared with stored D: 75 correct, 0 wrong, 0 undefined. Per-mode: normal (00) 43 correct, reversal (01) 11 correct, edge (10) 21 correct. No corpus entry is compound, so the unprojectable mode is untested by O4.

The 4 entries D1b failed all pass under Option 9:

EntryVerb / phaseModeProjected DStored D
[13]R:QUERY(10 edge00
[17]R:ACT)10 edge00
[19]R:ACT)10 edge00
[69]R:QUERY(10 edge00

Why they pass: the edge mode exists precisely for facts that are not traversals. ACT end is a status reclassification (running → complete) whose close is already carried by phase, with the real flows in the attached use facts; QUERY begin poses a question that carries no observable flow in its payload. Both project to 0 under the stated convention (edge traverses nothing, so nothing is outgoing), which is what the corpus stores.

What the pass depends on (read before citing it). The O4 pass rests on two load-bearing judgment calls plus one stated convention:

  1. ACT end → edge, not reversal. Under D1b's uniform "close = reversal" reading, [17] and [19] fail. Option 9 fixes them only because the edge mode lets the close live in phase instead of in the mode. The justification is the D1-strict reading (the run is a scope, not a boundary) plus the double-counting diagnosis from the direction-bit report. If that reading is rejected, O4 falls to 73/75.
  2. QUERY begin → edge, not outgoing. Under D1b's "the question goes out" reading, [13] and [69] fail. Option 9 fixes them only because posing a question is treated as recognition, not traversal. If that reading is rejected, O4 falls to 73/75.
  3. The projection convention (edge → 0). If edge projected to 1 instead, all 21 edge entries would fail and O4 would be 54/75. The convention is justified (no traversal ⇒ nothing outgoing) but it is a convention, and the O4 result is joint with it.

Calls that do not move the score: ACT begin → edge is symmetric with ACT end (begin normal + end edge would still give 75/75, since both project to 0); the choice is made on coherence grounds, not score. CREATE → normal vs edge is likewise score-neutral (both project to 0); CREATE is normal so that AMEND can coherently be its reversal — a reversal of an edge would be incoherent in Pairs terms, since reversal flips normal. COMMIT/AMEND/PAY/ACK → reversal are D1b's own rules, unchanged; they are load-bearing (11 entries project to 1) but they are independently justified by note 19 §5, not fitted to the stored bits.

O1 — Do to legs conserve? PASS

The mode-driven fold reproduces the reference (rule B) Books exactly over the same 12 live to facts (10 use, 2 leg-pair), with 0 pair-sum failures and 0 unhandled facts. Fold rule per attached to fact, read from its content (never its stored dir): the anchor is the fact's subject; a fact whose subject is the source of the flow is outgoing → reversal (01) → subject −q, object +q; a fact whose subject is the sink is incoming → normal (00) → subject +q, object −q; edge posts nothing; a compound leg posts as written. All 12 corpus facts are subject-is-source (the pair fact's subject holds the negative leg; the use fact's subject is the supplying pool), so all 12 fold as reversal — which is exactly the subject → object posting rule B uses.

Coverage caveat: the normal (00), edge (10) and compound (11) fold branches are untested by the corpus — no attached to fact exercises them. O1 passes, but only via the reversal branch. The main-fact modes do not enter the fold: no main to fact carries a measure in this corpus (MEASURE main facts are samples and excluded; QUERY)/ACT) main facts carry their flow in attached use facts).

O2 — Are entry/exit signs consistent with the fixture? PASS

Fixture steps as IN facts over the membership pair: entry is the normal traversal (00 → D 0), exit is its reversal (01 → D 1); pre-birth there is no boundary, so no pair exists to name and the mode is undefined. Spellings * → *() → (*) → *(), entry delta +1, exit delta −1 — all reproduced.

L:15 (compound) — handled honestly: yes. The move of A from B into C is mode 11, naming its three legs, each with its own pair and mode:

LegPairModeDelta
A direct-in-Cin00 normal+1
A parent-under-Bin01 reversal−1
A inside-B (transitive)in10 edge0

The legs reproduce the three deltas exactly. The zero leg is named too: a reader recomputing transitive membership needs to know A stays inside B. The compound's projection to D is None — no single bit can carry this fact, and the test records that rather than picking one of the three signs. The cost is that the legs must be stored (payload / attached facts); the mode alone says "compound, see legs".

O3 — Does grant/revocation invert cleanly? PASS

GRANT is MAY normal (00 → D 0), REVOKE is MAY reversal (01 → D 1): distinct modes, distinct projected D, so the REVOKE removes exactly the grant named. The transcript replay (L:15 guard, L:16 refusal) and the self-grant prefix property reproduce as in the direction-bit test; they are mode-independent, as before.

O5 — Does the corpus's direction bit agree with the v0.1 header's? FAIL (2/3)

PresetActModeProjected DPreset direction
QToB4ACT end, steel transfer10 edge01
UpgALACAHTATTEND begin, measure unknown00 normal00
I5wlhYAADeFAIL sample, actor withheld10 edge00

The single failure is QToB4. Under Option 9, ACT end is edge (→ 0) because the corpus stores ACT end as D=0 — the same assignment that makes O4 pass. The preset says 1. The corpus and the presets disagree about ACT end, and one (relation, verb, phase) row cannot project to both values.

Invariance argument (computed, not asserted). The script's sensitivity check reads ACT end as naming the TO pair instead of the IN pair — the steel outflow in the preset, the use outflow in the corpus entries — which makes ACT end reversal (01 → D 1). Then QToB4 agrees, but corpus [17] and [19] fail O4 (projected 1, stored 0). So whichever pair ACT end names, one side fails: the disagreement is in the data, not in the assignment. The only escape would be keying the mode on payload details (steel transfer vs use consumption), which is exactly the silent verb lookup the assignment rule forbids — and it would be fitting the two values after the fact, not deriving them. The two readings also expose what the disagreement is about: the preset's direction bit reads as the TO pair's flow direction (steel out), while the corpus stored D reads as the IN pair's mode (or its edge default). The v0.1 header has one direction field, so it cannot carry both — and Option 9's named pair is what forces the question "which pair?" that the 1-bit D elides. That is diagnostic progress, not a pass.

The other two presets agree. The FAIL reading carries the same softness the direction-bit report flagged for D4: the preset text does not state the operand, and the IN reading is inferred from grid position 17; a sample is edge under any operand reading, so the agreement is robust to that softness (edge projects to 0 either way).

Cost to the header, the presets, and the 6-bit stored form

The v0.1 short header. The short header is 30 bits — position 7, phase 2, modality 1, direction 1, roles 4, estimate 1, change 1, delta 12, extended 1 — packed as five 6-bit characters. A 2-bit mode does not fit in the 1-bit direction field. The options, each with a price:

  • (a) Widen direction to 2 bits by taking 1 bit from delta (12→11): maximum representable delta falls 4095→2047. Preset I5wlhYAADe's delta 1200 still fits, but the delta-overflow rule is already the one undecided freeze gate in v0.1, and this makes it bite sooner.
  • (b) Take 1 bit from roles (4→3): one fewer role-presence bit; the typed-absence coding in the extended header would need rework.
  • (c) Grow the short header to 31 bits: the 5-character packing breaks (30 bits = 5×6); every short header becomes 6 characters.
  • (d) Keep the 1-bit direction in the short header as the projection and carry the full mode only in the extended (10-character) header: short headers keep decoding, but they can no longer distinguish normal from edge, or reversal from compound — the mode would have to come from the verb table.

Under (a), (b) or (c) the field layout shifts, so all three preset headers as published (QToB4, UpgALACAHT, I5wlhYAADe) would no longer decode and would need re-encoding; O5 would have to be re-run against re-encoded presets. Under (d) the presets keep decoding but the short form stops carrying the mode. Either way, the O5 failure on QToB4 is not a layout artifact: even after re-encoding, the preset's ACT-end value (outgoing) and the corpus ACT-end value (0) would still disagree unless one of the two values is changed.

The 6-bit stored form. The stored six (derive_context's stored6) are rel (2 bits) + D (1) + M/modality (1) + phase (2). Option 9 widens the direction field from 1 bit to 2, so the stored form becomes 7 bits — one extra bit per line, and the "6-bit" claim goes. The alternative is to store 6 bits and recover the mode from the (position, phase) assignment table, i.e. "6 bits + a mode table" — the same shape as derive_context's verdict ("6 bits + a verb table"), and subject to the same no-label-lookup constraint: a stored-form claim of "6 bits" under Option 9 is really a claim about 6 bits plus the table. Note also that mode 11 itself fits in the widened 2-bit field, but the legs a compound fact names do not fit in the header or the stored form at all — they live in the payload / attached facts, and a reader that drops them cannot reconstruct the fact.

What does not change. Positions (the 128-position grid), phases, and the Books fold rules are untouched. The mode is per-line overhead, not per-position. The fold's reference Books are identical under Option 9 (O1).

The honest verdict

Option 9 is a genuine improvement over D1b in exactly one place and a genuine regression in exactly one place, and they are the same place: it fixes O4 by moving the ACT-end failure into O5. The edge mode gives ACT end and QUERY begin a principled home — facts that are not traversals stop being forced into a traversal bit — and that takes O4 from 71/75 to 75/75, with L:15 handled honestly at last (compound, legs named, no single D pretended). But the same assignment breaks the one preset that reads ACT end as an outflow, because the corpus and the presets disagree about ACT end and no assignment keyed on (relation, verb, phase) — and no choice of named pair — can satisfy both. The score is 4/5 either way; Option 9 trades a corpus failure for a preset failure.

What Option 9 does settle, even in failing: the direction question is now well-posed. A 2-bit mode over a named pair can express everything the five observables demand — normal, reversal, edge, compound — where one bit could not. What it does not settle is which value ACT end carries, because that disagreement lives in the sources (corpus D=0 vs preset direction=1), and neither side is self-evidently wrong: the corpus reads ACT end as the act's IN membership (edge default 0), the preset reads it as the steel's TO flow (outgoing 1). Resolving it is a decision for Morgen, not a further test: either the preset's ACT-end direction is re-read as the IN pair (making QToB4's direction 0 and the preset a statement about membership, not flow), or the corpus ACT-end stored D is re-read as the TO pair (making [17]/[19] stored 1 and the entries statements about outflow, not membership), or the header is allowed to carry the pair explicitly so both readings can coexist. Until that decision is made, Option 9 is the best-scoring direction proposal that is honest about its own cost: 4/5, O4 fixed, O5 broken on QToB4, +1 bit per line (6→7 stored bits, or 6 bits + a mode table), presets to re-encode under any widening.

Sensitivities (where a different reading would change a count)

These were checked; the O5 failure is invariant under all of them:

  • ACT end as TO pair (computed in the script): O4 fails [17], [19]; O5 passes QToB4. The failure moves, it does not disappear.
  • ACT begin normal + ACT end edge: O4 stays 75/75 (both project to 0). Score-neutral; the symmetric edge/edge choice is coherence, not score.
  • CREATE edge instead of normal: O4 stays 75/75 (both project to 0). Score-neutral; CREATE is normal so AMEND can coherently be its reversal.
  • Edge projecting to 1 instead of 0: O4 falls to 54/75 (all 21 edge entries fail). The pass is joint with the projection convention.
  • FAIL preset operand as transition rather than referent: O5 stays 2/3 — a FAIL sample is edge under either operand reading, and edge projects to 0 either way.
  • COMMIT/AMEND/PAY/ACK as edge instead of reversal: O4 falls to 64/75 (all 11 stored-1 entries fail). These are D1b's rules, kept unchanged.

Caveats (inherited from the direction-bit test)

  • Preset positions ≠ kernel-model positions (32/41/17 vs ACT 0x60, ATTEND 0x68, FAIL unlisted); O5 tests the presets' direction bits, not their position numbers.
  • The mode-driven fold is the test's construction, as the D-driven fold was: the published Books fold ignores D (and the mode). A pass shows the mode is consistent with the Books, not that the Books need it.
  • Coverage: the corpus exercises 13 verbs and 13 of the 128 positions. No REVOKE entry exists in the corpus (O3's REVOKE half is synthetic); no corpus entry is compound (mode 11 is exercised only by the transcript's L:15); no attached to fact exercises the normal, edge or compound fold branches.