[Harbor 4/4] architecture docs, tutorial, and the GAIA example#6
[Harbor 4/4] architecture docs, tutorial, and the GAIA example#6varunursekar wants to merge 2 commits into
Conversation
|
|
||
| This lets anyone optimize a coding agent with plain `harbor run`, and makes the result | ||
| leaderboard-gradeable — the optimizer cannot read hidden labels, modify the scorer, or | ||
| bypass its budget. |
There was a problem hiding this comment.
This reads as a hard guarantee ('the optimizer cannot read hidden labels, modify the scorer, or bypass its budget'), but the code makes each best-effort and the shipped GAIA example undercuts the first one (see the build.yaml comment). Suggest softening to something like: 'vero never writes per-sample labels to the agent's volume and meters every agent evaluation; OS-level mechanisms (read-only paths, a root:600 finalize token) keep the scorer and test split out of the agent's reach on a best-effort basis.'
|
|
||
| splits: | ||
| - { split: train, access: non_viewable } # optimizer sees aggregate scores only | ||
| - { split: validation, access: no_access } # hidden; never reaches the optimizer |
There was a problem hiding this comment.
'hidden; never reaches the optimizer' isn't true for this config: build.yaml is git-tracked and agent_repo is ., so vero harbor build seeds this whole file — including these validation task IDs — into /work/agent via git archive HEAD. The optimizer can read the held-out task IDs, and GAIA answers are public. Move the partition out of the agent_repo subtree, or caveat that for public benchmarks the held-out identity is visible (only per-sample scores are withheld). This is the example that backs the headline 'cannot read hidden labels' claim, so it is worth getting airtight.
|
|
||
| - [`docs/harbor/architecture.md`](docs/harbor/architecture.md) — what it is, the topology, and the leaderboard-integrity model. | ||
| - [`docs/harbor/tutorial.md`](docs/harbor/tutorial.md) — build and run a task end to end. | ||
| - [`examples/gsm8k-agent`](examples/gsm8k-agent) (Mode A) and [`examples/gaia-optimization`](examples/gaia-optimization) (Mode B). |
There was a problem hiding this comment.
examples/gsm8k-agent is cited as the Mode A example but it has no build.yaml (it's the older Policy-API example). The Harbor Mode A example that ships a build.yaml is examples/doubler-agent. Repoint here, or add a build.yaml to gsm8k-agent.
| The optimizer is untrusted. Integrity rests on a few mechanisms, all best-effort at | ||
| the OS/process level (a container escape is out of scope): | ||
|
|
||
| - **3-tier split visibility** (`SplitAccessLevel`): `visible` (aggregate + per-sample |
There was a problem hiding this comment.
Worth one explicit line here: tier_for_split defaults any split not listed to viewable (full per-sample results), so omission fails open. Tell authors to list every split explicitly. (Pairs with the protocol.py fail-open comment on #4.)
| - **Commit transfer**: the sidecar `git fetch`es the agent's commit from the mounted | ||
| repo into its *own* repo with hooks disabled and `file://` (object copy, no | ||
| alternates), so the evaluated tree is fully owned by the sidecar and tamper-evident. | ||
| - **Protected scorer / write-access**: the scorer is sidecar-only; `read_only_paths` |
There was a problem hiding this comment.
'the scorer is sidecar-only' holds for Mode B but not Mode A, where the scorer lives in the agent's editable repo, protected only by chown root:root + chmod -R a-w on read_only_paths (which isn't a real tamper control — see #5). Recommend splitting this claim by mode.
- docs/harbor/architecture.md — what the integration is, the compiled-task topology, the two evaluation modes, the component map, and the leaderboard-integrity model. - docs/harbor/tutorial.md — build and run an optimization task end to end (both modes, the agent-side protocol), and a Harbor section in the README. - examples/gaia-optimization — a Mode-B example optimizing a GaiaAgent (a thin Terminus2 subclass with an editable prompt) on gaia/gaia via a nested harbor run on Modal. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…xample, by-mode scorer Documentation accuracy fixes (review findings on PR #6): - architecture: soften the intro from a hard guarantee ("the optimizer cannot read hidden labels, modify the scorer, or bypass its budget") to best-effort, OS/process-level language describing what is actually enforced. - gaia build.yaml: correct "never reaches the optimizer". Because agent_repo is "." and build.yaml is git-tracked, the validation task ids ARE seeded into the optimizer's repo; only the per-sample scores are withheld. Acceptable for a public benchmark, with a caveat + mitigations for secret-identity benchmarks. - examples: gsm8k-agent is cited as the Mode A example but ships no build.yaml; repoint to gaia-optimization as the complete runnable example and pair gsm8k-agent with the tutorial's Mode A snippet. - architecture: document the current fail-open default for unlisted splits (and that it becomes fail-closed once the protocol fix lands), and split the "scorer is sidecar-only" claim by mode (true for Mode B; Mode A keeps the scorer in the agent's editable repo until the serve.py fix). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
05cdeea to
44285bf
Compare
bb04d67 to
f70a93c
Compare
Draft · Stack 4 of 4 — targets
harbor-3-compiler. Additive, low-risk.docs/harbor/architecture.md— what it is, the compiled-task topology, the two modes, the component map, and the leaderboard-integrity model.docs/harbor/tutorial.md— build + run end to end (both modes, the agent-side protocol); README Harbor section.examples/gaia-optimization— a Mode-B example optimizing aGaiaAgent(thinTerminus2subclass with an editable prompt) ongaia/gaiavia a nested harbor run on Modal.Start your reading here for the big picture, then dive into [1/4]–[3/4].
Stack: [1/4] core → [2/4] sidecar → [3/4] compiler → this.
🤖 Generated with Claude Code
Greptile Summary
This stack-capping PR adds documentation and a runnable example for the Harbor integration: an architecture doc, an end-to-end tutorial, and the
gaia-optimizationMode B example that optimizes aTerminus2-based GAIA agent's prompt via nested Harbor runs on Modal.docs/harbor/architecture.mdanddocs/harbor/tutorial.mddocument the compiled-task topology, the two evaluation modes, the leaderboard-integrity trust model (including an honest fail-open caveat for unlisted splits), and the full build + run workflow.examples/gaia-optimizationships a complete Mode B setup: aGaiaAgent(Terminus2subclass with editable prompts), abuild.yamlwith explicit split access and a well-commented caveat about validation task-ID visibility throughagent_repo, and apyproject.tomlthat bundles the prompt files into the wheel.Confidence Score: 5/5
This is an additive, docs-and-example-only PR with no changes to production code paths; safe to merge.
All changes are documentation files and a new example package. The only code is agent.py, a thin subclass that overrides prompt routing. No existing logic is modified. The two findings are editorial (typos in the upstream-copied prompt) and a defensive-coding suggestion (explicit fallthrough guard) — neither affects correctness of the current example.
No files require special attention. agent.py has a minor silent-fallthrough risk worth a quick read.
Important Files Changed
Reviews (3): Last reviewed commit: "docs(harbor): honest integrity guarantee..." | Re-trigger Greptile