Registry Mirror
Skip to content

CLI: GitHub annotations point at the wrong file when chatcops test runs in a subfolder #599

Closed

Description

@anurag629

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.
  • A patch changeset for @chatcops/cli.

Comment on this issue to be assigned.

Activity

  1. added
    bug
    on Nov 12, 2026
  2. bhushan4work commented on Nov 12, 2026

    @bhushan4work
    Collaborator

    I'd like to pick this one , self assigning it

  3. self-assigned this
    on Nov 12, 2026
  4. anurag629 commented on Nov 12, 2026

    @anurag629
    MemberAuthor

    @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.

  5. bhushan4work commented on Nov 12, 2026

    @bhushan4work
    Collaborator

    yeah I ll look into it one at a time .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions