Skip to content

fix(launchers): kimi-pmoves and kilo-pmoves start the CLI they are named for - #3325

Merged
POWERFULMOVES merged 10 commits into
mainfrom
fix/kimi-kilo-launchers
Nov 19, 2026
Merged

POWERFULMOVES merged 10 commits into
mainfrom
fix/kimi-kilo-launchers

Conversation

@POWERFULMOVES

@POWERFULMOVES POWERFULMOVES commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Problem

On a Linux node with current CLIs, both launchers failed or ran the wrong program:

  • kimi-pmoves passed --config-file / --mcp-config-file. Those flags exist only in the legacy Python kimi-cli. Kimi Code (>= 2.x, which installs as kimi) exits with error: unknown option '--config-file' before any session starts. make -C pmoves kimi had the same flags inline.
  • kilo-pmoves ran opencode --config pmoves/configs/claws/opencode-<node>.json:
    • It started the wrong program. opencode does not read kilo.json.
    • Neither opencode nor kilo has a --config flag, so the flag was silently ignored.
    • The claws files use the Claude-style mcpServers key. opencode rejects that with Unrecognized key: mcpServers when the file is supplied via OPENCODE_CONFIG.
    • $1 was always taken as the node name and defaulted to 5090 on every node, so kilo-pmoves --version failed with Config not found: .../opencode---version.json.
  • Neither launcher changed directory. Kimi Code and kilo find their project layer (.mcp.json, kilo.json, AGENTS.md) and key "continue last session" by cwd. A launch from a sibling checkout therefore ran against that checkout's files.

Change

  • Both launchers bind the session to their own checkout, inline (no extra script). If the caller's cwd is outside the checkout, the launcher moves into the checkout root and logs it. A cwd inside the checkout, including .claude/worktrees/*, is kept. PMOVES_LAUNCH_KEEP_CWD=1 opts out.
  • kimi-pmoves.sh asks kimi --help whether --config-file exists:
    • Kimi Code: gets the args unchanged, plus a line saying where its config really comes from (~/.kimi-code/{config.toml,mcp.json} and <repo>/.mcp.json).
    • Legacy kimi-cli: keeps the old .kimi/ flags.
  • kilo-pmoves.sh runs kilo (falling back to kilocode) with args passed through unchanged. A leading node name that matches a claws file is still accepted and dropped, with a notice, so old invocations keep working.
  • SPARK-KIMI identity from the roster. On spark, kimi-pmoves launched unbound (no identity is declared for harness 'kimi'), although the roster already names SPARK-KIMI (spark-kimi in identity_vocabulary.yaml). This PR:
    • adds kimi_spark to agent_registry.yaml, shaped like kimi_knuckles, with affinity spark;
    • adds spark.default_identity.kimi: kimi_spark to node-vocabulary.yaml;
    • adds the kimi_spark spelling to the roster entry and to the orchestration team.
      The launcher now reports identity=kimi_spark. No cipher_agent_id is declared, because no signing card is minted for spark-kimi.
  • deploy/provision was regenerated with pmoves_launcher_generator.py, which adds the registry-driven kimi-pmoves-spark pin (claude already has per-node pins).
  • Makefile: kimi delegates to kimi-pmoves.sh, and kilo-pmoves no longer forces 5090.
  • pmoves/tests/scripts/test_kimi_kilo_launchers.py runs each launcher from outside the repo with stub CLIs on PATH and asserts on the argv and cwd the stub saw.

Not in this PR

  • .kimi/mcp.json is not wired into Kimi Code. Kimi Code has no MCP-file flag and does not expand ${VAR} in headers (it uses bearerTokenEnvVar), so that needs a converter, not a flag.
  • The claws opencode-*.json files are left as-is.

Test

python3 -m pytest pmoves/tests/scripts/test_kimi_kilo_launchers.py pmoves/tests/scripts/test_launcher_carry_parity.py plus the identity, registry and launcher-generator suites give 242 passed, 2 skipped. A live --version probe of both launchers against the real CLIs prints the version and exits 0.

🤖 Generated with Claude Code

Agent Zero and others added 2 commits October 9, 2026 19:41
… kimi through kimi-pmoves

