Repository navigation
Description
Summary
On a Gitea/Forgejo-hosted repo, consult --type pr <N> feeds every reviewer a 0-byte diff. There is no error. The generated prompt simply says Changed Files (0), so every model reviews an empty change and returns a confident APPROVE on nothing.
This is the dangerous shape of failure: the review appears to run, lanes report, and the result reads as a clean multi-model approval.
Where it comes from
packages/codev/src/lib/forge.ts:309:
function resolveForgeConfig(options?: ForgeCommandOptions): ForgeConfig | null {
if (options?.forgeConfig !== undefined) return options.forgeConfig;
if (options?.workspaceRoot) return loadForgeConfig(options.workspaceRoot);
if (options?.cwd) return loadForgeConfig(options.cwd);
return null;
}When a caller passes none of the three, this returns null. getForgeCommand then falls through to its documented "default (github)" preset, so gh is invoked against a Forgejo remote. gh cannot resolve the host, the diff comes back empty, and nothing surfaces the failure to the caller.
The PR-diff path in consult --type pr appears not to pass cwd or workspaceRoot. Reported by a builder that hit it live; I verified the resolution-order mechanism above, not the specific call site.
Impact
Silent. A reviewer cannot tell an empty diff from a trivially-correct change, and neither can the human reading the lane summaries. On the repo where this was found, three lanes returned APPROVE (HIGH) against a 0-byte diff before the builder noticed and re-ran with --type impl.
Suggested fix
Two independent changes, both worth having:
- Pass
cwd/workspaceRootdown the--type prpath so the forge config actually resolves. - Fail loudly on an empty diff. Whatever the forge, a PR review with 0 changed files should be an error, not a prompt. The silent fallback is what turned a config-resolution miss into three approvals of nothing.
Optionally: make the GitHub fallback explicit rather than implicit, or warn when a forge config could not be resolved at all.
Related, same family
In the same session on the same Forgejo repo, afx cleanup -p 86 reported No merged PR found for builder/bugfix-86 for a PR that was demonstrably merged (merge commit on origin/main). Consistent with the same GitHub-preset fallback being applied to a Forgejo host.
Environment
- codev at
63e1836 - Forge: Forgejo (
git.pseudoseed.com), repo remote is HTTPS - Workaround in use:
consult -m <model> --type impl
Activity
[Fix #25/#20/#35] Round 2: my own regexes reintroduced the bug they f…
Merge pull request #49 from pseudoseed/fix/consult-truthfulness