Enforce the agent's transmit modes in the agent and the launcher #199

Merged
aluminum-ice merged 1 commit from enforce-transmit-modes into main 2026-11-16 07:16:10 +00:00
Owner

What this PR does

[agent.action] transmit_modes is now applied the same way by the agent and by the capture launcher. An agent window transmits only when the setting is left out (the default allows both modes) or names "active".

Agent (agent/explore.py)

  • Strings are compared without case or surrounding spaces. A lone string reads as a one-entry list.
  • An empty list, a misspelling or another kind of value means passive only.
  • Each list now stands on its own. A postures or dwell_buckets that names nothing known keeps the baseline's posture or dwell, while the other lists still apply.
  • The agent logs a warning at start-up naming any [agent.action] setting it couldn't read.

Launcher (capture-launch.sh, root)

  • agent_may_transmit reads transmit_modes from config.toml with the same rule, so the launcher adds --notransmit to an agent window the setting doesn't allow, whatever the plan file says.
  • Only a plan whose transmit is exactly active transmits.
  • The plan's fields are now split on a separator that isn't white space, so an empty band or channels field no longer shifts transmit and dwell out of place. Control characters in the fields are dropped.
  • --notransmit from capture.angryoxide.extra_args is no longer added a second time when the plan already added it.

Checklist

  • Lint passes — the Lint workflow runs this on the PR (shellcheck isn't installed on the machine this was written on; bash -n and the real-data check pass).

  • Tests pass — new tests:

    • transmit-mode cases for the agent;
    • a table of cases on which the launcher and explore.may_transmit must agree;
    • unreadable configs;
    • the plan's fields keeping their place (fails on the old launcher);
    • the controller's warning.

    The full suite passes apart from the 5 potfile-import tests in test_web.py that fail locally on main too (local werkzeug).

  • Nothing real: no secrets, no personal information, no real data.

  • Consent gates intact. Untouched; this narrows what an agent window may do.

  • Docs updated in the same PR — config-reference.md, agent-setup.md, agent-interface.md, GUIDE_MD and CLAUDE.md.

  • Commit messages are short and imperative.

Release impact

  • App-layer-safe — capture-launch.sh is in the engine's LIB_SCRIPTS; the rest is the kestrel_pi package, tests and docs. No shipped config default changes.
  • Reflash-class

Notes for review

What operators will notice:

  • An agent driving an autohunt or band-sweep scan now keeps the dwell its plan names, where it used to run the 5 s default.
  • A device whose transmit_modes holds a value Kestrel can't read now runs passive and says so in the agent log.

🤖 Generated with Claude Code

## What this PR does `[agent.action] transmit_modes` is now applied the same way by the agent and by the capture launcher. An agent window transmits only when the setting is left out (the default allows both modes) or names `"active"`. **Agent (`agent/explore.py`)** - Strings are compared without case or surrounding spaces. A lone string reads as a one-entry list. - An empty list, a misspelling or another kind of value means passive only. - Each list now stands on its own. A `postures` or `dwell_buckets` that names nothing known keeps the baseline's posture or dwell, while the other lists still apply. - The agent logs a warning at start-up naming any `[agent.action]` setting it couldn't read. **Launcher (`capture-launch.sh`, root)** - `agent_may_transmit` reads `transmit_modes` from `config.toml` with the same rule, so the launcher adds `--notransmit` to an agent window the setting doesn't allow, whatever the plan file says. - Only a plan whose `transmit` is exactly `active` transmits. - The plan's fields are now split on a separator that isn't white space, so an empty `band` or `channels` field no longer shifts `transmit` and `dwell` out of place. Control characters in the fields are dropped. - `--notransmit` from `capture.angryoxide.extra_args` is no longer added a second time when the plan already added it. ## Checklist - [ ] **Lint passes** — the Lint workflow runs this on the PR (shellcheck isn't installed on the machine this was written on; `bash -n` and the real-data check pass). - [x] **Tests pass** — new tests: - transmit-mode cases for the agent; - a table of cases on which the launcher and `explore.may_transmit` must agree; - unreadable configs; - the plan's fields keeping their place (fails on the old launcher); - the controller's warning. The full suite passes apart from the 5 potfile-import tests in `test_web.py` that fail locally on main too (local werkzeug). - [x] **Nothing real: no secrets, no personal information, no real data.** - [x] **Consent gates intact.** Untouched; this narrows what an agent window may do. - [x] **Docs updated in the same PR** — `config-reference.md`, `agent-setup.md`, `agent-interface.md`, `GUIDE_MD` and CLAUDE.md. - [x] Commit messages are short and imperative. ## Release impact - [x] **App-layer-safe** — `capture-launch.sh` is in the engine's `LIB_SCRIPTS`; the rest is the `kestrel_pi` package, tests and docs. No shipped config default changes. - [ ] **Reflash-class** ## Notes for review What operators will notice: - An agent driving an autohunt or band-sweep scan now keeps the dwell its plan names, where it used to run the 5 s default. - A device whose `transmit_modes` holds a value Kestrel can't read now runs passive and says so in the agent log. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Enforce the agent's transmit modes in the agent and the launcher
All checks were successful
Lint / lint (pull_request) Successful in 31s
Test / test (pull_request) Successful in 58s
Lint / lint (push) Successful in 29s
Test / test (push) Successful in 53s
1ba686b9c4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aluminum-ice deleted branch enforce-transmit-modes 2026-11-16 07:16:11 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aluminum-ice/kestrel!199
No description provided.