Adds pm-launch-cwd.sh, a shared fragment that moves a launcher's process into
its own checkout when the caller's cwd is outside it. Kimi Code and kilo find
their project layer (.mcp.json, kilo.json, AGENTS.md) and key session history
by cwd, so a launch from a sibling checkout ran against that checkout's files.
PMOVES_LAUNCH_KEEP_CWD=1 opts out.

`make kimi` passed --config-file/--mcp-config-file directly, which Kimi Code
rejects; it now delegates to scripts/kimi-pmoves.sh. `make kilo-pmoves` no
longer forces node 5090.

Adds stub-CLI tests for both launchers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ed for

kimi-pmoves: Kimi Code (>= 2.x) has no --config-file/--mcp-config-file and
exits "unknown option" before any session. The launcher now asks `kimi --help`
which program it has: Kimi Code gets the args untouched (and a line saying its
config comes from KIMI_CODE_HOME + <repo>/.mcp.json); legacy kimi-cli keeps
the .kimi/ flags.

kilo-pmoves: exec'd `opencode --config <claws file>` -- the wrong program, a
flag neither program has, and a file opencode rejects (mcpServers key). $1 was
always a node name defaulting to 5090, so `kilo-pmoves --version` failed. Now
execs `kilo` (or `kilocode`) with args passed through; a leading claws node
name is accepted and dropped for back-compat.

Both source pm-launch-cwd.sh so the session binds to this checkout.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 1

  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

@POWERFULMOVES
POWERFULMOVES marked this pull request as ready for review October 9, 2026 19:41
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Fleet review: kilocode (zai-coding-plan/glm-5.3)

