Repository navigation
fix(cli,mcp): target-pin flag の値なし指定を USAGE 拒否 + dispatch budget 整合 (#383) - #387
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
rebuildup
marked this pull request as ready for review
November 20, 2026 20:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Issue #383。PR #379 の CodeRabbit Major findings 対応。
1. 値なし target-pin flag の USAGE 拒否
parseArgsは bare--project-fileをtrue、--project-file=を""にする。従来のtypeof === "string"マッピングは両方をundefined(pin 無し)に落とし、--allow-mutationgrant だけが残って「どの project にも pin されない mutation」が実行可能だった。argv.mjsにmissingFlagValue(flags, names)を追加。cli.mjs(execute/verify):--project-file/--ae-versionが存在するのに非空 string でない場合、run marker・session open の前にUSAGEで refuse(exit 2)。mcp-server/server.mjs(entry): 同じ検査を server 生成前に実施(exit 2)。2. runner deadline と call timeout の整合
--call-timeout-ms 30000のみ指定すると runner のdeadlineMsは default 10s のまま → call budget 内に終わる host op が 10s で UNKNOWN/quarantine されていた。a8n-transport/dispatch-budget.mjsのresolveDispatchBudgets()に集約:deadlineMs未指定時はcallTimeoutMs + 500ms(従来の 9500/10000 関係を維持)を導出。deadlineMs <= callTimeoutMsはUSAGEで refuse(launch/attach/census より前)。session.mjs) / attached(attached-session.mjs) 両 opener が同じ関数を使用。dev-loop/session-open.mjsがcallTimeoutMs/deadlineMsをa8n-attachedにしか転送しておらず、owneda8nでは CLI/MCP の両 flag が silent に無視されていた。a8nopener にも転送するよう修正。テスト(fake/mock レベル、real AE 不使用)
a8n-transport/tests/dispatch-budget.test.mjs(新規 7 tests): default 維持・導出・明示ペア・USAGE refuse・両 opener の pre-resolution refuse。devtools-cli/tests/run.mjs: bare/=空値/verify 経路の USAGE refuse + marker 非生成 + 正常値の kind check 維持。mcp-server/tests/server.test.mjs: spawn した実 entry point で exit 2 + stderr メッセージを検証。実行結果:
check-syntax140 files pass、devtools-cli 51 tests、dev-loop 20 tests、a8n-transport 10/10 files、mcp-server 28 tests — 全 green。検証レベル