Skip to content

fix(install): honor --clients and reject unrecognized flags - #1769

Closed
bmcnaboe wants to merge 1 commit into
DeusData:mainfrom
bmcnaboe:fix/install-clients-passthrough
Closed

fix(install): honor --clients and reject unrecognized flags#1769
bmcnaboe wants to merge 1 commit into
DeusData:mainfrom
bmcnaboe:fix/install-clients-passthrough

Conversation

@bmcnaboe

Copy link
Copy Markdown

install.sh silently discarded any flag it did not recognize, so --clients=claude,codex was dropped and every detected client got configured.

Replace the two lenient parse loops with one strict parser: known flags only (--dir/--dir=/--clients=/--skip-config/--help); an unrecognized flag is an error (exit 2); and --clients is passed through to the binary installer, which honors the = form and validates the list. --skip-config behavior is unchanged. shellcheck clean. Opened as a draft.

Fixes #1753

install.sh silently discarded any flag it did not recognize, so
--clients=claude,codex was dropped and every detected client was
configured. Replace the two lenient parse loops with one strict parser:
known flags only (--dir/--dir=/--clients=/--skip-config/--help); an
unrecognized flag is an error (exit 2); and --clients is passed through
to the binary installer, which honors the = form and validates the list.
--skip-config behavior is unchanged.

Fixes DeusData#1753

Signed-off-by: Brian McNaboe <bmcnaboe@gmail.com>
@github-actions

Copy link
Copy Markdown

Thanks for opening this — it has been seen, and it is queued.

This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence.

Current review status: working through a backlog. 0.9.1-rc.1 is out, so the release freeze that held reviews is over — but it left a large queue of open pull requests behind it, and we are reading through them oldest-first. The background is in discussion #1144.

What that means for this PR, concretely:

  • It will not be closed for inactivity. No stale bot touches pull requests here.
  • It may still sit a while before a human reads it. That is on us, not on you.
  • Older PRs are read first, so a recent one is not being skipped — it is behind a queue.

Things that will genuinely speed it up whenever review does happen:

  • Keep it rebased on main — the tree is moving quickly right now, and a conflicting branch cannot be reviewed as the diff you intended.
  • Get CI green, or say which failures you believe are pre-existing.
  • Keep the change to one claim. Bundled features and refactors get split before they get merged, which costs you a round trip.
  • Every commit needs a sign-off (git commit -s) — CI enforces DCO.

If this fixes a bug, a reproduction we can run is worth more than a description of the symptom.

Thanks for contributing, and sorry in advance for the wait.

@bmcnaboe
bmcnaboe marked this pull request as ready for review August 24, 2026 19:54
@bmcnaboe
bmcnaboe requested a review from DeusData as a code owner August 24, 2026 19:54
pull Bot pushed a commit to Mu-L/codebase-memory-mcp that referenced this pull request Sep 1, 2026
The gate waited 90 x 30s = 45 min for CodeQL to finish on the PR head. That
is shorter than CodeQL actually takes on this repository, so the gate has
been failing runs that had not failed.

Measured on PR DeusData#1426, head 7b72652: the CodeQL SAST workflow completed with
conclusion=success at 17:46:05, having started at 15:41:44 -- 124 minutes.
The gate step ran 16:52:58 to 17:38:44 and reported "BLOCKED: CodeQL timeout"
7 minutes and 21 seconds before the scan it was waiting for succeeded.

Two open contributor pull requests are red from exactly this: DeusData#1426 and
DeusData#1769, both with CodeQL completed=success on their head and every other
check green.

Three further PRs (DeusData#1703, DeusData#1741, DeusData#1742) are also red on codeql-gate alone,
but from a different cause: the CodeQL run on their head is
completed=cancelled, so the gate saw a non-success conclusion and correctly
exited 1 without waiting. This change does not help those and is not
intended to; they need a fresh scan, most likely having been superseded by
concurrency cancel-in-progress in codeql.yml.

300 x 30s = 150 min covers the measured 124 min with margin. The job already
declares timeout-minutes: 240, so the wait still cannot outlive its own job.
No trigger, permission or gating change: codeql-gate blocks exactly what it
blocked before, and a genuine CodeQL failure still exits 1 immediately rather
than waiting out the budget. Only the absence of a verdict waits longer.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
@DeusData DeusData added bug Something isn't working editor/integration Editor compatibility and CLI integration ux/behavior Display bugs, docs, adoption UX priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker. labels Sep 1, 2026
@DeusData

DeusData commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Thank you for keeping the installer fix focused on strict flag parsing and correct --clients forwarding while preserving --skip-config. The contribution queue is quite full, so review may take a little time. We have the PR routed and will return with grounded feedback as soon as possible.

@DeusData

DeusData commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Closing this because the fix has landed — but you were first, and you were not credited. I want to say that plainly before anything else.

You opened this on 20 August. It sat unreviewed, and on 27 August I committed 902f85b0 ("fix(install): forward clients selector") under my own name, fixing the same defect you reported in #1753. Seven days, no credit, no comment here. That is the second time today I have found this pattern in my own queue, and it is a failure of my review process, not a coincidence.

What is on main now

The parser was rewritten as a while [ "$#" -gt 0 ] loop with proper shift consumption, CLIENTS_SET/CLIENTS are threaded through to INSTALL_ARGS, and unknown options exit 2. So your diagnosis — "install.sh silently discarded any flag it did not recognize, so --clients=claude,codex was dropped" — is exactly what got fixed, and your strictness principle is what shipped.

I looked hard for something in your version worth keeping on top, and in fairness to you I should report what I found, because the current code is ahead on four specific points:

  1. --dir value validation. main refuses a value that starts with -:

    if [ "$#" -lt 2 ] || [[ "$2" == -* ]]; then

    Your expect_dir flag has no such guard, so install.sh --dir --skip-config would set INSTALL_DIR="--skip-config" and install into a directory of that name.

  2. --clients and --skip-config are independent on main — two separate if blocks. Yours uses elif, so passing both silently drops --clients. That is the same bug class this PR set out to kill, which is worth knowing precisely because it is so easy to reintroduce.

  3. CLIENTS_SET distinguishes "not passed" from "passed empty", which -n "$CLIENTS" cannot.

  4. -* and bare * get separate messages — "unknown option" vs "unexpected argument".

None of that is a criticism of a patch written in August against August's code. It is the reason I am closing rather than asking you to rebase: there is genuinely nothing left for this diff to add, and asking you to rework it to match would be wasting more of your time on top of the week it already sat.

What I owe you

I cannot retroactively add a trailer to a commit already on main without rewriting public history, which I will not do. So the credit is here, in the record: the --clients selector is honoured by install.sh today because @bmcnaboe reported it in #1753 and fixed it in #1769 on 20 August. If you would like me to note it in the release notes for the version that carries it, say the word and I will.

Thank you for this, and I am sorry it went the way it did. Your #1767 is a genuinely good piece of work and I have reviewed it properly today.

@DeusData DeusData closed this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working editor/integration Editor compatibility and CLI integration priority/high Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker. ux/behavior Display bugs, docs, adoption UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install.sh silently drops --clients and configures every detected client

2 participants