[bug] Review.ts: --help and mistyped flags are dropped silently and start a full review
メンテナーはふだん 5 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- bun, typescript
- 領域
- cli
調査の方向性
install/LIFEOS/TOOLS/Review.ts の2238〜2251行付近にある import.meta.main ブロックと、800〜821行付近にある parseReviewFlags の注記を読んでください。共有パーサーは変更せず、CLI のエントリーポイントにヘルプ処理と不明なオプションの検証を追加してください。--help、-h、不明なフラグを指定するとレビューを開始せずに終了することを確認してください。使用方法には --past-round-cap を含めてください。
索引モデルが issue の本文から書いたものです。
説明
What happened
Review.ts has no help and no unknown-option check. bun Review.ts --help does not print usage: it drops --help and runs a full cross-vendor review of the current directory, which also counts as a review round. A mistyped flag behaves the same way.
Mechanism
-
parseReviewFlags(install/LIFEOS/TOOLS/Review.ts:806-821) takes out--allow-dirty,--waive-blockersand--past-round-cap, rejects the retired--accept, and passes every other argument through inrest(:814). -
The CLI then drops every
---prefixed argument from the positionals without a check (:2238), so--help,--jsnoor--allow-dirt "reason"leaveposempty andreview({ dir: "." })runs (:2251). -
A value after a mistyped flag becomes the directory:
--range a..breviews the directorya..b. -
The parser cannot reject unknown flags itself, because CfEnv shares it and forwards its own flags in
rest(doc comment at:800-805). The check belongs in theimport.meta.mainblock. -
The usage text exists only as a header comment (
:12-15), and it does not mention--past-round-cap.
Reproduction
v8.761.0 install/ payload (byte-identical to main as of 2026-11-30). This shows the parser result without starting a review:
cd install/LIFEOS/TOOLS
bun -e 'import { parseReviewFlags } from "./Review.ts";
for (const a of [["--help"], ["--bogus"], ["--range", "a..b"]]) {
const f = parseReviewFlags(a);
console.log(JSON.stringify(a), "->", JSON.stringify(f), "pos =", JSON.stringify(f.ok ? f.rest.filter((x) => !x.startsWith("--")) : null));
}'
Observed:
["--help"] -> {"ok":true,"rest":["--help"]} pos = []
["--bogus"] -> {"ok":true,"rest":["--bogus"]} pos = []
["--range","a..b"] -> {"ok":true,"rest":["--range","a..b"]} pos = ["a..b"]
With an empty pos, the CLI runs review({ dir: "." }).
Expected: --help and -h print usage and exit 0 without reviewing. An unknown option prints unknown option <arg> and exits 2 without reviewing.
This actually happened: on my install, an agent ran Review.ts --help to learn the arguments, which is the natural first move with an unfamiliar CLI. That started a real review of an 89-file span, and the round counted toward the round cap.
Suggested fix
The fix goes in the import.meta.main block only, so the shared parser and CfEnv stay unchanged. This is a sketch and has not been run:
const USAGE = `usage: bun Review.ts [dir] [--allow-dirty "<reason>"] [--waive-blockers "<reason>"] [--past-round-cap "<reason>"] [--json]
bun Review.ts status [dir] [--json]
bun Review.ts audit [--json]`;
if (argv.includes("--help") || argv.includes("-h")) { console.log(USAGE); process.exit(0); }
// after parseReviewFlags:
const unknown = flags.rest.find((a) => a.startsWith("-") && a !== "--json");
if (unknown) { console.error(`review: unknown option ${unknown}\n${USAGE}`); process.exit(2); }
const pos = flags.rest.filter((a) => a !== "--json");
Same class as #1690 (lifeos.ts), #2290 (Upgrade --help ran a full scan) and #2430 (Er.ts filed --help as a complaint).
- 主要言語
- TypeScript
- スター
- 20k
- フォーク
- 2.5k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
danielmiessler/LifeOS のほかの issue
-
[bug] Socrates launchd-path adapter throws EISDIR when an import names a folder beside its .ts fileオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
danielmiessler/LifeOS#3123 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
danielmiessler/LifeOS#3122 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
danielmiessler/LifeOS#3121 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
danielmiessler/LifeOS#3120 ·
メンテナーはふだん 5 日以内に返信
-
LifeOSHooks stamp ages out in a live session: native hooks run beside the plugin again after 7 daysオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
danielmiessler/LifeOS#3080 ·
メンテナーはふだん 5 日以内に返信
danielmiessler/LifeOS の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
eliasstravik/herdr-projects#1700 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
Koenkk/zigbee2mqtt#33890 ·
メンテナーはふだん 1 日以内に返信
-
[Feature]: Skill Workshop skill diet should use the configured utility model, not always the primaryオープンclawsweeper:fix-shape-clear clawsweeper:needs-live-repro clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr impact:auth-provider issue-rating: 🐚 platinum hermit P2
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
openclaw/openclaw#210348 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
can1357/oh-my-pi#21349 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信