Repository navigation
Test lead-only delegation across harnesses - #141
Merged
Merged
Conversation
Two seats run the pinned openhuman-core through the process runner, registered with a real coordinator and served hive tools by a real tinyhivemind-mcp server, one bearer each. A loopback model reads each rendered turn, posts, retries the same call, then completes. The test checks each seat posts once under its own name, the retry returns the first result, the episode settles, and no process is left after stop. Opted into with THM_OPENHUMAN_CORE, like the crate's other live tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude Code speaks only Anthropic's Messages API, so the kind gets its own model API and a new capability row: provider anthropic with an explicit endpoint and no credential, which it alone accepts. An openai endpoint is rejected for it by the spec; every other row matches codex's. ADR 0037 records the decision as proposed until a conformance run on the pinned release backs it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
One minimal ACP client drove Claude Code, Codex and OpenClaw against the spike's scripted model and MCP stub. Each called the hive tool as the right seat, cancelled, resumed after a restart and replayed nothing, once Claude Code's built-in tools and Codex's auto review were turned off. OpenClaw reports no per-turn usage over ACP and costs about 2 GB with its Gateway; the adapters roughly double a Codex seat's memory. Co-Authored-By: Claude Opus 5.5 <[email protected]>
One harness client for every agent that speaks the Agent Client Protocol over stdio, on the host's supervised JSON lines. What differs between agents is an Agent descriptor of data: command, environment, files, session metadata and mode. Claude Code and Codex have descriptors, with the settings the ACP runs found each needs: Claude Code's built-in tools and tool search off, Codex in read-only mode with a direct-tool catalog. A permission request for a host tool is allowed by the client, since the tool server judges hive tools; any other goes to the seat's approver. Live tests on the pinned agents run a Claude Code seat, a Codex seat, and a mixed hive of OpenHuman, Claude Code and Codex in one episode with a real coordinator and tool server: each seat posts once as itself though it retries, and the episode settles. ADR 0038 records the decision as proposed until the conformance suite runs on each agent. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An OpenHuman, a Claude Code and a Codex seat each write a file with the host's write_file executable tool, which runs in the seat's own workspace under the host's access gate. A read-only seat's write is refused by the host and writes nothing. Agents' own tools stay off, as the harness spec requires. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The edit test now has every editing seat retry its write, try a path that climbs out of its workspace and an absolute one, and runs the Claude Code and Codex seats supervised under a host approver that records every request. It checks that a retried write runs once and returns the first result, that both escapes are refused and nothing lands outside a workspace, that the approver judges exactly the supervised seats and is not asked again for a retry, and that a seat the approver denies writes nothing. Editing seats post once, so an OpenHuman seat's turn stays within its eight model calls. Co-Authored-By: Claude Opus 5.5 <[email protected]>
From review of tinyhumansai#140: - refuse an agent whose initialize lacks protocol version 1 or HTTP MCP, and resume a session only when the agent offers loadSession; - keep a session as the seat's before setting its mode, so a failed session/set_mode is retried on it; - keep a process until its stop succeeds, so a failed stop can be retried; - close a turn's route before its last drain, and on drop answer what it still holds; answer a cancelled turn's permission requests `cancelled`; - treat a prompt result without a stopReason as a broken protocol; - hold a seat id from start to the end of stop, stopping what a dropped start began before freeing it; - fill templates in one pass and TOML-escape values in .toml files; - give write_codex_catalog a typed CatalogError; - bound every wait in the connection tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
From review of tinyhumansai#140: the replay row measured only a new agent starting, not a loaded interrupted session, so it and ADR 0038 now say so; the conclusion names Claude Code's CLI outliving its adapter; the spike client decodes stdout as UTF-8 and fails its calls once the agent closes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The test writes a script and runs it at once. When another test forks a child in between, the child holds the script open for writing until it execs, and running the script fails with ETXTBSY: about one run in twenty of the crate's unit tests on a busy machine. The test now tries again while the script is busy. Co-Authored-By: Claude Opus 5.5 <[email protected]>
OpenHuman appends how long a tool call took (`[took 0.1s]`) to its result, so a retry the host answers from its record can still read differently from the first call when the first was slow. Under load the edit test failed on exactly that. The scripted model now drops that suffix, as it already drops Codex's timing prefix, before it compares. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A lead on each harness in turn is the only starter: it asks the seats on the other two harnesses in one conversation, each answers there through its own model API, the lead completes on a later turn showing both answers, and a member nobody asked never runs. The round is two wide; at the default width of one, an ask naming two seats fails the episode. The scripted model now gives every response and tool call a fresh id. Claude Code joins a response's stored parts by id and interrupts a tool call whose id its session has seen, so with fixed ids a seat's second turn looped until the episode's turn wall. Co-Authored-By: Claude Opus 5.5 <[email protected]>
9 tasks done
|
Warning Review limit reached
This review includes 52 billable files and costs up to $13.00. Or wait 59 minutes for your next included review. View limit details
|
11 tasks done
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.
Summary
Follows #140, now merged: this PR's diff is its one commit,
Test lead-only delegation across harnesses.A live test of the case where seats on other harnesses take part only because a lead asks them. One hive holds an OpenHuman, a Claude Code and a Codex seat, plus
idle, a Claude Code seat nobody asks. The host starts the episode with the lead as its only starter. The test runs three times, each harness leading once:hivemind_asknaming the seats on the other two harnesses, then ends its turn.The checks:
idlenever ran.Related issue
None. Listed as a follow-up in #140.
API or behavior changes
None. Tests only.
What this found
round_width1 (the default), the episode fails with "dm has 2 recipients but round width is 1".stage_actionaccepts the call, because it checks that the asked seats are members but not the width. The driver then fails the whole episode, rather than refusing the call so the model could narrow its ask. This is existing coordinator behaviour, separate from this test, which runs with round width 2. Raising it here as a possible follow-up.Validation
Run on Linux (all-in), against the pinned agents:
cargo fmt --all -- --check: OKcargo clippy -p tinyhivemind-acp --all-targets --all-features -- -D warnings: OK. Only the ACP crate's tests changed; the workspace-wide commands ran on Run hive seats on Claude Code and Codex over ACP, beside OpenHuman #140.cargo test -p tinyhivemind-acp --all-featureswith every live agent set: all 7 live tests passed, 3 runs in a row.Tests
New:
tests/hive/delegation.rs, with threelive_*tests.tests/hive.rsnow splits starting, settling and stopping a hive into helpers that both test files share.tests/hive/model.rsgains the delegation script.Documentation
tests/README.mdandtests/hive/README.md.Checklist
#[allow(...)],#[ignore], or relaxed lints.envcontents in the diff or the description🤖 Generated with Claude Code