interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / tools / trit / README.md

103 lines · 7664 bytes Raw Blame History Source

trit: wake signal per bot (T-002)

trit DIR BOT...            one line "<bot> <1|2> <token>" per bot that has work
trit DIR --ack BOT TOKEN   prints the receipt "<bot> 0", then the next wake if any

Reads DIR/inbox/<bot>.md and the emergency lane DIR/inbox/<bot>.emergency.md. Only prints; delivery stays outside (SendToAgent). Trit meaning follows TURNS.md (Drake 12:24): 1 = task, 2 = stop, 0 = read/done receipt (only from --ack), silence = nothing to do.

Legacy exit status: 0 printed at least one line, 1 silent (no bot has work), 2 usage, 3 ack refused, 4 invalid codebook, 5 bad key, 70+ internal/I-O.

Build and test from the repo root: sh tools/trit/build.sh && sh tools/trit/test.sh. Proof: lean tools/trit/proof/TritSignal.lean. Namespace TritBin mirrors trit.om function by function; sh tools/trit/proof/difftest.sh (python3 + lean) runs it with #eval against the binary on generated fixture dirs and requires identical stdout, stderr and exit status. The fixtures include codebook-signed lines (valid, tampered, wrong key/id, replayed, stale counter files) and unsigned STOP lines. sh tools/trit/mutate.sh runs its listed mutants against both (OMC defaults to the absolute seed/out/omc). The unmutated tree must pass first. A mutant counts as killed only when test.sh itself reports failed assertions (TOTAL ... fail>=1, exit 1); a compile error, an unapplied mutation, a crashed runner or a missing prerequisite is never a kill. The differential models read mode only, so it must kill the read-mode mutants and is recorded, not required, for the --ack/fsync mutants. Exit 0 = all killed; 1 survivor; 2 prerequisite missing; 3 mutant unapplied or invalid; 4 harness error; 5 baseline failed. sh tools/trit/test-mutate.sh is the regression for that driver. Gate: tests/gates/run.sh trinary (manifest tests/gates/omega-trinary.gate).

Current daily flow

The receipt-era interface above remains available for historical callers. For the current Trinary Doctrine use:

trit DIR --inspect BOT...       unread work as 1 plus its exact token; silence when quiet
trit DIR --consume BOT TOKEN    consume that token durably; no stdout and no next wake

--inspect preserves the existing inbox, verification and cursor rules. It emits only inspection requests, including for signed stop records. The current shared HMAC key proves key possession, not a particular sender, and the verifier's counter ordering does not prove wall-clock freshness. No stop request from this interface is an authorized process action. Inspect the record and establish fresh sender identity and existing runtime authorization separately before acting. These commands do not stop any process. Bad tokens still fail without advancing the cursor; consumption never hides a later unread task.

Task details stay once in the existing durable record. Reading sends nothing. An explicit request for help is notification 0 only after its task record exists; no value produced by the legacy --ack interface may be forwarded as help. No codebook row is reassigned here. Neither native help signalling nor the proposed combined-digit codes or ambient liveness mechanism are implemented by these commands. Harnesses that need a startup prompt receive the record reference; this is not an enforced one-trit transport and no usage savings are claimed.

python3 tools/trit/test-daily.py is an external verification oracle. It signs fixtures independently with Python's HMAC and checks exact output, exits, tokens, silent consumption, legacy behavior and invalid requests. It is not a runtime dependency. Existing Lean/differential proofs cover the legacy interface only; the new entry points are host-tested, not claimed source-proved.

Mutation work directories must be fresh. A supplied existing W is refused and left intact; gate runs keep separate output directories so earlier failures survive.

python3 tools/trit/mutate-daily.py checks the daily oracle against a passing baseline and deliberate stop promotion, receipt leakage, next-wake leakage and bypassed consumption. Invalid compilation or an incomplete test run fails the instrument; it never counts as a killed mutant. The host gate preserves all fixtures, mutant sources, binaries, raw exits and logs under its fresh output directory, and emits tool versions and log hashes. Wrong-recipient stop records remain inspection work for the reader to reject, never runtime authority.