reviewer: tier 2/3 kilo-primary - model zai-coding-plan/glm-5.3 - fell back after tier 1 spark-local: not-configured

  1. CORRECTNESS
  • kimi-pmoves.sh: detection kimi --help 2>&1 | grep -q -- '--config-file' runs the real CLI pre-exec; if a kimi build ignores --help and starts a TUI, the launcher hangs before exec. Consider --version or a timeout. Also substring match would false-positive on a hypothetical --config-filex flag.
  • kilo-pmoves.sh:82: node-arg drop is filename-guess ([ -f ...opencode-$1.json ]), so it silently depends on claws/opencode-5090.json being committed — test test_kilo_launcher_drops_legacy_node_argument fails on any checkout missing that file.
  • pm-launch-cwd.sh: sourcing is soft (if [ -f ... ]) — if the fragment is absent the cwd binding silently no-ops with no notice; inconsistent with the "loudly" contract in the header.
  • pm-launch-cwd.sh: prefix check case "$here/" in "$root_p"/*) is correct (trailing / prevents /foo matching /foobar) and both sides are pwd -P-resolved; symlinked checkouts handled. OK.
  • kilo fallback loop (kilo→kilocode) is correct but untested; no test covers the exit 127 not-found path for either launcher.
  • Legacy-kimi test skips when .kimi/config.toml is absent (CI runners), so the legacy branch is effectively untested in CI — matches the reported 2 skips; acceptable but worth knowing.
  • Makefile delegation (kimi, kilo-pmoves without forced 5090) matches the script changes; old ls|xargs|sed|awk listing removed — good.
  • Diff removes NODE=, but the retained (unshown) pm-node-identity.sh block is context I cannot verify; confirm it doesn't reference $NODE.
  1. SECURITY / TOPOLOGY
  • Clean. No IPs, ports, tokens, or credentials added. Hostname-ish node names (kvm4-1, nemotron-claw, etc.) are only in removed lines; runtime echoes print only local paths ($PROJECT_ROOT, $HOME/.kimi-code), not committed topology.
  1. VERDICT: APPROVE — fixes are correct and tested; remaining items (help-probe hang risk, soft-skip of the cwd fragment, untested fallback paths) are hardening nits, not blockers.
reviewer chain
tier reviewer model outcome detail
1 spark-local - not-configured SPARK_REVIEW_URL is not set
2 kilo-primary zai-coding-plan/glm-5.3 ok review produced
3 kilo-alternate - not-reached

_ lane: fleet-review chain (self-hosted kvm4) - spark-local (when online) -> kilo-primary -> kilo-alternate _

Comment thread pmoves/scripts/kimi-pmoves.sh Resolved
@kilo-code-bot

kilo-code-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Roast 🔥

Verdict: No Issues Found | Recommendation: Merge

Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything.

Round 3, and the streak holds: the single finding from the previous review (the anchored kimi --help regex demanding the comma right after the short flag, so an argparse-style -c CFG, --config-file CFG rendering would silently starve a legacy kimi-cli of its config) was fixed exactly as prescribed — the short-flag group is now (-[A-Za-z][^,]*,[[:space:]]*)?, prose mentions still route Kimi Code, and test_legacy_kimi_cli_with_short_flag_and_metavar_is_still_legacy pins the argparse shape as a regression test. Empty --help still refuses loudly. Three review rounds, three actual fixes — this may be the most disciplined launcher branch in the repo.

📊 Overall: Like a locksmith who installed the vault door and bought a differently-shaped key to test it with. The one residual gap is unchanged from last run: launchers.manifest.json sha256 entries could not be re-verified against HEAD in this sandbox (execution commands blocked); the incremental commit touched no manifest-listed file, so the gap is stale rather than suspect. A hypothetical residual regex hole (comma-separated multi-alias help lines like -c, --cfg, --config-file FILE misrouting to Kimi Code) is noted summary-only as speculative — argparse-style CLIs don't render that shape.

Files Reviewed (2 files, incremental at HEAD 0ffe057; PR diff = 14 launcher files vs base 6d17926)
  • pmoves/scripts/kimi-pmoves.sh - 0 issues (line ~106 regex fixed; metavar + prose shapes verified statically)
  • pmoves/tests/scripts/test_kimi_kilo_launchers.py - 0 issues (new argparse-metavar test asserts legacy branch adds --config-file)
  • carry-over: previous inline findings on pmoves/scripts/kimi-pmoves.sh and pmoves/scripts/kilo-pmoves.sh confirmed addressed on the branch (replied commits 3e5c1a6-era fixes + 0ffe057)
Previous Review Summaries (3 snapshots, latest commit edf167b)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit edf167b)

Verdict: 1 Issue Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
🚨 critical 0
⚠️ warning 0
💡 suggestion 1
🤏 nitpick 0
Issue Details (click to expand)
File Line Roast
pmoves/scripts/kimi-pmoves.sh 105 The anchored regex's short-flag group demands the comma right after the flag (-c, --config-file); an argparse-style rendering -c CFG, --config-file CFG matches neither the group nor a bare line start, so a real legacy kimi-cli would be classified as Kimi Code and exec'd without --config-file — the original misroute, now silent instead of loud. Loosen the group to (-[A-Za-z][^,]*,[[:space:]]*)? and add a metavar-shaped help fixture.

🏆 Best part: Both prior review findings were answered and actually fixed at HEAD — the detector is anchored, empty --help refuses loudly instead of guessing, and the cwd twin is now guarded by a byte-identity test instead of a hopeful comment. The SPARK-KIMI roster wiring (registry entry, vocabulary alias, team membership, generated pin triple) is shaped exactly like its knuckles sibling, manifest included. Second review in and I'm still holding the flamethrower idle. Suspicious.

💀 Worst part: The fix's own regex swung from too loose to slightly too strict. The launcher's entire job is that one classification, and the one untested help format (short flag + metavar) would silently starve a legacy CLI of its config — no crash, no warning, just a session quietly missing its MCP servers.

📊 Overall: Like a locksmith who replaced the flimsy lock with a vault door — excellent, right up until a customer with a differently-shaped key shows up.

Note: the review sandbox blocked gh pr diff --patch, sha256sum, and stat, so manifest sha256 re-verification against HEAD was not possible this run; the previous run verified byte sizes/modes modulo CRLF checkout. The PR was force-pushed since the prior review (14-file launcher diff at current HEAD; larger file set from the stale prior head was discarded per fallback rules — AGNOTE register and website changes are not part of this PR and were not reviewed).

Files Reviewed (14 files, full diff at HEAD edf167b)
  • pmoves/scripts/kimi-pmoves.sh - 1 new issue (line 105)
  • pmoves/scripts/kilo-pmoves.sh - 0 issues (previous finding fixed: inline twin documented + test_cwd_binding_blocks_are_twins drift guard)
  • pmoves/tests/scripts/test_kimi_kilo_launchers.py - 0 issues (new; 8 tests cover both branches, empty help, cwd binding)
  • pmoves/Makefile - 0 issues (kimi/kilo-pmoves targets now delegate correctly)
  • pmoves/config/agent_registry.yaml - 0 issues (kimi_spark matches kimi_knuckles shape)
  • pmoves/config/identity_vocabulary.yaml - 0 issues
  • pmoves/configs/agent-teams.yaml - 0 issues
  • pmoves/configs/node-vocabulary.yaml - 0 issues (valid YAML shape)
  • deploy/provision/kimi-pmoves-spark.sh/.ps1/.cmd - 0 issues (generated pin family; kimi-pmoves.ps1 reference verified present)
  • deploy/provision/install-kimi-pmoves-command.sh/.ps1 - 0 issues
  • deploy/provision/launchers.manifest.json - 0 issues (identity_count 9→10 consistent; hashes unverified, see note)

Previous review (commit 3e5c1a6)

Verdict: 2 Issues Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
🚨 critical 0
⚠️ warning 0
💡 suggestion 2
🤏 nitpick 0
Issue Details (click to expand)
File Line Roast
pmoves/scripts/kimi-pmoves.sh 90 CLI detection by grepping kimi --help output for --config-file is reading tea leaves: any incidental mention of the flag in Kimi Code's help flips to the legacy path and resurrects the exact crash this PR fixes, and a failed/empty --help silently routes legacy kimi-cli into a config-less launch. Anchor the match to a flag-definition-shaped line and handle empty help explicitly.
pmoves/scripts/kilo-pmoves.sh 72 The PR deletes the shared fragment this file's own header praises ("never copied blocks... the cause of this family's last three defects") and pastes the same 14-line cwd block into both launchers, differing only by the tag string. Code and doctrine now disagree ten lines apart; two copies of the cwd-binding logic will drift silently. Re-extract with the tag as a parameter, or retire the false doctrine from both headers.

🏆 Best part: The SPARK-KIMI roster wiring is genuinely tidy — kimi_spark shaped exactly like kimi_knuckles, the vocabulary alias added, the generated pin triple with a manifest that reconciles (byte counts verified: the ps1/cmd "drift" is just .gitattributes CRLF checkout, exactly line-count). Generated, pinned, documented. I had my flamethrower out and this part made me put it down.

💀 Worst part: The cwd-binding block. The deletion of pm-launch-cwd.sh was sold as simplification, but the result is the repo's forbidden pattern with the evidence statement still in the file — the header insists "SHARED FRAGMENTS, never copied blocks" while the diff pastes the same block twice. That's not fewer moving parts, that's two bugs taking turns.

📊 Overall: Like renovating a house for sale by tearing out the shared plumbing and installing two identical copies of it — works today, and the second plumber will be very confused.

Note: sha256sum/manifest-hash verification was blocked by the review sandbox; byte sizes and modes were verified instead and reconcile with the manifest modulo CRLF checkout.

Files Reviewed (13 files, incremental since 55afc84)
  • pmoves/scripts/kilo-pmoves.sh - 1 new issue
  • pmoves/scripts/kimi-pmoves.sh - 1 carried (still present at line 90, active inline comment)
  • pmoves/scripts/pm-launch-cwd.sh - 0 issues (deleted; covered above)
  • pmoves/config/agent_registry.yaml - 0 issues
  • pmoves/config/identity_vocabulary.yaml - 0 issues
  • pmoves/configs/agent-teams.yaml - 0 issues
  • pmoves/configs/node-vocabulary.yaml - 0 issues
  • deploy/provision/kimi-pmoves-spark.sh - 0 issues
  • deploy/provision/kimi-pmoves-spark.ps1 - 0 issues
  • deploy/provision/kimi-pmoves-spark.cmd - 0 issues
  • deploy/provision/install-kimi-pmoves-command.sh - 0 issues
  • deploy/provision/install-kimi-pmoves-command.ps1 - 0 issues
  • deploy/provision/launchers.manifest.json - 0 issues
  • pmoves/tests/scripts/test_kimi_kilo_launchers.py - 0 issues (unchanged; cwd assertions still valid for inlined binding)

Previous review (commit 55afc84)

Verdict: 1 Issue Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
🚨 critical 0
⚠️ warning 0
💡 suggestion 1
🤏 nitpick 0
Issue Details (click to expand)
File Line Roast
pmoves/scripts/kimi-pmoves.sh 81 CLI detection by grepping --help output for --config-file is reading tea leaves: any incidental mention of the flag in Kimi Code's help flips to the legacy path and resurrects the exact crash this PR fixes, and a failed/empty --help silently routes legacy kimi-cli into a config-less launch. Anchor the match to a flag-definition-shaped line and handle empty help explicitly.

🏆 Best part: Oh wait, this part is actually clean. pm-launch-cwd.sh — the case "$here/" with the quoted-prefix glob pattern, the CDPATH='' defusing, the trailing-slash trick so here == root_p still matches — I came here with a flamethrower and I'm disarmed. Whoever wrote that has been burned by symlinked cwd before, and it shows in the best way. Also, actually fixing the wrong-program launchers instead of papering over them? Radically sane for this codebase.

💀 Worst part: The kimi --help | grep -q '--config-file' heuristic at kimi-pmoves.sh:81. You fixed a launcher that guessed the wrong program, and the replacement... still guesses. It guesses via help-text substring instead of a version file, which makes it less wrong, not right — any help-text mention of the flag is a resurrection clause for the very bug this PR buries, and a failed --help silently drops the legacy config path with no notice.

📊 Overall: Like fixing a haunted house by burning it down and rebuilding — solid structure, but the new smoke detector is a guy sniffing the air. Ship it after one honest anchor on that grep.

Files Reviewed (5 files)
  • pmoves/Makefile - 0 issues
  • pmoves/scripts/pm-launch-cwd.sh - 0 issues
  • pmoves/scripts/kimi-pmoves.sh - 1 issue
  • pmoves/scripts/kilo-pmoves.sh - 0 issues
  • pmoves/tests/scripts/test_kimi_kilo_launchers.py - 0 issues

Reviewed by glm-5.3-flash · Input: 83.7K · Output: 6.5K · Cached: 659.8K

Identity: kimi-pmoves on spark launched unbound ("no identity is declared
for harness 'kimi'"). The roster already names SPARK-KIMI (canonical
spark-kimi in identity_vocabulary.yaml); it had no registry key and the spark
node declared no default_identity. Adds kimi_spark to agent_registry.yaml
(shape of kimi_knuckles, affinity spark), spark.default_identity.kimi in
node-vocabulary.yaml, the kimi_spark spelling to the spark-kimi roster entry,
and the orchestration team. No cipher_agent_id: no card is minted for
spark-kimi, and every declared id must name an active card.

Regenerated deploy/provision with pmoves_launcher_generator.py, which adds
the registry-driven kimi-pmoves-spark pin, as claude has per-node pins.

Launchers: the cwd binding is inlined in kimi-pmoves.sh and kilo-pmoves.sh
instead of sourced from a separate pm-launch-cwd.sh, which is removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the config pmoves/config(s)/ changes label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Fleet review: kilocode (zai-coding-plan/glm-5.3)

reviewer: tier 2/3 kilo-primary - model zai-coding-plan/glm-5.3 - fell back after tier 1 spark-local: not-configured

Reviewed /review/kilo-review.diff (603 lines, 14 files). The diff is notably larger than the PR body describes.

1. CORRECTNESS

  • Body/diff mismatch: PR body promises a new shared fragment pmoves/scripts/pm-launch-cwd.sh; it is absent. The cwd-binding block is instead copy-pasted into both kimi-pmoves.sh and kilo-pmoves.sh (diff L435-449, L377-391) — duplicated logic will drift; body is stale or file was dropped.
  • kimi-pmoves.sh detection is fragile: kimi --help 2>&1 | grep -q -- '--config-file' (L459) misdetects if Kimi Code's help ever mentions that string (subcommand, deprecation note), and spawns a help subprocess on every launch.
  • kilo-pmoves.sh arg swallow: a first positional matching a claws filename is silently dropped (L370-373) — acceptable for legacy node names, but it will also eat a legitimate kilo positional that happens to collide; documented in comments only.
  • Exit-code loss in Windows shim: kimi-pmoves-spark.ps1 ends with & $ps1 @args (L105) without exit $LASTEXITCODE; the .cmd wrapper (L78) then exits 0 even when the launcher fails.
  • kimi-pmoves.sh env edge: ${KIMI_CODE_HOME:-$HOME/.kimi-code} (L462) errors under set -u when HOME is unset (minimal CI/service shells).
  • Test CI edge: test_kilo_launcher_drops_legacy_node_argument hard-requires pmoves/configs/claws/opencode-5090.json to exist — fails (not skips) on a checkout without it.
  • Generator drift risk: the edited install-kimi-pmoves-command.{sh,ps1} and new spark wrappers are managed_by: generator per the manifest, but cli_tools.yaml / launcher_overrides.yaml are not in the diff — a regen may drop the spark additions; the --check drift gate must run in CI.
  • node-vocabulary.yaml: adds a default_identity: key (L311-312) with no visible schema/validator update in the diff; unverifiable that consumers accept it.
  • Minor: Makefile recipe @bash $(CURDIR)/scripts/... leaves $(CURDIR) unquoted (space-safe issue; pre-existing style). Positives: quoting elsewhere is correct (cd --, "$@", grep --), EOF-newline fixed, 5090 forcing removed, kilo/kilocode fallback with exit 127 is sound.

2. SECURITY / TOPOLOGY

  • No secrets, tokens, IPs, ports, or credentials in the diff (port: null, no addresses). Effectively clean on real topology.
  • Minor/pre-existing: internal fleet node identifiers (spark, pmoves-b850, dgx-spark, kvm4-1/2, nemotron-claw, 5090, z890) appear in a public repo; most are pre-existing context lines — this PR newly adds only kimi_spark/spark affinity references. Logical names, not addresses.
  • Launchers echo absolute $PROJECT_ROOT paths to stderr — local checkout paths, not internal topology.

3. VERDICT: REQUEST_CHANGES

The launcher fix itself is sound and tested, but ~9 files adding the kimi_spark fleet identity plus generated Windows/macOS wrappers are unrelated scope creep, and the body's promised pm-launch-cwd.sh shared fragment is missing (logic duplicated inline) — split the identity work into its own PR and reconcile the body.

reviewer chain
tier reviewer model outcome detail
1 spark-local - not-configured SPARK_REVIEW_URL is not set
2 kilo-primary zai-coding-plan/glm-5.3 ok review produced
3 kilo-alternate - not-reached

_ lane: fleet-review chain (self-hosted kvm4) - spark-local (when online) -> kilo-primary -> kilo-alternate _

Comment thread pmoves/scripts/kilo-pmoves.sh Resolved
POWERFULMOVES and others added 2 commits October 10, 2026 15:04
… twin-locked cwd block; resolver in the test

CI (python-tests ratchet) had one new failure:
test_no_repo_python_spawns_a_bare_bash -- the launcher test spawned
["bash", ...], which on Windows is the System32 WSL stub. It now spawns
resolve_bash(), like the other launcher tests. main merged in to pick
that gate up.

Review (kilo) on kimi-pmoves.sh:90 -- grepping `kimi --help` for the
substring `--config-file` flips to the legacy path the moment Kimi Code
MENTIONS the flag anywhere, and an empty/failed --help fell open into
the Kimi Code branch. Now: the help text is captured once; the match is
anchored to a flag-definition line (`--config-file` at line start,
optionally after a short flag, followed by space/=/,/EOL); empty output
is an explicit exit 1 naming the install, never a guess. Two tests pin
both: prose mention stays Kimi Code, empty help is refused.

Review (kilo) on kilo-pmoves.sh:72 -- the cwd binding is an inline twin
in both launchers while the header doctrine says fragments. The inline
is deliberate: the binding must hold on a checkout with no fragments
present (the launcher may be the first thing that runs there), which a
sourced file cannot promise. Kept inline, made non-driftable instead:
both blocks carry a `pm-cwd-bind` marker and
test_cwd_binding_blocks_are_twins asserts they are byte-identical modulo
the launcher tag, so a change to one fails until the other matches.

Local: bash -n clean on both scripts; test_no_bare_bash_argv 26 passed;
the three new launcher tests pass. The four pre-existing cwd-asserting
launcher tests fail on Windows only because Git Bash `pwd -P` reports
/c/... while the test expects C:\... -- unchanged by this commit and
green on the Linux runner.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Fleet review: kilocode (zai-coding-plan/glm-5.3)

reviewer: tier 2/3 kilo-primary - model zai-coding-plan/glm-5.3 - fell back after tier 1 spark-local: not-configured

  1. CORRECTNESS
  • cwd-bind block is sound: physical-path compare, trailing / handles cwd == root, empty PMOVES_LAUNCH_KEEP_CWD= correctly does NOT opt out; twin-block drift test is a good guard.
  • kimi detection regex is well-anchored (definition-line only; rejects --config-filename and prose mentions); empty-help hard-fail is right. Nit: the optional short-flag group requires a comma, so a -c --config-file (no comma) help layout would misdetect as Kimi Code.
  • kilo node-arg drop (opencode-$1.json existence check) silently eats a legitimate kilo positional that happens to match a claws node name — accepted/documented tradeoff.
  • kimi-pmoves-spark.ps1: no exit $LASTEXITCODE after delegating, so a failing child can surface as 0; also never clears PMOVES_NODE_ID if dot-sourced (the install-ps1 pin functions do Remove-Item).
  • Makefile targets still don't forward args (make kilo-pmoves -- --version won't pass through) — pre-existing, not a regression.
  • install-kimi-pmoves-command.sh 0644→0755 is a real fix.
  • Tests are hermetic (full env replacement), legacy test skips cleanly without .kimi/config.toml.
  • CI: new test hard-imports pmoves.tools.bash_resolver — collection error if that module is absent on a runner; PATH uses POSIX : separators, so Windows runners depend entirely on resolve_bash's behavior.
  • YAML: kimi_spark registry entry mirrors kimi_knuckles shape (port: null — good); verify the spark node has no pre-existing default_identity key in node-vocabulary.yaml (dup key = silent override; not visible in hunk).
  1. SECURITY / TOPOLOGY
  • Clean. Added lines contain only node identifiers already public in the repo's own vocabulary (spark, pmoves-b850); no IPs, ports (explicitly port: null), tokens, or credentials. The rewrite actually removes an old header listing internal node names (kvm4-1/kvm4-2/etc.) from the launcher — net reduction. No instructions-in-diff influence.
  1. VERDICT: APPROVE — both launchers now exec the CLI they're named for with defensible detection and cwd binding, tests assert real argv/cwd, and the registry/deploy changes are generator-consistent; remaining items are nits (ps1 exit-code propagation, comma-only short-flag regex).
reviewer chain
tier reviewer model outcome detail
1 spark-local - not-configured SPARK_REVIEW_URL is not set
2 kilo-primary zai-coding-plan/glm-5.3 ok review produced
3 kilo-alternate - not-reached

_ lane: fleet-review chain (self-hosted kvm4) - spark-local (when online) -> kilo-primary -> kilo-alternate _

Comment thread pmoves/scripts/kimi-pmoves.sh Resolved
POWERFULMOVES and others added 2 commits October 11, 2026 08:58
# Conflicts:
#	pmoves/configs/node-vocabulary.yaml
…re the comma

Review (kilo) on kimi-pmoves.sh:105: the anchored match demanded the comma
directly after the short flag (`-c, --config-file`). argparse renders
`-c CFG, --config-file CFG`, so a real legacy kimi-cli with that help text
was classified as Kimi Code and exec'd WITHOUT --config-file: the original
misroute, mirrored, and quieter because the legacy CLI then starts with none
of its .kimi/ config instead of dying on an unknown option.

The optional short-flag group is now `-[A-Za-z][^,]*,` so a metavar may sit
between the flag and the comma. Prose that merely mentions the flag still
does not match (it does not start with `-`), so the deprecation-note
discipline from the previous commit holds. Checked directly against five
help-line shapes: `-c CFG, --config-file CFG`, `-c, --config-file FILE` and
`--config-file FILE` route legacy; a prose mention and `--config-file-legacy`
route Kimi Code.

New test test_legacy_kimi_cli_with_short_flag_and_metavar_is_still_legacy
feeds the argparse rendering and asserts the legacy branch adds
--config-file. On Windows it fails the same way as the existing legacy test
(Git Bash reports /c/... where the test expects C:\...); index 0 of argv is
--config-file on both, so the routing is correct and the Linux runner is the
gate. main merged in (b602954); node-vocabulary.yaml took both spark
default_identity keys.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Fleet review: kilocode (zai-coding-plan/glm-5.3)

reviewer: tier 2/3 kilo-primary - model zai-coding-plan/glm-5.3 - fell back after tier 1 spark-local: not-configured

  1. CORRECTNESS
  • kimi detection regex is sound for real help formats (-c, --config-file F, -c CFG, --config-file CFG, bare --config-file[=, ]); prose mentions can't false-positive thanks to the ([[:space:]=,]|$) anchor. Theoretical miss: short flag space-separated without comma (-c CFG --config-file) would misread as Kimi Code — no known CLI emits that.
  • kilo-pmoves node-arg drop: any $1 matching a claws stem is silently consumed — a legitimate kilo positional colliding with a claws name is dropped; logged to stderr, intentional back-compat.
  • cwd-bind block is correct: case "$HERE_P/" in "$ROOT_P"/* handles equality and .claude/worktrees/*; both sides physical (-P/pwd -P); PMOVES_LAUNCH_KEEP_CWD keeps cwd on any non-empty value, not just 1 (doc nit).
  • Empty/failed kimi --help hard-exits instead of guessing — good; but --help is executed on every launch (minor latency).
  • Tests: legacy-path tests skip when .kimi/config.toml absent → those branches untested on bare CI runners; no coverage for the kilocode fallback or kimi-missing (127) path; hardcoded POSIX PATH is fine under the bash skipif.
  • kimi-pmoves-spark.ps1 sets $env:PMOVES_NODE_ID and never restores it — leaks into the session if the script is run in-process rather than via the .cmd; mirrors the existing knuckles pattern.
  • YAML: kimi_spark entry shape matches kimi_knuckles; alias/default_identity.kimi/team additions are consistent; manifest hashes regenerated; install-…command.sh 100644→100755 is a correct fix.
  • Scope: registry/vocabulary/deploy changes are coupled to the launcher's spark identity binding — related, not creep.
  1. SECURITY / TOPOLOGY
  • Clean. No IPs, bridge/host addresses, ports (explicitly port: null), secrets, or tokens. Node identifiers (spark, pmoves-b850) are pre-existing registry-public names, not new exposure. -ExecutionPolicy Bypass in the generated .cmd is standard wrapper practice. Only public URLs (kimi-code docs, @kilocode/cli).
  1. VERDICT: APPROVE — launcher fixes are correct, carefully quoted, and well-tested; remaining items are nits (untested fallback paths, theoretical help-format miss), no security or topology leaks.
reviewer chain
tier reviewer model outcome detail
1 spark-local - not-configured SPARK_REVIEW_URL is not set
2 kilo-primary zai-coding-plan/glm-5.3 ok review produced
3 kilo-alternate - not-reached

_ lane: fleet-review chain (self-hosted kvm4) - spark-local (when online) -> kilo-primary -> kilo-alternate _

POWERFULMOVES and others added 3 commits November 19, 2026 16:10
Conflict in deploy/provision/launchers.manifest.json resolved by regenerating with
pmoves_launcher_generator.py (generator output, never hand-merged);
launchers-drift-check: all 63 generator files match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ls (windows-encoding-ratchet)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@POWERFULMOVES
POWERFULMOVES merged commit 5047dbc into main Nov 19, 2026
34 checks passed
@POWERFULMOVES
POWERFULMOVES deleted the fix/kimi-kilo-launchers branch November 19, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config pmoves/config(s)/ changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant