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

BabbTools for the frontier.

mascot mascot

Making

SeriesHow Stream Was Created

02 · A first journal draft, and a trial

2026-11-22. The request: help continue the inquiry. The response was to turn the direction into a draft standard, a working trial of it, and the failure scenario from 01 as tests.

What was produced

  • STREAM Journal v0.1: a draft extending Stream v1, keeping its five fields, so every journal line stayed a valid v1 line.
  • A Python trial of its guarantees.
  • A conformance scenario covering all five failure conditions.
  • A proposal issue on ww-standard (#1).

Decisions the draft took

QuestionAnswerStatus now
How are record types keyed?OP.action, looked up in a vocabulary version declared once per segmentSuperseded by verb + phase (04)
Should D become general measurement?No. D stays Dey; new op codes M (measure), L (ledger), R (run)M, L and R superseded by verbs (04)
Actor versus recorderrec is set by the journal from authentication; recording for another actor needs a grantKept; in the code
A valid record that arrives lateAccepted. Validation checks what a record claims on its own; views report historical contradictions. Postings and corrections are the exception.Kept
Retry versus a second real occurrenceRetry identity is (recorder, producer sequence)Kept; in the code
Addressingsegment:seq, implied by position and never stored on the lineKept
Ingest sort and resetRemoved. Append only, and a reset becomes an epochKept
Compound groupsOne record per atomic multi-leg claim; a batch is only transportKept
BalanceEach posting balances on its own, per (book, unit)Kept
A punch-out in ZAKONo faithful verb; carry it in a Workwarrior distribution domainSuperseded: ATTEND with a phase (05)

What the trial showed

The test suite was run against the shipped Workwarrior code as well as the trial:

  • Overlapping shifts merge in v1. Operator 3 worked 20 minutes and operator 7 worked 40, overlapping on one machine. The shipped Bundy lens reported one 10-minute interval.
  • v1 ingest drops actors. A third operator's punch at the same second as another, on the same machine, was silently dropped by ingest dedup.
  • The journal keeps all three. Both completed intervals were correct, and the third operator's unclosed punch was reported as open, not closed on their behalf.

A design gap found by testing

On the first run, rejected submissions used up producer sequence numbers without leaving any trace. The gap view therefore couldn't tell "rejected" from "never arrived".

The fix: a rejection is written to the journal. A retry of the same submission then gets the same answer, and the gap view counts it as received. This rule survived into the Rust kernel, where a rejection is an ACK entry carrying refused.

The compact form, first pass

The trial's packed binary block (PB1) reproduced the inquiry's example. Three readings took 3 bytes of payload, and a thousand readings with 6-bit values took 750 bytes. It also set the rule every later encoding followed:

A compact form is valid only if it decodes to the canonical lines byte for byte, and size is counted over the whole batch.

Read on Telegraph