fix: Generator が requirement.md を書き換えられる
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Start in scripts/guard.sh at check_write and compare the generator rule with the planner RUN_DIR path check. Review agents/generator.md and the tool invocation in scripts/steps.sh for the intended boundary. Done means generator and its tools cannot write ${RUN_DIR}/requirement.md while existing planner restrictions remain unchanged.
Written by the indexing model from the issue text.
Description
現象
requirement.md は Planner だけが書き換えられる決まりだが、Generator にはこのファイルへの書き込みが開いている。
実際のランで、Planner が動いていない時点(計画を既存の plan-<n>.md から再利用して再開した直後)に requirement.md が書き換わり、制約が2つ増えた。増えた内容自体は妥当だったが、要件を満たす側が要件そのものを書き換えられる状態にある。
原因
scripts/guard.sh の check_write は、役割が generator のとき何も判定せずに許可している。
check_write() {
case "${TRINITY_ROLE}" in
generator) ;;
...
evaluator は Write / Edit を全面拒否され、planner は RUN_DIR の中だけに絞られる。generator にだけ範囲の制限が無い。
Generator は worktree のコードを書くために広い権限が要るが、RUN_DIR の中は別である。scripts/steps.sh の tool から呼ばれる /code-review --fix と /simplify も generator として起動されるため、ツールも同じ権限を持つ。
あるべき姿
generator は ${RUN_DIR}/requirement.md へ書き込めない。agents/generator.md は完了レポート以外を RUN_DIR へ書かないと定めており、機構をこれに合わせる。
判定は check_write に置く。Planner の RUN_DIR 判定と同じく、パスを突き合わせて拒否する形が素直である。
- Dominant language
- Shell
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yjn279/trinity
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
PRテンプレ Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
Similar issues
-
docs(agents): strengthen the no-backslash-escaped-backticks rule with an issue-creation example Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
oSoWoSo/vOid_Community_repOsitory#148 · 1 comment ·
-
chore
Difficulty 1/5 Under an hour Newbie friendliness 91/100
alunduil/alunduil-chezmoi#792 ·
-
area: compat bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
zenhub-dev
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenLiberty/ci.docker#747 ·