Skip to content

fix(psmux): refuse -X=value, -t... and -- option values psmux 3.4.0 cannot carry - #908

Merged
pbean merged 2 commits into
bmad-code-org:mainfrom
dracic:fix/905-transportable-dash-shapes
Oct 14, 2026
Merged

pbean merged 2 commits into
bmad-code-org:mainfrom
dracic:fix/905-transportable-dash-shapes

Conversation

@dracic

@dracic dracic commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

psmux 3.4.0's client argv normalizers rewrite a few dash-leading option values before set-option parses them (psmux/psmux#795). #900 retired _transportable's blanket refusal of dash-leading values, so these shapes reached psmux:

  • -X=value (one ASCII letter, then =, then at least one character) is stored as -X value, with rc 0 and no warning. This is the silent case the gate exists to prevent.
  • -t… and -- are refused with rc 1. On the session path that raised partway through the write and left the previous value in place.

Change

_transportable refuses exactly those shapes:

  • a value matching -[A-Za-z]=.;
  • a value starting with -t;
  • the value --.

A refused value takes the gate's existing visible path: a warning on stderr, and the key freed. Every other dash-leading value stays admitted. The measured safe controls are -u, -1=x, --x=y and -x=, so the retirement in #900 keeps its effect for them.

Tests

  • tests/test_psmux_backend.py covers the refused shapes and the admitted controls through the gate.
  • tests/test_psmux_live.py adds a test_premise_* tripwire. It pins the (rc, readback) pair of each shape on the installed psmux and turns red when a psmux release stores -x=foo verbatim, so the refusal can retire behind a floor bump. It was ablated to fail against a fake that stores verbatim.
  • Results:
    • Windows, the touched unit files: 281 passed.
    • Live rows (the new tripwire and test_adopted_a_dash_leading_option_value_is_stored), from PowerShell 7 with SHELL unset on psmux 3.4.0: 4 passed.
    • WSL: 727 passed.
    • Portability guard: 446 passed.

Closes #905

Summary by CodeRabbit

  • Bug Fixes
    • Values shaped like psmux flags, including -X=value, -t…, and --, are now recognized as values psmux may rewrite or reject. They are warned about rather than treated as reliably transportable, and the associated option keys are freed.
    • Other dash-prefixed values that psmux handles correctly remain accepted.

@dracic

dracic commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T22:40:35.268481Z 7b73024 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 7 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e84b6de0-0fc2-40ba-9eb8-5556b9c2ccdc
📥 Commits

Reviewing files that changed from the base of the PR and between 35de7a7 and 6422962.

📒 Files selected for processing: 5
  • CHANGELOG.md
  • docs/multiplexer-backends.md
  • src/bmad_loop/adapters/psmux_backend.py
  • tests/test_psmux_backend.py
  • tests/test_psmux_live.py

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: efe7b3de-b421-402e-ad3e-4b55094f459b
📥 Commits

Reviewing files that changed from the base of the PR and between 71ee261 and 35de7a7.

📒 Files selected for processing: 4
  • CHANGELOG.md
  • src/bmad_loop/adapters/psmux_backend.py
  • tests/test_psmux_backend.py
  • tests/test_psmux_live.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

Walkthrough

The psmux backend now rejects option values that psmux 3.4.0 rewrites or rejects. Unit and live tests cover the rejected shapes and accepted dash-prefixed controls.

Changes

psmux option-value filtering

Layer / File(s) Summary
Reject altered option values
src/bmad_loop/adapters/psmux_backend.py, CHANGELOG.md
_transportable rejects --, values starting with -t, and -X= values with a nonempty suffix. The changelog records these psmux 3.4.0 behaviors.
Validate rejected and accepted values
tests/test_psmux_backend.py, tests/test_psmux_live.py
Unit tests cover rejected argv shapes and accepted dash-prefixed controls for window and session options. A live test checks write results and stored values for three argv-shaped inputs.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: pbean

Merge Risk: ⚪ Minimal · up to 35de7

This change makes the psmux backend refuse a few option-value shapes that psmux 3.4.0 mishandles, warning and freeing the key instead of storing a wrong value. The refusals are narrow and tested, so merge risk is minimal.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 3 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: rejecting option-value shapes that psmux 3.4.0 cannot carry.
Linked Issues check Passed Issue #905 is directly linked and remains open. The reviewed change adds _transportable refusals for -[A-Za-z]=. with a non-empty suffix, values starting with -t, and --. Existing transportabi…
Out of Scope Changes check Passed The changed backend code implements the workaround requested by #905. The unit tests verify refused and admitted argv shapes. The live tests verify the psmux premises and retirement signals. The chang…
Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 3 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks each dash-shaped string,
And guards the values psmux may bring.
Some keys are freed when flags interfere,
While safe controls still pass through clear.
The test burrow checks what was stored,
Then hops away, its work restored.

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 35de7a7e12

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dracic

dracic commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 7b73024c69

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…annot carry

psmux 3.4.0's client argv normalizers rewrite a few dash-leading values before
set-option parses them (psmux/psmux#795): -X=value becomes -X value at rc 0, and
-t... and -- are refused with rc 1, which left a stale value in place.
_transportable now refuses those shapes, so they take the existing visible
path: a warning, and the key freed. Every other dash-leading value stays
admitted. A live premise row turns red when a psmux release stores -x=foo
verbatim, so the refusal can retire behind a floor bump.

Closes bmad-code-org#905
The refused-values paragraph named only empty, quoted, multiline and
edge-whitespace values. It now also names the three dash-leading shapes
that psmux's client rewrites before parsing (-X=value, -t..., --), which take
the same warn-and-unset path.
@dracic
dracic force-pushed the fix/905-transportable-dash-shapes branch from 7b73024 to 6422962 Compare October 14, 2026 00:09
@pbean
pbean merged commit 4ee0fda into bmad-code-org:main Oct 14, 2026
17 checks passed
@dracic
dracic deleted the fix/905-transportable-dash-shapes branch October 14, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

psmux backend: _transportable admits -X=value option values, which psmux 3.4.0 silently stores as -X value (regression from the #900 retirement)

2 participants