archive: `--yes` skips the incomplete-task stop, and the refusal tells callers to rerun with `--yes`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- cli
調査の方向性
Start in src/core/archive.ts at the incomplete-task handling around lines 1591-1619 and inspect rerunFlags() around lines 287-293. Reproduce the four command cases from the issue, then review src/core/github-copilot/cloud-agent.ts around line 115 for related guidance. Done means the chosen behavior is consistent in text and JSON modes, and fix text no longer treats --yes as permission to bypass incomplete tasks.
索引モデルが issue の本文から書いたものです。
説明
Hey, guys, you are awesome for making openspec!
Summary
openspec archive <change> --yes archives a change whose tasks.md still has unchecked tasks, printing only a warning. With --json it prints no warning at all. When the CLI does refuse, its fix text tells the caller to rerun with --yes, so an agent that follows the fix text archives unfinished work.
Environment
@fission-ai/openspec1.13.2 (the same on 1.13.1)- Node 22.22.2, Linux
- The code is unchanged on
mainat d4e1c77ebae0bd96a7c649fa35edef997989450a
Reproduction
mkdir openspec-probe && cd openspec-probe
npm init -y > /dev/null && npm install @fission-ai/[email protected]
reset_change() {
rm -rf openspec/changes
mkdir -p openspec/specs openspec/changes/probe-unchecked-tasks
printf '## Why\nprobe\n\n## What Changes\nprobe\n' > openspec/changes/probe-unchecked-tasks/proposal.md
printf '## 1. Probe\n\n- [ ] 1.1 undone\n- [x] 1.2 done\n' > openspec/changes/probe-unchecked-tasks/tasks.md
}
reset_change; npx openspec archive probe-unchecked-tasks --skip-specs < /dev/null; echo "exit $?"
reset_change; npx openspec archive probe-unchecked-tasks --json --skip-specs; echo "exit $?"
reset_change; npx openspec archive probe-unchecked-tasks --yes --skip-specs; echo "exit $?"
reset_change; npx openspec archive probe-unchecked-tasks -y --json --skip-specs; echo "exit $?"
| Run | Exit | Result |
|---|---|---|
| no flag, no stdin | 1 | Refuses: 1 incomplete task(s) found for change 'probe-unchecked-tasks', and no answer could be read from stdin. Fix: Complete the tasks or rerun with openspec archive probe-unchecked-tasks --skip-specs --yes |
--json |
1 | Refuses with archive_tasks_incomplete. Fix: Complete the tasks or rerun with --yes. |
--yes |
0 | Prints Warning: 1 incomplete task(s) found. Continuing due to --yes flag. and archives the change. The archived tasks.md still has - [ ] 1.1 undone. |
-y --json |
0 | Archives the change. The JSON has no status entry, so no warning. |
Where in the code
- https://github.com/Fission-AI/OpenSpec/blob/d4e1c77ebae0bd96a7c649fa35edef997989450a/src/core/archive.ts#L1591-L1619 runs the incomplete-task stop only
if (!options.yes). With--yes, text mode logs a warning and JSON mode says nothing. The JSON fix text is on line 1597. - https://github.com/Fission-AI/OpenSpec/blob/d4e1c77ebae0bd96a7c649fa35edef997989450a/src/core/archive.ts#L287-L293:
rerunFlags()always appends--yes, so the text-mode fix recommends it too. - https://github.com/Fission-AI/OpenSpec/blob/d4e1c77ebae0bd96a7c649fa35edef997989450a/src/core/github-copilot/cloud-agent.ts#L115: the generated Copilot agent lists
openspec archive <change> --json [--yes]and cautions to "use--yesonly after confirming all tasks are complete". The agent has to apply that caution itself, and the CLI's own fix text advises the opposite.
Why it matters
-y, --yes is documented as "Skip confirmation prompts". The other stops it skips are confirmations: applying spec updates, and archiving with --no-validate. Unchecked tasks are a different kind of stop, a check that the work is done. Coding agents run archive non-interactively and follow the fix text they get. The change is then archived with work undone, and without --skip-specs its deltas are merged into the main specs as well.
Proposed fix (open to other approaches)
--yeskeeps skipping confirmation prompts, but no longer skips the incomplete-task stop.- A separate explicit flag, for example
--allow-incomplete-tasks, archives past that stop in both text and JSON modes. Callers that archive incomplete changes on purpose keep a non-interactive way to do it. - The
archive_tasks_incompletefix text says to complete the tasks or pass the new flag, never--yes. - Under
--json, archiving past the stop adds a warning entry tostatus, so the caller can see what was skipped. - Scripts that rely on
--yeshere would start failing. If that is too abrupt, one release could first warn when--yesalone skips the stop.
Questions
- Is this a bug fix that can go straight to a PR, or does changing what
--yescovers need an OpenSpec change proposal first? - Does this narrower fix fit, or would you rather fold it into #1652?
Related
- #1652 describes the same gap and asks for configurable archive checks with
--skip-checks. This issue asks for a narrower fix. - #1483 added the rerun advice so non-interactive callers know which flag to pass. For incomplete tasks, that advice skips the stop.
- 主要言語
- TypeScript
- スター
- 76k
- フォーク
- 5.2k
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 58
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Fission-AI/OpenSpec のほかの issue
-
enhancement needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Fission-AI/OpenSpec#2337 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Fission-AI/OpenSpec#2311 ·
メンテナーはふだん 1 日以内に返信
-
sync-specs skill overwrites an existing ADDED requirement, contradicting the CLI's no-op/conflict rule from #1376再び着手できるかも @vaibhavdabas16 が 10 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンapproved
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
Fission-AI/OpenSpec#2289 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
Fission-AI/OpenSpec#2208 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Document the RFC 2119 keyword rule (attribution lost in docs rebuild) and its clarification update RFC 8174対応中かも @sofiaali1521-cloud が 5 日前に担当しました。 オープンdocumentation needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
Fission-AI/OpenSpec#2200 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
Fission-AI/OpenSpec の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nicobailon/pi-subagents#3425 ·
メンテナーはふだん 1 日以内に返信
-
[PORT] A2A: map audio file parts to audio content and ignore MIME parameters (TS→Py)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea-a2a bug port python
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
strands-agents/harness-sdk#6697 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
api technical-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
opencollective/opencollective#9235 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
openwatersio/slackwater#603 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信