Fix -local mode: don't pass project name as repo#2
Open
ha1t wants to merge 1 commit into
Open
Conversation
In -local mode, the project name was being added as a repo entry, which is incorrect. Set repos to nil so downstream handling treats it as a pure local-directory task. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Review Summary by QodoFix -local mode: don't pass project name as repo
WalkthroughsDescription• Fix -local mode to not pass project name as fake repo entry • Set repos to nil for local directory tasks • Prevents downstream issues in repo loop processing • Eliminates spurious repo names from JSON output and LLM prompts Diagramflowchart LR
A["Local mode task creation"] -->|Before| B["repos: projectName"]
A -->|After| C["repos: nil"]
B -->|Causes| D["Repo loop errors"]
B -->|Causes| E["Fake repos in output"]
B -->|Causes| F["LLM prompt pollution"]
C -->|Prevents| D
C -->|Prevents| E
C -->|Prevents| F
File Changes1. main.go
|
Code Review by Qodo
1. JSON repos becomes null
|
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.
概要
-localモードでローカルディレクトリを指定して実行する際、tasksのreposフィールドに projectName を疑似的なリポジトリ名として詰めていた部分を修正します。main.go:1012背景・なぜ修正が必要か
-local モードでは localDir でローカルパスを直接指定するため、repos 配列にリポジトリを入れる必要はありません。にもかかわらず projectName(例: myproject)を repos
の要素として詰めていたため、以下の副作用が発生していました。
for _, repo := range repos (main.go:513) が projectName を処理対象にしてしまう。isLocalPath(projectName) の判定で、たまたまカレントに同名ディレクトリがあれば誤って repoDir
として追加され、無ければ "owner/repo" 形式エラーになりかけていました(先行修正 2dd3794 で validation はスキップ済みだが、根本原因は残存)。
JSON 出力に "repos": ["myproject"] のような実体のない名前が入っていました。
structurePrompt / pagePrompt / writeHomeAndSidebar に渡される repos がそのまま Repositories: myproject のように LLM へのコンテキストに含まれ、生成内容のノイズになっていました。
generateWiki 側は localDir != "" の場合にすでに repoDirs を localDir から組み立てるロジックを持っている(main.go:504-512)ため、repos は nil で問題ありません。
動作確認
関連コミット