Skip to content

fix(tier3): hash authored repository context files for baseline reuse - #726

Merged
rng1995 merged 15 commits into
NVIDIA:mainfrom
Afloat16:fix/hash-authored-repo-context-files
Nov 23, 2026
Merged

rng1995 merged 15 commits into
NVIDIA:mainfrom
Afloat16:fix/hash-authored-repo-context-files

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The staged baseline-task digest excludes every file named repo-context.json. Only environment/repo-context.json is generated staging metadata. A user-authored file with the same name in the repository, test fixtures or another directory is therefore omitted from task identity, allowing changed inputs to retain the old baseline digest.

Restrict the exclusion to the exact generated metadata path. All other files with that name now contribute their relative path and content to the digest, so their changes invalidate baseline reuse.

Merge and current verification (2026-11-19)

At 440ee8195d28f526702033c854498fc81105d412, merged upstream main ac9fc0ef4999ee5eb86eae27ec3a83c880891c92. The only conflict was in CHANGELOG.md; this PR's release note and the upstream independent-diagnostics note are both retained. This PR's non-changelog files are byte-for-byte unchanged from 899facc6fcb15d65f4dbdd52089bda7ff80da1e2.

Focused verification passed on Linux with Python 3.12.14: 11 tests covering the complete authored/generated context-digest module (5 cases), the native reserved-path regression (4 cases), and the two existing arm-neutral dataset/task-digest controls. The earlier full-module environment limitations remain recorded below. Also passed python -m ruff check src tests, Ruff formatting for the changed Python files, the OSS boundary check, and python -m build (wheel and sdist). Hosted workflows for this merge commit await maintainer approval.

Previous verification

Four new cases fail against the original implementation. They modify root, repository, environment-fixture and test-fixture files named repo-context.json and require a changed task digest. A fifth regression preserves the intended exclusion of generated environment/repo-context.json metadata.

python -m pytest tests/tier3/test_baseline_context_digest.py tests/test_baseline_store.py -q — 37 passed, 2 failed.

The two failures are tests/test_baseline_store.py::test_runner_fresh_reused_and_incompatible[default] and [custom_only]. Both reproduce on unchanged base 8fe9723: the environment places the test's isolated output-provenance key inside a tree selected for evaluation, so the existing location guard refuses the run before collection. No successful full-module run is claimed.

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes (Unreleased changelog)
  • Ran make lint equivalent: python -m ruff check src tests
  • Full make test did not complete successfully in this environment (see below)
  • Ran make build equivalent: python -m build (wheel and sdist)
  • Did not add credentials, private datasets, or proprietary benchmark content

The unchanged base 8fe9723, tested with python -m pytest -x -q, stops after 456 passed and 19 deselected at tests/ci/test_gateway_benchmark_workflows.py::test_gitlab_enriched_tier1_applies_the_keyless_job_baselines[extra0-expected0]. The sandbox has no /tmp, while that workflow fixture explicitly invokes mktemp -d /tmp/skillevaluator-enriched-tier1.XXXXXX. The same test fails for the same reason on the retry branch. No full-suite pass is claimed.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

Signed-off-by: Afloat <ShuffleMonkey@163.com>

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Agreed that only environment/repo-context.json is generated staging metadata (the adapter writes it there and nowhere else, and the reuse guard in the runner checks that same path), so matching the exact relative posix path instead of the bare filename is the right scope. Stored baselines keep their digest unless the task tree really has another repo-context.json, in which case a new digest is what we want. Tests fail without the source change and pass with it. Looks good to me.

Signed-off-by: Afloat <ShuffleMonkey@163.com>
Signed-off-by: Afloat <ShuffleMonkey@163.com>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @Afloat16, for narrowing the baseline digest exclusion to environment/repo-context.json. That matches the adapter's generated metadata location and keeps authored files with the same basename relevant to baseline reuse. I found no new actionable issues on this head.

Validation: all 5 new digest tests and all 34 existing baseline-store tests passed.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Afloat16 for this contribution! I reviewed 2a732abeaf. I reproduced the problem on main, confirmed this change fixes it, checked that the new tests fail on main, and ran the new and related tests on this head (all pass). I left 2 inline comments (2 P3); please take a look.

Comment thread CHANGELOG.md Resolved
Signed-off-by: Afloat <ShuffleMonkey@163.com>
@rng1995
rng1995 enabled auto-merge (squash) November 18, 2026 05:14
Keep both release-note entries and preserve the existing PR implementation and regression tests.

Signed-off-by: Afloat <ShuffleMonkey@163.com>
auto-merge was automatically disabled November 18, 2026 06:08

Head branch was pushed to by a user without write access

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Afloat16 for this contribution and for addressing the earlier review! I re-checked 899facc6fc: all 2 earlier comments are resolved in the code, the tests pass, and I found nothing new. Approving.

Resolve the CHANGELOG.md conflict by retaining this PR's entry and the upstream independent-diagnostics entry.

Signed-off-by: Afloat <ShuffleMonkey@163.com>
Signed-off-by: Afloat <ShuffleMonkey@163.com>
Signed-off-by: Afloat <ShuffleMonkey@163.com>
@rng1995

rng1995 commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

@Afloat16 - Please resolve merge conflict to merge the PR.

Synchronize with NVIDIA/SkillEvaluator main f867b7f.
Retain this PR's entry under Unreleased and preserve published release history.

Signed-off-by: Afloat <ShuffleMonkey@163.com>
@Afloat16

Copy link
Copy Markdown
Contributor Author

Resolved the merge conflict in a0f6e655c5 by merging current main f867b7f311. The PR's release note remains under Unreleased, and published release history is unchanged.

The implementation and regression-test patch has the same stable patch ID before and after synchronization. On the exact merged tree, 9 focused tests passed (Linux, Python 3.12.14); full-source Ruff, changed-file formatting, and git diff --check pass. The broader adapter-suite attempt encountered this environment's enclosing workspace Git metadata; the nine PR-specific cases above passed.

Hosted checks on this head have completed: 21 successful, 2 skipped, no failures. The CI workflow passed.

rng1995 and others added 4 commits November 20, 2026 10:09
CHANGELOG.md: keep every entry from main as-is and add this PR's note as the
first bullet of Unreleased -> Fixed, not under a released version.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
…nd document it

The reserved-path error for an authored environment/repo-context.json now names
the native Harbor task directory, so an operator with many cases under
evals/harbor/ can locate the offending one. The test pins the case name.

Document the reservation on the bring-your-own-task page: staging rejects
environment/repo-context.json in every arm and grading mode, while the same
basename at any other path is an ordinary task input that baseline reuse
compares.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Resolve the CHANGELOG.md conflict by keeping main's entries and this change's entry under Unreleased.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Resolve the CHANGELOG.md conflict by keeping main's entries and this change's entry under Unreleased.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Afloat16 for this contribution! I re-checked e857f4332: I merged current main into the branch (the only conflict was CHANGELOG.md, resolved by keeping main's entries and this entry under Unreleased), confirmed that every earlier review comment is addressed in the code, and ran this PR's tests and ruff, which pass. I found nothing new. Approving. I also pushed one small follow-up commit: the repo-context.json rejection now names the offending native case, and the bring-your-own-task page documents the reservation.

@rng1995
rng1995 merged commit 4840038 into NVIDIA:main Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants