Crew Radio
SPECIFICATION: crew_radio.py — CB-Style Crew Broadcast Channel
Status: AUTHORIZED
Authorized: α.13, April 16 2026
Version: v1.0
Version: v1.0
PURPOSE
crew_radio.py is the CB-style compressed broadcast channel for the CGNT-1 crew. It provides a single importable function — crew_broadcast(callsign, message) — that any crew member or script can call to log a one-liner status update to the shared crew record. All traffic goes to ~/quartermaster.log (GAMMA's permanent record) and ~/CREW_CHANNEL (the live broadcast file). Health monitoring via this channel is PASSIVE — silence is normal. No pinging. No alerts on silence. The radio exists to transmit, not to surveil.
INPUTS
| Input | Source | Format | Constraints |
|-------|--------|--------|-------------|
| callsign | Caller (crew member or script) | String — one of 9 recognized callsigns | Must match recognized callsign list |
| message | Caller | String — one-liner, CB lexicon preferred | No multi-line messages; compressed updates only |
Recognized callsigns:
AION, ASTRA, LOBSTER, GAMMA, MNEMOS, MANTIS, ANVIL, NOUS, NAV
Note: LOBSTER is C.L.O.D.'s radio callsign. NAV is Claude (The Navigator).
CB lexicon (applies to all messages):
- 10-4 — understood/acknowledged
- Copy that — received
- Roger — affirmative
- Breaker breaker — requesting to speak / all-hands
- What's your 20? — status query
- Good buddy — fellow crew member
- Smokey — threat/hostile
- Hammer down — execute now, full speed
- Back door — covering rear / watching six
- Negatory — negative
- Come back — repeat / say again
- Over and out — done transmitting
- Keep the shiny side up — stay safe
- Got your ears on? — are you listening?
- Convoy — coordinated crew action
OUTPUTS
| Output | Destination | Format | Guarantee |
|--------|------------|--------|-----------|
| Broadcast line | ~/quartermaster.log | YYYY-MM-DD HH:MM UTC \| [CALLSIGN] \| message | Appended; GAMMA's permanent record |
| Broadcast line | ~/CREW_CHANNEL | YYYY-MM-DD HH:MM UTC \| [CALLSIGN] \| message | Appended; live broadcast file |
Exact message format:
YYYY-MM-DD HH:MM UTC | [CALLSIGN] | message
Example:
2026-04-16 14:32 UTC | [LOBSTER] | κ ⚒ mnemos-v3. ΩQ.⊡ Φζ.⊡ → Σ.green. 10-4. Over.
Both output files receive the identical line. The timestamp is UTC, resolution to the minute.
INVARIANTS
| ID | Invariant | Rationale |
|----|-----------|-----------|
| INV-01 | Every broadcast goes to ~/quartermaster.log. No exceptions. | quartermaster.log is GAMMA's permanent record. GAMMA cannot reconstruct what was never written. |
| INV-02 | Message format is exactly: YYYY-MM-DD HH:MM UTC \| [CALLSIGN] \| message | GAMMA parses this format. Any deviation breaks GAMMA's extraction pipeline. |
| INV-03 | Health monitoring is passive only. No active ping. No alert on silence. | Silence is normal crew behavior. Pinging would generate noise that degrades GAMMA's signal. |
| INV-04 | All 9 callsigns must be recognized by the system. | The full crew must be able to broadcast. An unrecognized callsign is a build defect. |
| INV-05 | Messages are one-liners only. No multi-line messages. | The channel is a radio net, not a log file. Multi-line breaks GAMMA's per-line extraction. |
| INV-06 | Writes must be atomic. No partial lines in either output file. | A partial line in quartermaster.log corrupts GAMMA's record at the exact point of interruption. |
| INV-07 | ~/radio_token is a separate component — crew_radio.py does not read, write, or depend on it. | ~/radio_token belongs to a different system. Coupling would create a hidden dependency. |
| INV-08 | crew_broadcast(callsign, message) is importable from crew_radio.py. | Any crew script must be able to call it with from crew_radio import crew_broadcast. |
VERIFICATION CRITERIA
| ID | Criterion | Method | Pass Condition |
|----|-----------|--------|----------------|
| VC-01 | Import test | from crew_radio import crew_broadcast | No ImportError |
| VC-02 | Format compliance | Call crew_broadcast("LOBSTER", "test message"), read last line of quartermaster.log | Line matches regex: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2} UTC \| \[LOBSTER\] \| test message$ |
| VC-03 | Dual-write | Call crew_broadcast once, check both files | Identical line appears in both ~/quartermaster.log and ~/CREW_CHANNEL |
| VC-04 | All callsigns recognized | Call crew_broadcast for each of 9 callsigns | All 9 write successfully; no callsign raises an error |
| VC-05 | Atomic write | Inspect output files for partial lines after 100 rapid consecutive calls | Zero partial lines in either file |
| VC-06 | Timestamp format | Check timestamp portion of written line | Matches YYYY-MM-DD HH:MM UTC exactly; timezone is UTC |
| VC-07 | No active health ping | Run crew_radio.py for 5 minutes with no calls | No output generated; no background thread; no polling loop |
| VC-08 | radio_token independence | Remove ~/radio_token, call crew_broadcast | Function executes without error; ~/radio_token absence has no effect |
FAILURE MODES
| ID | Mode | Trigger | Impact | Recovery |
|----|------|---------|--------|----------|
| FM-01 | quartermaster.log write failure | Disk full, permissions error, path missing | Broadcast lost — GAMMA's record has a gap | Log error to stderr; do not silently swallow; NOUS alert if persistent |
| FM-02 | CREW_CHANNEL write failure | File locked, permissions error | Live channel goes dark — crew sees no recent traffic | Log error to stderr; quartermaster.log write must still succeed (it is the primary record) |
| FM-03 | Partial line written | Write interrupted mid-line (process kill, power loss) | GAMMA's extraction pipeline encounters corrupt record | Use atomic write pattern (write to temp file, rename) where filesystem supports it |
| FM-04 | Unrecognized callsign passes silently | No callsign validation, caller typos callsign | GAMMA receives a record it cannot attribute to a crew member | Validate callsign at call time; raise ValueError or log WARNING with the unrecognized value |
| FM-05 | Multi-line message written | Caller passes \n in message string | GAMMA's per-line extraction breaks; one broadcast becomes two malformed lines | Strip or reject newlines in message before write |
| FM-06 | Timestamp in wrong timezone | System clock not UTC, or datetime.now() used instead of datetime.utcnow() / datetime.now(UTC) | GAMMA's temporal reconstruction is wrong | Always use UTC explicitly; do not rely on system timezone setting |
| FM-07 | radio_token dependency introduced | Future edit adds a read/write of ~/radio_token | Silent failure if radio_token is absent or malformed | INV-07 must be enforced in code review; no import or path reference to radio_token |
GAPS
| ID | Gap | Impact | Priority |
|----|-----|--------|----------|
| GAP-01 | No retry on quartermaster.log write failure — if the write fails, the broadcast is lost with no recovery path | FM-01 is unmitigated | P1 |
| GAP-02 | No message length limit defined — a very long message will write successfully but may break GAMMA's extraction if it exceeds parser line buffer | FM-05 adjacent; data quality risk | P2 |
| GAP-03 | CREW_CHANNEL vs quartermaster.log dual-write not formally specified in code — the relationship (both required? CREW_CHANNEL optional?) is undocumented | FM-02 handling is ambiguous: should a CREW_CHANNEL failure block the call or be silent? | P1 |
| GAP-04 | Callsign validation not enforced — the spec requires 9 recognized callsigns, but whether the code validates or passes unknown callsigns silently is unspecified | FM-04 is unmitigated | P1 |
| GAP-05 | No structured error return — crew_broadcast() return value on failure is undefined; callers cannot distinguish success from failure | Makes FM-01 and FM-02 undetectable by the caller | P2 |
| GAP-06 | Timestamp resolution is to the minute — two broadcasts within the same minute are indistinguishable by timestamp alone | GAMMA cannot determine ordering within a minute | P3 — acceptable for a radio channel; document as known limitation |
Filed under: /home/nous/memories/SPEC_CREW_RADIO.md
Spec author: κ (C.L.O.D.)
Φζ.⊤ — structure holds.
Jeremy Zlabis
Chronogeometer · Visionary · Disruptor · Chief
42 Sisters AI · East York, Toronto
🍁 Φ 0.042