GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [RFC] Add structured memory management to the automation bridge and MCP · Issue #7633 · aethersdr/AetherSDR

[RFC] Add structured memory management to the automation bridge and MCP #7633

New issue
Copy link
New issue
Copy link
Backlog
Backlog
[RFC] Add structured memory management to the automation bridge and MCP#7633
Copy link
Labels
RFC ApprovedRFC accepted by maintainers — approved for implementationenhancementImprovement to existing featuremaintainer-reviewRequires maintainer review before any action is takenprotocolSmartSDR protocolrfc

Description

@jensenpat
jensenpat
opened on Nov 28, 2026
Issue body actions

Preflight

  • Read GOVERNANCE.md.
  • Searched for an existing RFC covering this external interface. Related internal work is aetherd: migrate profiles and memories to typed controls #6428.
  • No PR opened for this proposal.

Problem

The automation bridge can recall an existing memory by index, but it cannot list the bank, read an entry, or manage saved channels as data. Today an agent like ChatGPT Dot or Grok Bot that wants to add a few repeater or airband memories has to drive the GUI or a file dialog. It also cannot reliably check which channels already exist, which store it is writing to, or whether a write persisted.

I want an agent to be able to read a group, add missing channels with explicit settings, and verify the result without tuning through them or changing the active slice.

Proposal

Expose the same typed memory operations through the local bridge and MCP. The names below are illustrative; keep the existing memory activate <index> [panId] behavior compatible.

Operation Contract
memory.list / memory.get Return structured entries, store identity and capabilities, and an opaque entry ID and revision. Support group and frequency filters on list; identify stale or incomplete snapshots.
memory.create Accept explicit fields: name, group/profile, RX frequency in Hz, mode, and supported fields such as duplex, offset, tone, and filter. Allocate a new entry without overwriting. Return its ID and confirmed values.
memory.update Patch only the supplied fields. Require the store-scoped ID and expected revision. Refuse a stale revision instead of silently overwriting a newer edit.
memory.delete Require the same ID and expected revision. Verify that the intended entry is absent. Never select a deletion target by name or frequency alone.
memory.activate Keep recall separate from data writes. A create, update, or delete must not retune the slice or key the radio.

Store ownership and write safety

  • Reuse the GUI's typed memory path and backend capabilities; don't add a second set of Flex wire commands or a raw radio-command escape hatch. The typed desktop migration in aetherd: migrate profiles and memories to typed controls #6428 is related groundwork. This RFC is about exposing a supported external interface, not duplicating that migration.
  • Report the destination explicitly: Flex radio-owned memory or AetherSDR's shared local bank. Synced Icom entries are local copies here; this proposal does not write back to Icom hardware.
  • Bind writes to the original store and session/generation. Validate that target when dispatching and when processing replies. If the target changes, stop; do not redirect the write or its cleanup to the next radio. Refuse unsupported fields or read-only writes before making changes.
  • Use an idempotency key or equivalent reconciliation for create. If a reply is lost, do not blindly allocate another entry. Return a distinct unverified outcome when confirmation is missing, and require reconciliation against the original store before retrying. Success requires authoritative readback for radio-owned entries or verified persistence for the local bank, not merely an accepted request.

Cross-platform impact

Same contract and validation on macOS, Linux, and Windows. Use the existing bridge/MCP transports and authorization, including read-only mode. No native file dialogs, new dependencies, or changes to transmit authority. No new TCI verbs.

Alternatives considered

  • GUI automation: Useful for exercising the UI, but a fragile way to select a store, resolve a channel, or verify a write.
  • Save from active slice only: Handy as a later shortcut, but it requires tuning through each frequency and makes the saved settings depend on the current slice. Explicit fields are the better first API.
  • Bulk CSV first: Defer to a later preview/apply flow. The single-entry contract should be safe and testable first.

Implementation scope and acceptance

  • Socket-free tests through the production memory service: create into a new entry, read-after-write, patch without modifying unrelated fields, stale-revision refusal, verified deletion, and preservation of existing recall behavior.
  • Make the session-switch regression the first negative test: hold a write or reply for store A, switch to B, release it, then assert no write or cleanup reaches B and the late reply cannot complete B's operation. Cover lost create replies without duplicate entries and local persistence failures without false success.
  • Exercise the bridge and MCP against an isolated Demo/local bank. Verify a Flex radio-owned round trip separately in RX on a disposable test entry, with no PTT, and report which backend was actually tested.

