Skip to content

feat(v1/harbor): download a pinned taskset release from the Prime Hub - #3317

Draft
kcoopermiller wants to merge 5 commits into
mainfrom
feat/harbor-local-path
Draft

kcoopermiller wants to merge 5 commits into
mainfrom
feat/harbor-local-path

Conversation

@kcoopermiller

@kcoopermiller kcoopermiller commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

What

A Harbor taskset can now come from a taskset release stored on the Prime Hub: prime_taskset.

uv add prime-hub
uv run vf-run harbor --env.taskset.prime-taskset my-team/my-set@3 \
  --env.agent.harness.id bash --env.agent.runtime.type prime -n 5
  • The release is downloaded once with the prime-hub package into the Harbor cache, the way dataset is with harbor 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.
  • The release has to be pinned (owner/name@release): the latest one can't be reproduced.
  • If prime-hub isn't installed, the error says how to install it. If the download fails, the error says why and nothing is cached.
  • It can't be combined with dataset, repo, registry_path or registry_url. tasks filters 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

  • No dependency is added. prime_hub is imported when a config names a prime_taskset, and not before. prime-hub is a small package (httpx, pathspec, pydantic) that could become a dependency beside prime-sandboxes and prime-tunnel, which would be a separate change.
  • prime-hub is 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_taskset fails with the install hint.
  • The field name prime_taskset is a first choice, open to a better one.
  • Not changed: a task Verifiers can't run (for example one with only a Dockerfile) still fails the load, as it does for a downloaded dataset. tasks or ignore_dockerfile gets past it. The existing Harbor download is moved one level in and otherwise untouched.
  • Earlier versions of this PR read tasks from a local folder (path) and called the prime CLI. Both were taken out: the folder to keep the change small, the CLI because the package needs nothing on PATH and is one release closer.

Tests

  • tests/unit/test_harbor_prime_taskset.py, against a stand-in prime_hub module: 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.
  • Run for real, with google/gemini-2.5-flash-lite on the bash harness in Prime sandboxes, and prime-hub installed from prime#1266's branch: a release of three small Harbor tasks, the two runnable ones chosen with tasks. 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_taskset config (owner/name@<numeric release>) instead of Harbor Hub dataset / registry selectors. Releases are fetched with the optional prime-hub package (HubClient.tasksets.download), written into the same Harbor cache layout as CLI exports, and reused on subsequent loads with a per-release cache directory.

HarborConfig validates that prime_taskset is a pinned release, is mutually exclusive with dataset, repo, registry_path, and registry_url, and surfaces clear errors when prime-hub is missing or a download fails (with no partial cache). Existing Harbor download behavior is unchanged when prime_taskset is 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.

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

Copy link
Copy Markdown
Member Author

bugbot run

@kcoopermiller

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T07:09:16.623736Z e642705 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread verifiers/v1/tasksets/harbor/taskset.py Resolved

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread verifiers/v1/tasksets/harbor/taskset.py Resolved
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>
@kcoopermiller kcoopermiller changed the title feat(v1/harbor): read Harbor tasks from a local folder feat(v1/harbor): read Harbor tasks from a local folder or a Prime Hub taskset release Dec 1, 2026
@kcoopermiller

Copy link
Copy Markdown
Member Author

bugbot run

@kcoopermiller

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member Author

bugbot run

@kcoopermiller

Copy link
Copy Markdown
Member Author

@codex review

… release

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@kcoopermiller kcoopermiller changed the title feat(v1/harbor): read Harbor tasks from a local folder or a Prime Hub taskset release feat(v1/harbor): download a pinned taskset release from the Prime Hub Dec 1, 2026
@kcoopermiller

Copy link
Copy Markdown
Member Author

bugbot run

@kcoopermiller

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 6490742691

ℹ️ 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".

…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>
@kcoopermiller

Copy link
Copy Markdown
Member Author

bugbot run

@kcoopermiller

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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]*")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

This branch has not been deployed

No deployments
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.

1 participant