Skip to content

test(e2e): live validation of ACP agents, docs and ADR acceptance - #77

Open
FreshlyBrewedCode wants to merge 4 commits into
acp/remove-opencodefrom
acp/validate-docs
Open

FreshlyBrewedCode wants to merge 4 commits into
acp/remove-opencodefrom
acp/validate-docs

Conversation

@FreshlyBrewedCode

@FreshlyBrewedCode FreshlyBrewedCode commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

This is the last layer of the ACP stack. It validates the whole change live, updates the docs, and accepts ADR 0013.

  • Live leg (docs/findings/14-acp-live-leg.md). Setup:
    • factory serve on a spare port (3067), never 3005;
    • a scratch project scaffolded with factory init;
    • a local bare origin and a fake gh, so no write-back reaches GitHub;
    • a test db;
    • the UI driven with playwright-cli.
  • Docs cover agent and model choice, agent.default / models / hostSettings, --agent/--model, and the requirements: a Claude login, or opencode on PATH.
  • ADRs:
    • ADR 0013 is accepted, with the implementation's amendments.
    • ADR 0007 is superseded.
    • ADR 0012 gets a note that §3/§6 are amended.
    • Finding 13 gets "Later corrections".
  • Fix (this layer): fix(web): every page load logged a TypeError (import.meta.env is undefined in factory serve's bundle).

Scenario results

# scenario result
1 implement-issue (implement → test → fix → test → structured pr-metadata → write-back) on Claude/haiku, started from the UI pass: 57.0 s, $0.104. Run detail shows 24.5k/200k ctx · $0.059 per step
2 the same on opencode/big-pickle, started with factory start --agent opencode and watched in the UI pass: 133.6 s. The branch collided and was retried with a suffix (D32)
3 two concurrent runs, one per agent pass: 1 and 2 overlapped for 45 s, and no processes were left
4 opencode external_directory ask pass: an ask for /tmp/…/outside, answered always; file written, tree clean
5 agent crash mid-turn (kill -9) the step fails with the exit code and stderr tail. But the agent's in-flight tool processes are orphaned → #74
6 error from an agent pass: a provider error (opencode-go/…-contributor) fails the step with the agent's message. Refusal (RUN_ERROR) could not be provoked live: Anthropic's test string gave end_turn on haiku and sonnet. The fake-agent unit test covers it
7 cancel from the UI (Claude, opencode) pass: 0 of 4 / 0 of 2 processes alive 3 s later
8 daemon SIGTERM with both agents mid-tool pass: exits in 108 ms, both runs RunCancelled, 0 of 6 processes alive 3 s later. #73's 1 s-vs-2 s concern did not show (agents settle cancel in ms) and is noted in #74

ADR 0013 amendments (from #69/#71/#72/#73 handoffs and this leg)

  • §2:
    • the model is always set (claude-agent-acp reports the user's model, not the one it runs);
    • an unresolved model fails at step start, not run start;
    • there is no built-in model;
    • the run level is --agent/--model / POST /api/runs agent.
  • §3:
    • the opencode isolation mechanism: XDG_CONFIG_HOME + a shell.env plugin + OPENCODE_TEST_HOME (undocumented);
    • the credential env vars the scrub keeps;
    • residue: Claude Code sources a snapshot of the operator's login shell (~/.claude/shell-snapshots). This is accepted, because CLAUDE_CONFIG_DIR holds the login.
  • §4: write-back's data/ cleanup was removed.
  • §5:
    • cost is the latest reported;
    • Claude's mid-turn window is 1M;
    • the acp.tool-call chunk.
  • §6:
  • Replay corpus format.

Issues filed

Checks

  • bun run check: green (451 tests).
  • nix develop --command bun run test:e2e: 17 passed.

Closes #67
Part of #62

🤖 Generated with Claude Code

FreshlyBrewedCode and others added 4 commits October 2, 2026 20:59
factory serve's Bun bundle leaves import.meta.env undefined, so every
page load logged a TypeError from the Agentation check (seen in #67's live leg).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Finding 14: the implement-issue round trip on claude/haiku and
opencode/big-pickle concurrently, an external_directory ask, agent
crash, provider error, UI cancel and daemon shutdown. Finding 13 gains
the corrections later layers proved (reported vs running Claude model,
absolute cwd, mid-turn window, tool titles).

Refs #74, #75, #76

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ADR 0013 is accepted, with the implementation's amendments recorded:
- always set the model;
- a step-start model failure;
- opencode isolation via XDG_CONFIG_HOME + shell.env plugin + OPENCODE_TEST_HOME;
- the shell-snapshot residue;
- latest-reported cost and the mid-turn window;
- acp.tool-call;
- the absolute cwd;
- process cleanup (#74).
ADR 0007 is marked superseded, and ADR 0012 notes that §3/§6 are
amended.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Site docs, README and the factory init template now cover:
- agent/model at every level and the resolution rule;
- agent.default, agent.models and hostSettings;
- --agent/--model;
- a Claude login or opencode on PATH.
AGENTS.md now describes the ACP runtime and gives opencode/big-pickle
and Claude haiku/sonnet as the test models.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@FreshlyBrewedCode
FreshlyBrewedCode added this pull request to stack #70 October 2, 2026 21:06
@FreshlyBrewedCode FreshlyBrewedCode changed the title acp/validate docs test(e2e): live validation of ACP agents, docs and ADR acceptance Oct 2, 2026

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.

test(e2e): live validation of ACP agents, docs and ADR acceptance

1 participant