Go compliance tests and a composite GitHub Action for validating an Entire external agent binary.
This project runs protocol checks against a prebuilt external agent binary by invoking its CLI subcommands and validating the JSON responses.
It covers:
- required protocol behavior such as
info,detect, session helpers, transcript chunking, and session read/write - protocol error paths for malformed input and invalid arguments
- optional capability tests for hooks, transcript analysis, transcript preparation, token calculation, text generation, hook response writing, and subagent-aware extraction, gated by the agent's declared capabilities
- optional fixture-driven semantic checks for
detectand transcript analysis
Build your external agent binary first, then run:
AGENT_BINARY=./bin/entire-agent-your-name go test -v -count=1 -timeout=5m ./...Each test run uses an isolated HOME/XDG environment and sets the process working directory to ENTIRE_REPO_ROOT, so hook installation and config writes do not leak into the developer machine state.
If you want stronger black-box validation against real sample data, provide a fixtures file:
AGENT_BINARY=./bin/entire-agent-your-name \
AGENT_FIXTURES=./fixtures/compliance.json \
go test -v -count=1 -timeout=5m ./...Example fixture schema:
{
"detect": {
"present_repo": "../your-agent/testdata/detect-present",
"absent_repo": "../your-agent/testdata/detect-absent"
},
"transcript_analyzer": {
"session_ref": "../your-agent/testdata/transcript.json",
"offset": 0,
"position": 4,
"modified_files": ["src/main.go", "src/main_test.go"],
"prompts": ["add tests", "fix lint"],
"summary": "Done.",
"has_summary": true
}
}This repo also exposes a composite action through action.yml. It expects a path to an already-built executable.
- uses: entireio/external-agents-tests@main
with:
binary-path: path/to/entire-agent-your-name
go-version: stable
fixtures-path: path/to/compliance.jsonAGENT_BINARYis required for the test suite.AGENT_FIXTURESis optional. If set, additional semantic tests run.- The test runner sets
ENTIRE_PROTOCOL_VERSION=1andENTIRE_REPO_ROOTbefore invoking the binary.