You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
CLI: GitHub annotations point at the wrong file when chatcops test runs in a subfolder #599
The github reporter writes ::error file=... with the fixture's path relative to the folder chatcops test runs in (result.fixture, set from relative(io.cwd, file) at packages/cli/src/test/command.ts:47 and written at packages/cli/src/test/reporters/github.ts:12-16). GitHub reads file= from the repository root. So in a monorepo job with working-directory: site, a failure in site/evals/pricing.chat.yaml is annotated as evals/pricing.chat.yaml, and the annotation doesn't show on the file in the PR's Files tab.
What to do
When GITHUB_WORKSPACE is set, write the fixture's path relative to it. The reporter already gets env; it also needs the working folder, so pass io.cwd in the factory options (packages/cli/src/test/reporters/index.ts:34). Without GITHUB_WORKSPACE, keep today's path, and keep forward slashes on Windows as now.
Acceptance criteria
A test in packages/cli/tests/github.test.ts with GITHUB_WORKSPACE set to the parent of the working folder: the annotation says file=site/evals/.... It fails on dev.
Without GITHUB_WORKSPACE, the output doesn't change.
Activity
bhushan4work commentedon Nov 12, 2026
I'd like to pick this one , self assigning it
anurag629 commentedon Nov 12, 2026
@bhushan4work fine, it's yours. With #452 that's your two. #594 still needs the two changes from my review there, so I'd finish that one first.
bhushan4work commentedon Nov 12, 2026
yeah I ll look into it one at a time .