retire _transportable's refusal of -X=value, -t... and -- once a psmux release carries the psmux/psmux#795 fix

Aperta
#914 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
12/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start with PsmuxMultiplexer._transportable in src/bmad_loop/adapters/psmux_backend.py, then the "Refused option values" section of docs/multiplexer-backends.md. The work depends on an upstream psmux release that does not exist yet, so it can't be finished until that release ships. Done means the version gate, the CI pin in ci.yml, the clause and doc sentence removal, a test_adopted_* row in tests/test_psmux_live.py that fails against a fake of the 3.4.0 behaviour, and a CHANGELOG entry.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

psmux fixed psmux/psmux#795 on master in 20ef00fb. Until then, its client argv normalizers rewrote option values shaped like flags: -x=foo was stored as -x foo, and -t… and a bare -- were refused. bmad-loop works around that in #908 (#905): _transportable refuses those three shapes, so they take the visible path (a warning, and the key freed) instead of being stored corrupted. As of 2026-10-14 no release carries the fix. The latest tag is v3.4.0, and git tag --contains 20ef00fb is empty.

What retires: the clause in PsmuxMultiplexer._transportable (src/bmad_loop/adapters/psmux_backend.py):

if value == "--" or value.startswith("-t") or re.match(r"-[A-Za-z]=.", value):
    return False

Also retire the sentence in docs/multiplexer-backends.md ("Refused option values") that names these three shapes.

What stays: every other _transportable rule (empty, a double quote, a line break, edge whitespace). Each one has its own reason in the docstring, and none of them depends on psmux/psmux#795.

The trigger

tests/test_psmux_live.py::test_premise_an_argv_flag_shaped_option_value_is_not_stored pins the 3.4.0 behaviour for each shape: -x=foo reads back -x foo at rc 0, and -t… and -- fail. It turns red on a psmux build that stores them verbatim. The weekly psmux-canary workflow runs the live gate against the latest psmux release, so that is where the red shows first.

How to retire it (not a plain deletion)

Retire it behind the version gate, as #900 did for psmux/psmux#583:

  1. Move _LAST_UNSUPPORTED to the last release without 20ef00fb (the gate is exclusive), and move the CI gate's pin (ci.yml, version:) to the first release that has it.
  2. Delete the clause and its doc sentence.
  3. Turn the premise row into an ordinary-direction test_adopted_* row: the three shapes are stored verbatim. Show that it fails against a fake of the 3.4.0 behaviour.
  4. Add a CHANGELOG entry: an upgrade item for the floor, plus Removed for the refusal.

On any admitted build below the fix, removing the clause brings back silent corruption of a -X=value option value. A tag that reads back differently makes a window silently unprunable.

Checked: bmad-loop is not exposed to the rest of psmux/psmux#795

While fixing it, the maintainer found the same corruption in rename-session, set-buffer, new-window -n and display -p. bmad-loop never passes those commands a value starting with -:

  • session names are bmad-loop-<run id> and bmad-loop-ctl;
  • window names are run, sweep and control-window names that start with a letter;
  • it does not use set-buffer or rename-session;
  • its display-message -p calls pass only format strings that start with #{.

So _transportable remains the only workaround to retire.

Refs #905, #908

Lingua principale
Python
Stelle
196
Fork
78
Merge medio
9h 24m
PR unite (30g)
44

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bmad-code-org/bmad-loop

Tutte le issue di bmad-code-org/bmad-loop

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.