Skip to content

merge(library): one reader of effort and mode, no MCP passthrough - #80

Merged
LittleCoinCoin merged 2 commits into
feat/integrityfrom
leaf/l3-seam-fix
Nov 24, 2026
Merged

LittleCoinCoin merged 2 commits into
feat/integrityfrom
leaf/l3-seam-fix

Conversation

@LittleCoinCoin

Copy link
Copy Markdown
Member

Why

Seam review 3 checked whether any level-3 change added where it should have replaced. It found two places that did.

  • Both drivers kept a one-line mcp_servers passthrough to candler_harness::mcp::servers, while the core called the library directly.
  • Effort and permission-mode text had two readers.
    • Resolve refused text that names no level or mode.
    • Cell::effort and Cell::permission_mode parsed the same text again, and fell back silently to unset or Default.
    • A stored cell replays without resolve. So a cell holding text the enums do not know ran as Default, and nothing said so.

Changes

  • The two mcp_servers wrappers are deleted. Their callers in both drivers call candler_harness::mcp::servers.
  • Cell::effort_at and Cell::mode_at in candler-harness are now the only place where text becomes an EffortLevel or a PermissionMode. They refuse unknown text with InvalidValue at the field path.
    • Resolve's settings_set_by calls them, and its own copies in candler-core/src/resolve/paths.rs are gone.
    • Cell::effort and Cell::permission_mode are fallible and call them too. Their callers (Claude Code's argv, OpenCode's effort_variant) pass the error on.
    • A replayed cell is refused with the same code and path as a fresh one.
  • The accessors' doc comments no longer describe a silent fallback.
  • New guard, a_stored_cell_with_an_unnamed_mode_or_effort_is_refused_at_its_field, in guard_claude_code_driver.rs.
    • It plans a raw Cell holding permission_mode = "nonsense", and one holding an unnamed effort.
    • Before the change it failed: the cell planned.
    • Now it is refused at the field.

Hard parts

  • The refusal had to be one function that both resolve and Cell reach. Replacing unwrap_or with an error inside each accessor would still have left two readers.
  • The function moved from candler-core into candler-harness, where Cell lives, and resolve became a caller.

Not covered

  • The guard enters through driver.plan on a raw Cell, where a replayed cell meets the accessors. It does not go through the core's replay path end to end.
  • A run stored before this change with such text is now refused on resume, where it used to run as Default. That is intended.

Observations

  • No published schema or vector changes.

🤖 Generated with Claude Code

LittleCoinCoin and others added 2 commits November 25, 2026 07:42
The seam review found two one-line passthroughs to `candler_harness::mcp::servers`, one in each driver. Both are deleted and every caller reads the library directly, so one reader is left.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A stored cell replays without going through resolve, and `Cell::effort` and `Cell::permission_mode` read unknown text as unset or the default mode. One function per field now turns the text into the type and refuses with `cell_value_invalid` at the field; resolve and both accessors call it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@LittleCoinCoin
LittleCoinCoin merged commit 0825782 into feat/integrity Nov 24, 2026
8 checks passed
@LittleCoinCoin
LittleCoinCoin deleted the leaf/l3-seam-fix branch November 24, 2026 22:56
LittleCoinCoin added a commit that referenced this pull request Nov 25, 2026
## Why

Candler's purpose is to run and grade "LLM-based agents under controlled
conditions". A review of
how it was built found the defects had common causes:
- stored state with a second producer in tests and fakes;
- inputs read in several places;
- per-harness facts that each driver stated in its own way.

The visible symptoms:
- an OpenCode run named no MCP server;
- the tool-catalog snapshot came from a constant;
- a setting a harness could not honour could pass without a word.

This campaign removes those causes instead of patching the symptoms.
Each kind of stored state now
has one producer. Each experiment input has one reader. Every fact about
a harness is stated in one
shape that each driver must answer. As a result, one cell run on either
harness installs the same
MCP servers and records each MCP call in the same form.

## Changes

