Repository navigation
feat(v1/harbor): download a pinned taskset release from the Prime Hub - #3317
kcoopermiller wants to merge 5 commits into
Conversation
HarborConfig.path names a local folder: every folder under it that holds a task.toml is a task, read where it is, with nothing downloaded. It can't be combined with dataset or a registry selector. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
bugbot run |
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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: 998ec5fb3b
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
HarborConfig.prime_taskset names a release, owner/name@release. It is pulled once with the prime CLI (prime tasksets pull) into the Harbor cache, as dataset is with harbor download, and read from there after. The release has to be pinned, and it can't be combined with path, dataset or a registry selector. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
bugbot run |
|
@codex review |
A run's saved config names every field, defaults and nulls too, so the check that a source stands alone compares values, not which fields were set. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
bugbot run |
|
@codex review |
… release Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
bugbot run |
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…package, not the prime CLI prime_hub is imported when a config names a prime_taskset, so no dependency is added. A missing package says how to install it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
bugbot run |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e642705a9e
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| logger = get_logger(__name__) | ||
|
|
||
| CACHE = Path.home() / ".cache" / "harbor" | ||
| PRIME_TASKSET = re.compile(r"[^/@\s]+/[^@\s]+@[1-9][0-9]*") |
There was a problem hiding this comment.
Reject extra path components in Prime taskset IDs
When prime_taskset contains another slash after the owner, such as owner/group/name@3, this pattern still accepts it even though the documented format is exactly owner/name@release. download_prime_taskset() then passes group/name as the taskset name, producing a malformed Hub request instead of the intended local validation error; exclude / from the second component as well.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit e642705. Configure here.
What
A Harbor taskset can now come from a taskset release stored on the Prime Hub:
prime_taskset.prime-hubpackage into the Harbor cache, the waydatasetis withharbor download, and read from the cache after that. Each release has a cache folder of its own. Every task is checked against the hashes the release pins.owner/name@release): the latest one can't be reproduced.prime-hubisn't installed, the error says how to install it. If the download fails, the error says why and nothing is cached.dataset,repo,registry_pathorregistry_url.tasksfilters by folder name, as before.Why
Tasks stored on the Prime Hub had no way into a Harbor taskset without publishing them to a Harbor registry first.
To know before merging
prime_hubis imported when a config names aprime_taskset, and not before.prime-hubis a small package (httpx, pathspec, pydantic) that could become a dependency besideprime-sandboxesandprime-tunnel, which would be a separate change.prime-hubis not on PyPI yet. It is feat(hub): prime-hub, a Python SDK for stored tasks and tasksets prime#1266. Until it is published,prime_tasksetfails with the install hint.prime_tasksetis a first choice, open to a better one.tasksorignore_dockerfilegets past it. The existing Harbor download is moved one level in and otherwise untouched.path) and called theprimeCLI. Both were taken out: the folder to keep the change small, the CLI because the package needs nothing onPATHand is one release closer.Tests
tests/unit/test_harbor_prime_taskset.py, against a stand-inprime_hubmodule: one download and then the cache, a cache folder per release, a release that is refused, a download with a failed task, a missing package, the pin, each source it can't be combined with, and a saved config (which names every field, defaults too) loading again.google/gemini-2.5-flash-liteon thebashharness in Prime sandboxes, andprime-hubinstalled from prime#1266's branch: a release of three small Harbor tasks, the two runnable ones chosen withtasks. 2 of 2 episodes scored 1.0 and the release was in the cache. A release number that doesn't exist failed with "has no release 99".One sentence is added to
docs/harbor.md, where the other selectors are listed.🤖 Generated with Claude Code
Note
Medium Risk
Adds an optional download path and config validation on taskset loading; failures are handled before caching, but misconfiguration or Hub outages affect which tasks are available at run time.
Overview
Harbor tasksets can now be sourced from Prime Hub via a new
prime_tasksetconfig (owner/name@<numeric release>) instead of Harbor Hubdataset/ registry selectors. Releases are fetched with the optionalprime-hubpackage (HubClient.tasksets.download), written into the same Harbor cache layout as CLI exports, and reused on subsequent loads with a per-release cache directory.HarborConfigvalidates thatprime_tasksetis a pinned release, is mutually exclusive withdataset,repo,registry_path, andregistry_url, and surfaces clear errors whenprime-hubis missing or a download fails (with no partial cache). Existing Harbor download behavior is unchanged whenprime_tasksetis unset.Documentation and unit tests cover install hints, caching, validation, and config round-tripping.
Reviewed by Cursor Bugbot for commit e642705. Bugbot is set up for automated code reviews on this repo. Configure here.