[Bug]: `fw fabric register` prints "REFUSED" but writes the card and exits 0

オープン 初心者向け
#108 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
shell
領域
cli

調査の方向性

agents/fabric/lib/register.sh の341~354行付近から始め、サブシステムルールがない場合にカードの書き込み、表示されるメッセージ、終了ステータスにどう影響するかを追ってください。説明にあるとおり、新規の fw init プロジェクトと対象外のパスを使って再現してください。動作が一貫していれば完了です。つまり、カードを書き込まずに登録を拒否してゼロ以外の終了ステータスで終了するか、「REFUSED」と言わない警告を出して登録に成功するかのどちらかです。

索引モデルが issue の本文から書いたものです。

説明

area:fabric bug severity:medium status:received triaged
Bug Description

When no subsystem rule matches the path, agents/fabric/lib/register.sh writes the card anyway (mv -f "$tmp_card" "$card_file", line 341), prints Card created: ... with Subsystem: unknown, then prints REFUSED: <path>: no subsystem rule matches — add a paths: pattern to .fabric/subsystems.yaml (line 352), and returns 0 (line 354).

So the output says the registration was refused while it succeeded. An agent or a script that trusts the exit code sees success; one that reads the message sees a refusal, and may register again after fixing subsystems.yaml, which then answers "Card already exists" and leaves subsystem: unknown in place.

Steps to Reproduce
  1. In a fresh fw init project, make sure no subsystem rule covers the file (e.g. remove .fabric/subsystems.yaml).
  2. touch notes.txt && fw fabric register notes.txt; echo "exit=$?"
  3. Output: Card created: .fabric/components/notes.yaml, Subsystem: unknown, REFUSED: notes.txt: no subsystem rule matches ..., exit=0; the card is on disk.
Expected Behavior

Either the registration is refused (no card written, non-zero exit), or it succeeds with a warning that does not say "REFUSED", e.g. WARN: subsystem unknown — add a paths: pattern to .fabric/subsystems.yaml.

Actual Behavior

"Card created" and "REFUSED" in the same output, exit code 0, card written with subsystem: unknown.

fw doctor output

AI Agent

Claude Code

Operating System

Linux

Additional Context

Seen on 1.8.14 in a real project, reproduced on 1.8.15 in a throwaway container (fresh fw init project, non-root, no network). register.sh is unchanged on bleeding-edge (0c3b8b6c3).

主要言語
Shell
スター
16
フォーク
6
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DimitriGeelen/agentic-engineering-framework のほかの issue

DimitriGeelen/agentic-engineering-framework の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。