fix(integrations): name Harbor env groups by content, not position - #524
Merged
Conversation
jdchawla29
changed the base branch from
jaideep/integrations-outside-core
to
main
July 31, 2026 03:22
Group names were positional — `-g1`, `-g2`, assigned largest group first — so a name did not denote any particular environment. Editing one task's declared policy re-partitions the groups, and growing one group past another swaps their numbers, while every row still carries the old name. Rows then join an environment that has come to mean a different image, with nothing to signal it. Names are now derived from what decides the image: the `environment/` build context and the workspace policy baked into it. A name denotes one image forever, so adding, editing or removing a task can never re-point a row that did not change. This drops the bare-name case for single-group datasets. That case was the same disease — an env's name depending on how many groups the dataset happens to have — so a dataset growing a second group renamed the first. Every env name now carries its digest, and a row's env name is the taskset name plus a suffix rather than the taskset name itself.
jdchawla29
force-pushed
the
jaideep/harbor-env-naming
branch
from
July 31, 2026 03:24
c25bb57 to
de1493b
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.
Stacked on #523 (which moves these files). Review that one first; the base will retarget to
mainonce it merges.The bug
Env group names were positional —
-g1,-g2, assigned largest group first — so a name did not denote any particular environment:The env name is the join key between rows and images. Growing one group past another swaps their numbers, while every row still carries the old name — so rows join an environment that has since come to mean a different image, and nothing signals it. Editing one task's declared policy is enough to trigger it, since policy is part of the grouping key.
At benchmark scale this produces wrong scores rather than extra rebuilds, and it gets worse if deploy ever writes rows itself.
The fix
Names derive from what decides the image — the
environment/build context and the workspace policy baked into it:A name denotes one image forever, so adding, editing or removing a task cannot re-point a row that did not itself change.
Behavior change worth flagging
This drops the bare-name case for single-group datasets (
terminal-bench-sample→terminal-bench-sample-<digest>).That case was the same disease: an env's name depending on how many groups the dataset happens to have, so a dataset growing a second group renamed the first. Keeping it would have left a smaller version of the bug in place. The cost is that a row's env name is now the taskset name plus a suffix rather than the taskset name itself, and single-env datasets lose a tidy name.
Test
test_env_name_survives_other_tasks_joining_the_datasetgoes throughload(), grows the smaller group past the larger one, and asserts the untouched rows keep their env. Verified it fails on the old code with the actual swap:uv run pytest -q— 825 passed. ruff and pyright clean.Note
Medium Risk
Fixes incorrect row-to-image joins that could skew benchmark scores, but changes published env name strings (including single-env datasets), so anything caching old
-gNor bare names must realign withadapt/load.Overview
Harbor environment group names are no longer positional (
-g1,-g2, ordered by group size). Each group is named<dataset-slug>-<digest>, where the digest is a stable 12-character hash of theenvironment/build context and the serialized workspace policy—the same inputs that define the adapted image.That makes the env name a stable join key between
load()task rows andadapt()images: adding, removing, or reshuffling tasks in a dataset cannot renumber groups and silently point unchanged rows at a different environment.Behavior change: single-group datasets no longer use the bare dataset slug as the env name; they always get the digest suffix (e.g.
terminal-bench-sample→terminal-bench-sample-<digest>).Tests are updated to assert
envnames start with the taskset prefix plus suffix, and a new regression test confirms env names stay fixed when another group grows past an existing one.Reviewed by Cursor Bugbot for commit de1493b. Bugbot is set up for automated code reviews on this repo. Configure here.