aethersdr / aethersdr/AetherSDR

AutomationBridge: registry-driven verbs to end the seven-way merge-conflict hotspot

Open
#4,174 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement GUI maintainer-review
Dominant language
C++
Stars
221
Forks
117
Avg merge
2d 7h
Merged PRs (30d)
299

Description

Problem

Nearly every bridge-touching PR in the 2026-07 cycle (#4100, #4102, #4116, #4121, #4122, #4124, #4131, #4137) conflicted in the same seven places, because the bridge uses centralized, ordered lists that every verb must append to:

  1. The verb banner string in AutomationServer::start() — also drifted three times this cycle (verbs missing from the banner had to be re-added in three separate PRs).
  2. handleLine's positional-parse if/else chain — every verb adds an else if arm at the same insertion point.
  3. The dispatch if-chain — same shape, same function.
  4. doGet's model chain + the "unknown model" error string that enumerates all models (rhi vs flags vs tracedebug collided repeatedly).
  5. tools/automation_probe.py: the argparse choices=[…] list, the rest help mega-string, and the elif chain — the worst offender, including silent bad merges (duplicate pan subcommand blocks after #4124's rebase; a value-vs-target wire-contract drift in #4116).
  6. docs/automation-bridge.md: the verb summary table + adjacent ### sections (two ### rightClick sections silently survived a merge in #4137).
  7. The .h handler-member/setter cluster + main.cpp wiring lines for stateful verbs.

Root cause: N verbs × M concurrent PRs all appending to shared lists in fixed order. Hand-maintained "list of all X" strings are simultaneously a conflict magnet and a drift-bug source.

Design

Phase 1 — verb registry spine (no behavior change):

  • A VerbSpec table: {name, aliases, argShape (enum or parse lambda), requiredFields, txGated, help, handler}. handleLine becomes: look up verb → apply its arg shape → validate required fields → dispatch. Every existing doVerb body survives untouched.
  • Derive every enumeration: the startup banner = join(registry.names()); unknown command / unknown model / unknown slice action error strings generated from the tables. Deletes the drift class and the conflict class in one move.
  • doGet gets the same treatment: model name → snapshot lambda map.
  • A read-only verbs introspection verb that dumps the registry (name, arg shape, help) for tooling.

Phase 2 — generic probe:

  • automation_probe.py drops choices, the help mega-string, and most of the elif chain: a generic probe <verb> [args…] passthrough plus a small mapping table for the few verbs needing custom arg handling (get, grab, clickAt). Optionally validates against the live verbs dump. Structurally ends "probe drifted from server."

Phase 3 — follow-ups:

  • Split verb registrations into family TUs (AutomationVerbs_Slice.cpp, AutomationVerbs_Layout.cpp, …) so a new verb is a new file — the same decomposition medicine docs/architecture/mainwindow-decomposition.md prescribes for MainWindow, for the same multi-agent-contributor reason.
  • tools/gen_bridge_docs.py --check: regenerate the docs summary table from the registry, fail CI on drift; plus a duplicate-heading lint for the silent-merge-dup class.
  • Consider GitHub merge queue: five armed PRs serially invalidated each other this cycle; a queue rebases+tests each automatically.

Phases 1–2 are one mechanical PR (in progress). — filed with Claude Code on behalf of KK7GWY

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with AutomationServer::start(), handleLine, and doGet to map the current verb and model chains, then inspect tools/automation_probe.py and docs/automation-bridge.md. Phase 1–2 is done when registry-derived enumerations and generic probing replace the duplicated lists without behavior changes, including the verbs introspection output.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
backend-api-design, documentation, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.