Skip to content

fix(server-args): keep +custom_ops JSON valid across variant composition - #1315

Open
hmahmad26 wants to merge 1 commit into
AMD-AGI:mainfrom
hmahmad26:fix/server-args-plus-sign-json
Open

fix(server-args): keep +custom_ops JSON valid across variant composition#1315
hmahmad26 wants to merge 1 commit into
AMD-AGI:mainfrom
hmahmad26:fix/server-args-plus-sign-json

Conversation

@hmahmad26

Copy link
Copy Markdown

Summary

  • Variant composition ran every server-arg string through POSIX shlex.split, which stripped inner JSON quotes from --compilation-config.
  • The bareword repair then failed on vLLM custom-op toggles such as +fused_rms_norm_gated (+ was outside the charset), so variants died at argv parse with Invalid JSON: key must be a string while baseline (which does not go through compose_server_args) stayed valid.
  • Tokenize quote-preservingly in remove_server_args, accept an optional leading +/- on JSON barewords, and log if composition still damages a JSON flag.

Test plan

  • Round-trip checks: +fused_rms_norm_gated survives remove_server_args / compose_server_args in append, replace, and flag-removal modes
  • Plain 'kimi_k3' wrappers are stripped so Magpie does not see them on argv
  • CI: test_sign_prefixed_custom_op_survives_removal, test_compose_preserves_json_for_every_args_mode, test_shell_quoted_plain_operand_loses_its_wrappers

Made with Cursor

POSIX shlex.split stripped quotes from --compilation-config, and the
bareword repair could not re-quote +fused_rms_norm_gated, so every
variant died at vLLM argv parse. Tokenize quote-preservingly and accept
an optional leading + or - on JSON barewords.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hmahmad26
hmahmad26 requested a review from a team as a code owner August 27, 2026 22:33
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.

2 participants