Repository navigation
SSTV: decoder unit + TX player elements, bump station-agent to e8859cdb - #123
Conversation
…nt to e8859cdb
- oe5xrx-decoder-run: `sstv)` case — pw-record --raw (no fallback/reconnect)
| python3 -I -m station_agent.sstv.rx_unit --port --rate. OE5XRX_SSTV_PORT
must be 4 digits, 8200–8299 and equal 8200 + instance slot. KISS port and
runtime dir validation moved into the aprs case.
- oe5xrx-decoder: RDEPENDS python3-numpy + station-agent (rx_unit module).
- oe5xrx-audio-system: pin gstreamer1.0-plugins-base-{rawparse,audioconvert,
audioresample,volume} for the agent's SSTV TX player (rawaudioparse was
missing; the others relied on the -meta RRECOMMENDS). Lint updated.
- audio_selfcheck (QEMU): gst-inspect rawaudioparse/volume; import numpy +
station_agent.sstv.rx_unit as oe5xrx-decoder under the unit's W^X/MemoryMax.
- station-agent SRCREV -> e8859cdb (station-manager #235, SSTV).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
peterus
left a comment
There was a problem hiding this comment.
review-loop round 1 (bugs+tests, security+performance). A1 green: pytest -m unit 224 passed, shellcheck clean, l3-audio-rdepends-lint.sh OK. Image ↔ agent contract checked against station-manager @ e8859cd (decoders/sstv.py env, sstv/rx_unit.py argv/exit codes/bind 127.0.0.1, sstv_tx.build_play_argv elements, pyproject.toml lists station_agent.sstv) and the oe-core package names: all consistent. 4 low-severity findings below.
- audio_selfcheck 2b: run the real station_agent.sstv.rx_unit (import, bind, clean EOF exit) under every sandbox/identity/limit directive parsed from the installed oe5xrx-decoder@.service; unit test guards that no sandbox key of the unit is left out of the mirror. - audio_selfcheck header: step list + 'no Python' wording updated. - decoder unit comments decoder-neutral (aprs/sstv). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
peterus
left a comment
There was a problem hiding this comment.
review-loop round 2 (bugs+tests, security+performance): 2 low-severity findings. A1: unit tests 224 passed, shellcheck clean, rdepends lint OK. Cross-checked the wrapper against the agent at e8859cd: decoders/sstv.py env(), sstv/rx_unit.py CLI/exit codes, and sstv_tx.py build_play_argv, plus the station_agent.sstv package list in pyproject and the oe-core python3 manifest. No mismatches.
- audio_selfcheck 2b: rx_unit probe binds 8299 (slot 99) instead of the live sstv-slot1 port 8201. - decoder unit: SyslogLevel comment states that all rx_unit stderr logging (INFO per picture + errors) is kept, bounded by the rate limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
peterus
left a comment
There was a problem hiding this comment.
review-loop round 3 (bugs+tests, security+performance): 2 low findings. A1 green: 224 unit tests pass, shellcheck clean, l3 lint OK. Wrapper/unit checked against station_agent @ e8859cd (sstv.py env(), rx_unit argv/exit codes, sstv_tx build_play_argv); split package names checked against OE-core gst-plugins-base 1.28.2 (rawparse not disabled).
- sstv pw-record failure test uses exit 3 and asserts the code propagates (pw_exit=1 was indistinguishable from the clean-end fallback). - oe5xrx-audio-system comment maps audioconvert/audioresample/volume to their split packages; drop the stale 'four sub-plugins' count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
peterus
left a comment
There was a problem hiding this comment.
review-loop round 4 (bugs+tests, security+performance): 2 low-severity findings. Unit tests (224 passed), shellcheck, l3-audio-rdepends-lint green; image side cross-checked against station-manager e8859cd (sstv.py env(), rx_unit argv/bind/exit codes, sstv_tx build_play_argv) and oe-core gst-plugins-base 1.28.2 split packages.
- wrapper: document that the sstv decoder always runs the pinned station_agent (also on the dev image, where the agent runs from /mnt/dev). - tests: drop dead rundir setup in _run_sstv. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
peterus
left a comment
There was a problem hiding this comment.
Review-loop round 5 (bugs+tests, security+performance): 1 low-severity finding. Checked: unit tests (224 passed), shellcheck, l3 RDEPENDS lint, wrapper ↔ agent env contract (decoders/sstv.py env(), rx_unit exit codes/bind, sstv_tx build_play_argv ↔ pinned split packages), self-check sandbox mirroring, rx_unit CPU headroom under CPUQuota=50% (decoder benchmark: ≤0.7% of one x86 core in real time for robot36/martin1/pd180).
- audio_selfcheck: audioconvert/audioresample comment names the pinned split packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SSTV feature, image part (station-manager plan
docs/superpowers/plans/2026-11-24-sstv.md, Task 15). station-manager side merged in OE5XRX/station-manager#235.Changes
oe5xrx-decoder-run: newsstv)casepw-record --raw -P '{ node.dont-fallback=true node.dont-reconnect=true }' --target $node --rate $rate --channels 1 --format s16 - | python3 -I -m station_agent.sstv.rx_unit --port $port --rate $rate.Env as written by
station_agent/decoders/sstv.py:OE5XRX_SSTV_PORT(= 8200 + slot),OE5XRX_SAMPLE_RATE(8000). The port must be exactly 4 digits, 8200–8299 and equal8200 + <instance slot>. Clean pipeline end → exit 1 (same as aprs, soRestart=on-failurefires). The pw-record part is now a sharedrecord()function; KISS-port + runtime-dir validation moved into theaprs)case (sstv needs neither).-I(isolated mode) is a small hardening on top of the plan'spython3 -m.oe5xrx-decoderrecipe: RDEPENDSpython3-numpy+station-agent(the rx_unit module ships in the agent package).oe5xrx-audio-system: the agent's SSTV TX player (sstv_tx.build_play_argv:filesrc ! rawaudioparse ! audioconvert ! audioresample ! volume ! pipewiresink) needsrawaudioparse, which no installed package provided → pingstreamer1.0-plugins-base-rawparse. Also pin-audioconvert,-audioresample,-volumeas split packages (they relied on the empty-basepackage's-metaRRECOMMENDS until now). Checked against oe-core @ lock (gstreamer1.0-plugins-base_1.28.2: rawparse is built by default, split names viagstreamer1.0-plugins-packaging.inc).l3-audio-rdepends-lint.shupdated.tests/audio/audio_selfcheck.sh): gst-inspect alsorawaudioparse+volume; new step importsnumpy+station_agent.sstv.rx_unitas useroe5xrx-decoderviasystemd-runwithMemoryDenyWriteExecute=yes,MemoryMax=96M,NoNewPrivileges,ProtectSystem=strict(plan step 2–4 check, run by the PR's Hetzner build + QEMU job).test_decoder_static.py): sstv argv, pw-record no-fallback, port validation (range, slot mismatch, leading zero, whitespace/newline, injection), failure propagation, KISS port ignored for sstv, RDEPENDS, element→package mapping, lint + selfcheck coverage, agent SRCREV pinned.e8859cdb0f22be2f564a0d09bd116df19f3aba62(viascripts/pin-station-agent.sh).Sandbox: unchanged, why
MemoryDenyWriteExecute=yes: numpy has no JIT and does not create W+X mappings on import or in the decoder path (no ctypes callbacks). The new QEMU step runs the import under exactly this setting.MemoryMax=96M/CPUQuota=50%: python3 + numpy is ~35–40 MB RSS; the decoder streams rows at 8 kHz mono. Plan Task 17 measures real CPU/RSS on .211 and raises limits only for the sstv instance if needed.IPAddressAllow=localhost: rx_unit binds 127.0.0.1:820N itself.Notes
>=2.5.5. The decoder only uses long-stable APIs (convolve,interp,cumsum,median,hamming,sinc, …), so no blocker.🤖 Generated with Claude Code