Skip to content

fix(cookbook): lossless launch-command preview round-trip (#5979) - #6310

Open
Spoofiecus wants to merge 1 commit into
odysseus-dev:devfrom
Spoofiecus:p4-slice3-5979
Open

Spoofiecus wants to merge 1 commit into
odysseus-dev:devfrom
Spoofiecus:p4-slice3-5979

Conversation

@Spoofiecus

@Spoofiecus Spoofiecus commented Sep 15, 2026

Copy link
Copy Markdown

Summary

The Serve-panel command pipeline corrupted quoted $(...) model-arg commands across display->launch cycles: multi-line previews kept their \ continuations inline (uncollapsed), and the tokenizer fused backslash+space into \ --host tokens, compounding each edit. The launched shell passed a space-prefixed --model word, which llama-server rejects with error: invalid argument: --model (issue #5979).
pr6310-serve-cmd-quoting

Target branch

  • This PR targets **dev**, not main. All PRs land in dev.

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)

Linked Issue

Fixes #5979

Checklist

  • I searched open issues and open PRs — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app (uvicorn app:app, native venv) and verified the change works; details in How to Test.

How to Test

./venv/bin/python -m pytest tests/test_cookbook_serve_cmd_js.py — 6 passed (Node-driven: clean round trip, stable collapse, mangled-input self-heal, quoted escapes/spaces using the issue's exact $(printf %s ... ) model path, MODEL_FILE prelude, env-first ordering).
node --check static/js/cookbookServe.js static/js/cookbook.js — clean.
./venv/bin/python -m pytest tests/test_cookbook_serve_cmd_js.py tests/test_cookbook_helpers.py tests/test_cookbook_stale_shim_recovery.py — 97 passed, 1 skipped.
Rule 08: curl-served MD5 matches disk for cookbookServe.js + cookbook.js.
Live: dev :7001 serves the new bytes (healthy); original :7000 untouched.
Pre-existing 4-test baseline failures are the workspace baseline (rule 30), unrelated to this diff.

Scope is the editor/launch formatter only; no runner, API, backend arg-parsing, or mobile-sheet change. The PR that wraps this phase also carries the cache-buster bumps for the two touched JS files (rule 07).

Visual / UI changes

  • Screenshot or short clip of the change in the running app, attached below.
  • Style match: reuses existing cookbook panel styling; no new colors, fonts, spacing, or component patterns.
  • No new component patterns. Extends the existing serve-panel command box.
  • I am not an LLM agent submitting a bulk PR. Scoped single-issue fix for Invalid argument --model when trying to serve a model #5979 with tests and live verification.

Screenshots / clips

pr6310-serve-cmd-quoting

@github-actions github-actions Bot added needs work PR description incomplete — please update before review needs runtime validation Runtime validation not attested — tick the app-run box after running it, or state the gap needs visual evidence UI-sensitive change without an attested screenshot or clip from the running app labels Sep 15, 2026
@Spoofiecus Spoofiecus changed the title P4 slice3 5979 fix(cookbook): lossless launch-command preview round-trip (#5979) Sep 15, 2026
@github-actions github-actions Bot removed needs work PR description incomplete — please update before review needs runtime validation Runtime validation not attested — tick the app-run box after running it, or state the gap labels Sep 15, 2026
@Spoofiecus

Copy link
Copy Markdown
Author
pr6310-serve-cmd-quoting

@github-actions github-actions Bot added ready for review Description complete — ready for maintainer review and removed needs visual evidence UI-sensitive change without an attested screenshot or clip from the running app labels Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid argument --model when trying to serve a model

1 participant