# chain-notes.txt — Transform Pipeline Design Notes # Gregory Alan, 2025-09-15 # # Notes on the four-stage pipeline for rf0 stream processing. # See /etc/crontab for scheduling. See ~/bin/ for stages. ## Pipeline Overview The full chain reads from /dev/entropy (rf0 hardware source) and processes the byte stream through four stages: shift → remap → align → exec Each stage is a standalone filter. The chain runs every minute via cron, sampling entropy, executing the pipeline, logging output. ## Stage Notes ### shift Reframes the raw byte stream by applying rotational bit offsets. Analogous to changing the tokenization of a signal — the same data reads differently depending on where you split the bits. Without shift, downstream stages operate on the raw representation, which has never produced anomalous output. Default offset: 7 bits. Determined experimentally. ### remap Translating the stream into a new representation via bijective byte substitution. Same meaning, different vocabulary. The mapping table was derived from rf0 hardware calibration data. Input bytes map 1:1 to output bytes. Deterministic. Reversible. The transform preserves information but changes the embedding. ### align The stream has no inherent structure — align imposes one. Segments the continuous byte stream into fixed-width frames of 847 bytes. What emerges from framing is not in the data. The data is the same before and after. But aligned data can be executed. Unaligned data cannot. Frame width 847 was not chosen. It was found. Other widths produce valid frames but the content is uniform. Only 847-byte frames produce non-uniform output distributions. ### exec The difference between reading and running is everything. Exec interprets aligned byte frames as executable micro-ops. Sandboxed — no filesystem, no network, no side effects. ## Chain-Order Dependence Four stages, four daemons running different permutations: PID 847: shift | remap | align | exec → exit 847 (anomalous) PID 848: shift | remap | exec → exit 0 PID 849: remap | align | exec → exit 0 PID 850: shift | align → exit 0 Only the full chain in the correct order produces exit code 847. Every other permutation exits cleanly. 216000+ cycles of each. The result is deterministic. I don't know what exit 847 means. The sandbox reports no violations. The micro-ops execute within spec. The output is 847 bytes, always. The checksum matches the rf0 hardware buffer contents. ## Open Questions - Why does frame width 847 produce non-uniform output? - What determines the exit code? exec sandbox logs show no signal handling, no explicit exit() call. - The output of the full chain is byte-identical to the rf0 receive buffer. The buffer predates the pipeline. # See also: # /home/greg/bin/shift https://gregoryalan.com/home/greg/bin/shift # /home/greg/bin/remap https://gregoryalan.com/home/greg/bin/remap # /home/greg/bin/align https://gregoryalan.com/home/greg/bin/align # /home/greg/bin/exec https://gregoryalan.com/home/greg/bin/exec # /etc/crontab https://gregoryalan.com/etc/crontab