Skip to content

v0.8: protocol releases — pin hsenv v0.8.0, validate protocols, research_index protocol block (B1–B3) - #73

Merged
assassin808 merged 1 commit into
mainfrom
claude/v080-protocol
Nov 10, 2026
Merged

assassin808 merged 1 commit into
mainfrom
claude/v080-protocol

Conversation

@assassin808

Copy link
Copy Markdown
Contributor

What

The Bench part of the v0.8 platform (B1–B3). A v0.8 study is a folder with study.json and protocol.json, read by one engine, hsenv. Bench publishes a released protocol as a community revision and checks it with the pinned engine. Bench never interprets or executes protocol files itself.

  • B1, pin the engine. requirements.txt pins hsenv v0.8.0 by commit SHA (fd38302574260b5876cfeaa6741540c5163ba662). This is the only place the pin is written: the sync-studies-index, research-catalog, maintain-community and validate-studies workflows read that line from it. scripts/research/effects_core.py now re-exports hsenv.effects_core, so Bench no longer keeps its own copy.

  • B2, validate protocol releases. scripts/research/protocols.py checks a release:

    • schema
    • public-path allowlist
    • visibility: public and a signed HIGH FIDELITY review
    • no release_hold
    • protocol hash binding and a current checks report
    • effects and capabilities
    • manifest digest

    validate_assets sends protocol revisions through these checks. validate-studies.yml gains a validate-protocols job. scripts/check_contributors.py is one contributor rule for legacy index.json and protocol study.json.

  • B3, research_index. build_catalog adds a protocol block to the paper entry: counts and ids only, never protocol text. replayable and humanBenchmark are computed from the protocol. studies_index.json and research_index.json stay byte-identical for current studies. tests/fixtures/protocol_release/research-index-protocol.json is the shared contract fixture for the web reader.

Details are in docs/v080-protocol.md.

Why

Bench, the web runner and the desktop must judge a study with the same engine. Pinning hsenv by SHA means one reviewed engine version decides every verdict, and nothing in a contribution is ever run.

Protocol proposals need a maintainer

On the community proposal path (maintain-community.yml → revisions.integrate), a proposal that holds protocol.json is never accepted. It always returns needs_review with requiresMaintainer: true. This holds whatever the review says, including an LLM agent's "accept". It also holds whatever the release says about itself (fidelity.signed_by, a PASS review/checks-latest.json). No agent review is spent on these proposals. A protocol release is published only through a maintainer release PR, and the validate-protocols job checks that PR.

Tests

  • Fresh venv (Python 3.13), pip install -r requirements.txt, which installs hsenv from GitHub at the pinned SHA. Then pytest tests -o addopts='': 250 passed, 1 failed.
  • The one failure is tests/test_genius_integration.py::test_hosted_live_contract_preserves_context_and_uses_openrouter. It fails the same way on main under Python 3.13, and passes under 3.12. The test compares id() of backend objects, and 3.13 reuses ids after garbage collection. This PR does not touch it.
  • The shared fixture's checks-latest.json and the other fixtures pass unchanged with the tagged engine.
  • New and changed tests:
    • tests/test_hsenv_pin.py: the pin is a 40-hex SHA and the only one; workflows read it from requirements.txt; the installed version matches the tag. The effects golden covers all 42 community revisions with effects.json and matches the pre-hsenv Bench copy exactly. Protocol readers never call eval/exec outside the whitelisted hsenv.expr.
    • tests/test_protocol_release.py: release rules, the maintainer-only rule for proposals, and the protocol block in research_index.
    • tests/test_check_contributors.py.
  • Test data is an invented CC0 fixture (example2026lamps), not a real paper.

🤖 Generated with Claude Code

B1: requirements.txt pins the hsenv engine (single pin, by the commit SHA of tag v0.8.0,
fd38302) and every workflow
reads it from there. scripts/research/effects_core.py re-exports
hsenv.effects_core. A golden test checks that every community revision
with effects.json gives the same problems, warnings and kg digest as the
Bench copy it replaces, and that protocol readers never execute protocol
text.

B2: scripts/check_contributors.py applies one contributor rule to legacy
index.json and protocol study.json. scripts/research/protocols.py checks a
protocol release with the pinned engine (schema, public-path allowlist,
visibility, signed fidelity, no release_hold, protocol hash, current checks
report, effects and capabilities, manifest digest). validate_assets gains a
protocol branch; validate-studies.yml gains a validate-protocols job.

B3: build_catalog adds a protocol block (counts and ids only) to the
research_index entry and derives replayable/humanBenchmark from the
protocol. studies_index.json and research_index.json stay byte-identical
for current studies.

Review fixes: a community proposal holding protocol.json is never accepted
on the proposal path (always needs_review with requiresMaintainer, no agent
review, regardless of self-declared fidelity or checks); shared protocol
block fixture for the web reader; public-only docs; limits on the
validate-protocols job. Tests use an invented CC0 fixture release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@assassin808
assassin808 merged commit 5841257 into main Nov 10, 2026
3 checks passed
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