fix(brownfield): scan repos with any origin remote#486
fix(brownfield): scan repos with any origin remote#486andrew-adamson wants to merge 1 commit intoQ00:mainfrom
Conversation
There was a problem hiding this comment.
Review — ouroboros-agent[bot]
Verdict: REQUEST_CHANGES
Reviewing commit
ed34eaffor PR #486
Review record:
952b8291-886c-4fcd-b158-cf0c1e1456a5
Blocking Findings
| # | File:Line | Severity | Finding |
|### Recovery Notes
First recoverable review artifact generated from codex analysis log.
---|-----------|----------|---------|
| 1 | src/ouroboros/mcp/tools/brownfield_handler.py:6 | BLOCKING | The new MCP contract says scan discovers repos/worktrees, but scan_home_for_repos() still only recognizes directories that literally contain a .git entry (if ".git" in dirnames at src/ouroboros/bigbang/brownfield.py). Git worktrees use a .git file, not a .git directory, so managed worktrees under ~/.ouroboros/worktrees will be silently skipped even though the API now advertises support for them. This is a user-visible behavior bug, not just a doc mismatch. |
| 2 | src/ouroboros/bigbang/brownfield.py:100 | BLOCKING | _has_github_origin() now returns True for any non-empty origin URL, including GitLab/Azure, and the updated tests explicitly lock that in. Keeping the old name while changing the semantics is misleading enough to cause future callers to get the wrong result. If backward compatibility is required, the old helper should preserve GitHub-only behavior and callers should migrate to _has_origin_remote() instead of reusing a now-misnamed predicate. |
Non-blocking Suggestions
None.
Design Notes
The direction is reasonable: separating “has any origin remote” from “scan and register” makes the scan policy more flexible. The PR needs the implementation and compatibility surface to match that new policy precisely; right now the advertised worktree support and the legacy helper name both drift from the actual behavior.
Reviewed by ouroboros-agent[bot] via Codex deep analysis
|
I understand the motivation here. Broadening brownfield scan from "GitHub origin only" to "any repo with an That said, I don't think this is merge-ready yet because the contract is still blurry in two places:
The direction is fine. I just want the naming, docs, and real behavior to line up cleanly. |
Summary
originremote are consideredTesting
uv run pytest tests/unit/bigbang/test_brownfield.py tests/unit/mcp/tools/test_brownfield_handler.py