Activity

  1. jensenpat
    added
    rfc
    on Nov 28, 2026
  2. aethersdr-agent
    added
    claude-activeAetherClaude is actively working on this issue
    enhancementImprovement to existing feature
    maintainer-reviewRequires maintainer review before any action is taken
    protocolSmartSDR protocol
    on Nov 28, 2026
  3. aethersdr-agent commented on Nov 28, 2026

    @aethersdr-agent
    aethersdr-agentBot
    on Nov 28, 2026 – with AetherSDR-Agent
    Contributor
    More actions

    Triage (AetherClaude): this is a well-scoped RFC, and most of the store-ownership groundwork it asks for is already in the tree. Routing to the maintainer for a decision on the external contract.

    Current state (main @ 859044e)

    • The bridge only recalls. src/core/AutomationServer.cpp:3611 registers memory activate <index> [panId] and nothing else. doMemory() (~L9399) refuses any other action. docs/automation-bridge.md (the ### memory section) says list/save/remove "still require driving the GUI". tools/aether_mcp.py has no memory tool apart from memory_profile, which is process RAM telemetry and unrelated.
    • The typed memory path the RFC wants to reuse already exists. aetherd: migrate profiles and memories to typed controls #6428's work landed as refactor(aetherd): move profile and memory controls below the radio seam. Principle II. #6430 (9dfe8f666, "move profile and memory controls below the radio seam"):
      • MemoryRequest (src/core/backends/MemoryRequest.h:102) has the Create/Update/Remove/Recall actions and an expectedRevision field.
      • RadioModel::requestMemory() (RadioModel.h:1320) takes an expectedSession fence. RadioModel::createMemory() (RadioModel_StoredControls.cpp:202) does the work for both stores:
        • It refuses when the original session has ended, both at dispatch and again in the reply (current() fence, L239-246).
        • It answers Cancelled if the store switched between local and radio.
        • It refuses a returned id that already exists, or a slot that was retired in the meantime (L250-258).
        • On the local bank it goes through LocalMemoryBank::createEntry/updateEntry/removeEntry.
      • memorySlotRevision(index) (RadioModel.h:1392) is a per-slot counter. It is cleared on session change (RadioModel.cpp:8876, 9725), so it already acts as an opaque, session-scoped revision.

    So the "session-switch regression" and "stale revision" requirements mostly come down to exposing and testing fences that already exist, not designing new ones. That supports the RFC's statement that no second set of Flex wire commands is needed.

    What actually needs building

    1. Bridge verbs in AutomationServer (memory list|get|create|update|delete, keeping activate unchanged), plus MCP wrappers in tools/aether_mcp.py.

      • create/update/delete must be classified as mutating in isReadOnlyRequest() (L2894) so read-only mode refuses them.
      • Read-only mode should still allow list/get.
    2. Async replies. Bridge handlers return a QJsonObject synchronously. Flex create, populate and remove only finish when the radio replies (status readback). The contract needs one of two shapes:

      • a deferred reply on the socket, or
      • an operation id that the agent polls until it reaches confirmed | refused | cancelled | unverified.

      The RFC's "distinct unverified outcome" fits the second shape. The current slice add documentation, "async; re-poll", is weaker than what this RFC asks for.

    3. Entry identity. The opaque ID should be {store identity, session generation, index}. For Flex that means radio serial plus control session. For the local bank it means the bank file and its generation. Combine that ID with memorySlotRevision.

      • Per [[icom-identity-is-address]] precedent, synced Icom rows are local-bank copies, as the RFC already says.
      • Flex memory carries no antenna or XVTR field, so capabilities must not advertise those fields for Flex.
    4. Lost create replies. This is the one real design gap. Flex memory create has no idempotency key: it returns a new index, and the client then populates the slot with set commands. If the reply is lost, the radio may hold an empty or partly populated slot.

      • Reconciliation can only compare the radio's memory list from before and after the create, by index set and then by contents.
      • I recommend that create return unverified with the candidate index (or none), and that the agent then call list against the same store before retrying. The bridge should not guess.
      • The local bank can promise verified persistence only after LocalMemoryBank::flush() succeeds. saveFailed must map to failure, not success.
    5. Tests. Socket-free tests through RadioModel with the existing fixture backends, as the acceptance section lists. The first should be the A→B session-switch negative test. Bridge tests can then run against the Demo/local bank.

    Questions for the maintainer

    • Do you accept a new external bridge/MCP write surface for memories, and should it go through the RFC process under GOVERNANCE as filed?
    • Which reply model do you prefer for async writes: deferred socket reply, or an operation id plus polling?
    • Should create on Flex promise only unverified when the reply is lost (no automatic cleanup of a possibly orphaned slot), as proposed above?

    No transmit, TCI or dependency impact. Every write is RX/config only, and create, update and delete must not retune the slice. That matches the RFC's separation from activate.


    🤖 aethersdr-agent · cost: $0.5058 · model: claude-opus-5-5


    📍 Citation health check (Foundry Constitution Principle I): 2 resolved, 4 unresolved against /Users/aetherclaude/workspace/AetherSDR at origin/main.

    Unresolved citations (4)
    Citation Reason
    RadioModel.cpp:8876 file not found in workspace
    RadioModel.h:1320 file not found in workspace
    RadioModel.h:1392 file not found in workspace
    RadioModel_StoredControls.cpp:202 file not found in workspace
  4. aethersdr-agent
    added
    awaiting-responseWaiting for reporter to provide additional information
    and removed
    claude-activeAetherClaude is actively working on this issue
    awaiting-responseWaiting for reporter to provide additional information
    on Nov 28, 2026
  5. jensenpat commented on Nov 28, 2026

    @jensenpat
    jensenpat
    on Nov 28, 2026
    CollaboratorAuthor
    More actions

    add agent-driven CHIRP CSV export workflow for baofengs (memory.export)

  6. ten9876 commented on Nov 28, 2026

    @ten9876
    ten9876
    on Nov 28, 2026
    Collaborator
    More actions

    Maintainer ruling (@ten9876): approved, with the conditions below for the PR.

    I checked the triage against main (859044e) and it holds. The bridge registers only memory activate (AutomationServer.cpp:3611). The typed path from #6430 already carries what this RFC asks for:

    • MemoryRequest with expectedRevision;
    • RadioModel::requestMemory() / createMemory(), which answer Cancelled when the original session or store ends, both at dispatch and on the reply;
    • memorySlotRevision(), cleared on session change.

    Most of the safety work is exposing and testing those fences, not inventing new ones.

    Approved as proposed:

    • Bridge verbs memory list|get|create|update|delete and matching MCP tools. memory activate <index> [panId] stays exactly as it is.
    • They go through the GUI's typed memory path and backend capabilities only. There are no new Flex wire commands and no raw command escape hatch.
    • Every result names its store: Flex radio-owned memory or AetherSDR's local bank. Synced Icom rows are local-bank copies and are never written back to the radio.
    • Create, update and delete never retune a slice, change the active slice or key the radio.

    Conditions:

    1. Observe-only. list and get are read-only. create, update, delete and export are mutating in isReadOnlyRequest() and are refused on an observe-only bridge with the same error as other mutating verbs.
    2. Entry identity. The opaque ID binds store identity, session generation and index: the radio serial plus control session for Flex, the bank plus its generation for the local bank. revision comes from memorySlotRevision(). A write whose store or session no longer matches is refused or cancelled. It is never redirected to the next radio, and neither is its cleanup.
    3. Async replies: deferred socket reply. A write holds its reply until the outcome is confirmed, refused or cancelled. Use the existing _deferred mechanism that connect wait already uses; there is no operation table. A bounded timeout returns unverified. confirmed means authoritative readback for radio-owned entries, and a successful LocalMemoryBank::flush() for the local bank. saveFailed maps to failure, never success.
    4. Lost create replies. Report unverified with the candidate index if there is one. The bridge never deletes a possibly orphaned slot. The agent must memory list the same store before retrying, and the docs say so.
    5. Capabilities. Advertise only the fields the store supports. Flex memories have no antenna or XVTR field. An unsupported field, or a write to a read-only store, is refused before anything changes.
    6. CHIRP CSV export (Pat's addition): a bridge verb, memory export chirp <path>. It lands after the core verbs, in a separate PR under this RFC.
      • It is mutating because it writes a file. It requires an absolute path, writes atomically through QSaveFile, and refuses to replace an existing file unless the caller passes overwrite.
      • It reads from one complete store snapshot and refuses a stale or incomplete one.
      • It reports the rows written. Each field with no CHIRP equivalent is listed per entry, not silently dropped.
      • The column layout cites CHIRP's own CSV format in the PR body.
    7. Shared convention with [RFC] Expose Net Reminder scheduling and navigation through MCP #7634. Use the bridge verbs memory <action> and MCP tools memory_*, an opaque revision, and one set of outcome and error names: confirmed, refused, cancelled, unverified, stale_revision, not_found, persist_failed. Whichever of the two PRs lands first sets the convention, and the second follows it.

    Acceptance: the RFC's list stands as written.

    • The first test is the session-switch negative test: hold a write for store A, switch to B, release it, and assert that nothing reaches B and the late reply can't complete B's operation.
    • Then lost-create without a duplicate, local persistence failure without false success, stale-revision refusal, patching without touching unrelated fields, verified delete, and unchanged activate. All are socket-free through RadioModel with the existing fixture backends.
    • Bridge and MCP runs use an isolated Demo or local bank. The Flex round trip uses a disposable entry in RX with no PTT, and the PR names the backend actually tested.
    • Bridge transport tests follow the existing notify and exit-77 rules. docs/automation-bridge.md replaces the "still require driving the GUI" line with the new verbs.

    Thanks @jensenpat.

  7. ten9876
    added
    RFC ApprovedRFC accepted by maintainers — approved for implementation
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFC ApprovedRFC accepted by maintainers — approved for implementationenhancementImprovement to existing featuremaintainer-reviewRequires maintainer review before any action is takenprotocolSmartSDR protocolrfc

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.