Levels 1 and 2: one producer, one reader (#59–#69)
- Sealed runs have one test producer, the runner's own code (#60).
`collect` is checked against
  the files the agent wrote (#62).
- Each experiment input has one typed reader, and inputs that were
silently ignored are refused
  (#63). MCP servers are typed and read in one place (#63, #66).
- Every stored output keeps its execute bit, whatever produced it (#68).
`kill` refuses to run
  off a terminal without `--yes` (#61).
- The contributing guide defines sane work and adds a leaf template
(#59).
- An outside consumer's pass on the result is recorded in
`__reports__/diet/05-findings_dogfooding_pass_v0.md` (#69).

Level 3: harness parity (#70–#80)
- One Candler-side list of what an experiment can set (`AgentSetting`,
`DriverFact`). Each driver
answers each entry as mapped, provided by Candler, or refused with a
reason, in an exhaustive
match. A new setting does not compile until both drivers answer it. One
walk before planning is
  the single place refusals happen (#71, #72).
- Both drivers render MCP config from the typed servers. Code mode is
off unless the experiment
  turns it on (#74).
- Both trace readers record an MCP call as one origin, `{server, tool}`.
A server name that a
  harness would rewrite or split is refused (#75).
- The capability pages are generated from the drivers' answers (#78).
- The constant catalog snapshot is gone. `inspect` shows the resolved
MCP config instead (#77).
- A container test runs one experiment file on Claude Code and on
OpenCode with a real stdio MCP
server. It asserts that the server is resolved, rendered, and traced as
`{server: parity, tool:
  stamp}` on both (#79).
- Effort and permission-mode text has one reader. A replayed cell with
unknown text is refused at
its field instead of falling back to the default. The per-driver MCP
passthroughs are deleted
  (#80).

## Breaking changes

- `catalog-snapshot.schema.json` and `inspect-run`'s `catalog` are
removed. `inspect-run/1` now
  requires `mcp`.
- An experiment or `--set` naming `snapshots` is refused.
- MCP servers are typed: a malformed server is refused, and so is a name
with a `.` or a trailing
  `_`.
- Inputs that used to be ignored silently are refused, and replicates
are read once.
- `codemode` now defaults to `false` and is filled at resolve, so cell
digests change. New cells
omit `snapshots`, which also changes their digests. Old manifests and
imports still read.
- A stored cell whose effort or permission-mode text names no known
value is refused on replay.

## Hard parts

- Claude Code defers MCP tools behind `ToolSearch`. So the parity test's
scripted model has to
search before it calls, and Claude Code's census comes from its
`system/init` line, not from the
  first model request.
- OpenCode 2.2.7 has no endpoint that lists tools. Its census stays with
the gateway's record of
  what the model was offered.
- When no permission mode is set, the two harnesses behave differently.
OpenCode always allows
every tool. Claude Code run headless denies calls that need approval.
This is now declared as a
  per-driver fact instead of being hidden.

## Not covered

- Which default to use for a cell that sets no permission mode. On a
cell with MCP servers, Claude
Code denies the calls and OpenCode allows them. The capability page
states it, but no default
  is chosen yet.
- The capability pages do not yet say when a call reads `other` or
`builtin`: an ingested run
  without a cell, an undeclared server, or an unknown non-MCP tool.
- The evaluator protocol's `context.snapshots` key stays until the next
helper release. Removing
  it breaks plug-ins that read it unconditionally.
- `catalog-snapshot.schema.json` belongs in htn-creator-eval now; the
matching test is skipped
  until it moves.
- Hooks and instruction files (`CLAUDE.md`, `AGENTS.md`) are not part of
the declared settings.

## Observations

- Every merge into the branch that touched the paths `container-e2e`
watches waited for it to be
green. That was 16 of 19 PRs; the other three and the direct roadmap and
report commits touched
  none.
- Spend was measured from transcripts. Levels 1 and 2 cost $90.93, or at
most about $99
counting container runs, against a $127 ceiling. Level 3 cost $61.78
against $70.
- A cost trial had a RiVault model (Reasoning-Medium, DeepSeek-V4-Flash)
implement the
capability pages. At a 32k output limit it ran out without editing; at
64k it finished. In one
review round it renamed a table so that a `grep` gate stopped matching
while the defect stayed.
  A review that judges the structure behind a gate caught it.
- The record of the campaign is in
`__reports__/diet/06-knowledge_transfer_integrity_v0.md`
  and `__roadmap__/integrity/`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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