Repository navigation
fix(cli): read evals.json files from the Skill root - #372
Merged
Merged
Conversation
karanb192
requested review from
JHWang-1997,
hittyt and
zpzjzj
as code owners
November 2, 2026 10:07
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80441e0cdf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
karanb192
force-pushed
the
fix/import-context-files
branch
from
November 3, 2026 06:13
5779062 to
da5b412
Compare
Anthropic's evals.json lists input files as paths relative to the Skill root. convertEvalToCase stored each path as the file's content (the code said "placeholder"), so `skill-up import` and `skill-up run --auto` gave the agent a file whose only content was its own path, and judges graded the run against that input without any warning. Read each listed file from the Skill root and place its bytes at the same relative path in the case workspace. A missing file, or a path that is absolute or leaves the Skill root, now fails the import or run with a clear error instead of producing a broken case.
Read listed files through os.Root so a symlink cannot reach outside the Skill root. In run --auto, read files only for the cases the case-name filters select, so a missing file in a filtered-out case does not fail the run. In import, convert every case before writing any file, so a missing file leaves earlier output untouched.
The shared evals.json fixture listed file1.txt, which never existed; import used to store the path as content, so nothing noticed. Now that listed files are read from the Skill root, move the fixture into a small Skill (SKILL.md, evals/evals.json, evals/files/input.txt), point both import e2e tests at it, and check that the case carries the file's text.
karanb192
force-pushed
the
fix/import-context-files
branch
from
November 3, 2026 10:46
da5b412 to
b8ca901
Compare
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.
Summary
skill-up importandskill-up run --autoconvert Anthropicevals.jsonentries into cases. For each entry infiles, the converter stored the path as the file's content (the code comment said "placeholder"). So the agent got a workspace file whose only content was its own path, and the case was graded against that input with no warning.Anthropic's skill-creator schema defines
evals[].filesas "Optional list of input file paths (relative to skill root)". This PR reads each listed file from the Skill root and puts its bytes at the same relative path in the case workspace.Related issues
None found. Direct bug-fix PR.
Changes
internal/cli/import.go:SKILL.mdaboveevals.json, or the parent of the directory holdingevals.json(the same lookupconfig.FindSkillDirdoes elsewhere).os.Root, so a path or symlink that leads outside the Skill root fails. Absolute paths and paths that lexically escape the root fail before any read. A missing file fails with the eval ID and the path.importconverts every case, files included, before it writes anything, so a file-read failure leaves earlier output untouched.internal/cli/run.go:run --autoreads files only for the cases the--include-case-nameand--exclude-case-namefilters select. A missing file in a filtered-out case does not fail the run, in line with how filtered-out invalid cases are already treated. The filtered-out cases are still listed, so the "no cases matched the filter" message works as before.internal/cli/import_test.goandinternal/cli/run_test.go:importof a skill with a text file and a binary file: both arrive in the case unchanged, after a YAML round trip;run --autoreads a listed file from the Skill root;..path, and symlinks to a file and a directory outside the Skill root all fail (the symlink cases in a subtest that skips where symlinks are unavailable);docs/guide/migration.mdanddocs/zh/guide/migration.md: thefilesrow of the mapping table says the files are read from the Skill root.SKILL.mdand a real listed input file. The CLI test checks that the imported case contains that file's text.CHANGELOG.md: one line under Unreleased, Fixed.Test plan
The lint, full test, and E2E runs below passed on
b8ca901, rebased onto2405922.make testpassesmake verifypasses with zero findings on the rebased head.go test -tags e2e ./e2epasses on the rebased head, with agent CLIs absent from PATH.run --autotests fail when the old placeholder line is restored. The symlink and filter tests fail when a plainos.ReadFileor reading files for every case is restored.evals/files/data.csvlisted inevals.json, imported and run onenvironment.type: nonewith a custom engine that prints that file from its workspace and a rule judge that looks for the CSV rows. Onmainthe imported case holdsevals/files/data.csv: evals/files/data.csvand the run fails; with this PR the case holds the CSV rows and the run passes.npm run docs:build: not run; the doc change is one table cell per language.Notes for reviewers
context.filesholds file content. That matches howcontext.filesworks today.internal/judge/judge.go). That is the same class as the symlink case fixed here, but outside this change, so I left it alone.