Skip to content

merge(api): inspect shows MCP config, catalog snapshots go - #77

Merged
LittleCoinCoin merged 18 commits into
feat/integrityfrom
leaf/l3-snapshot-out-2
Nov 24, 2026
Merged

LittleCoinCoin merged 18 commits into
feat/integrityfrom
leaf/l3-snapshot-out-2

Conversation

@LittleCoinCoin

Copy link
Copy Markdown
Member

Why

inspect showed a tool catalog that a constant shell command printed: every run said servers: [], whatever MCP servers the run declared. The record of what Candler installed already exists as the resolved mcp.* values the cell digest hashes, so the constant producer, its resolve step and the surface that showed them are removed, and inspect shows the resolved values. tool-catalog-snapshot/1 has no Candler producer or reader left, so it leaves too.

Changes

  • A guard launches one declared MCP server through candler run and reads the run back through inspect, as JSON and as text. It fails on the base commit and passes on the tip; with the mcp values dropped from what inspect shows, it fails again.
  • inspect-run carries mcp (the resolved mcp.* values by path) in place of catalog.
  • Removed: the catalog program and its provider seam, the catalog resolve step, catalog_spec, the fake docker's catalog output, the blob plumbing that carried the catalog text to the seal, tool-catalog-snapshot/1 with its generated schema, fixtures and digest vectors, and the refusal codes only that code emitted. Contract pages are regenerated.
  • comparable.snapshots is optional: a cell without the key hashes without it, and a cell that carries it, even as an empty list, is written and hashed as before. Only the two importers write it (manifest import and raw ingest), so a run imported before this change keeps its key. A guard runs candler run and finds no snapshots key in the stored cell, with the run key equal to the digest of the cell as stored. The cell digest oracle gains invented-4 (no key); the vectors that carry snapshots stay and say why.
  • An experiment or --set that names snapshots is refused as an unknown path, and a guard asserts the refusal.
  • The Python evaluator helper reads context.snapshots as optional. The evaluator schema descriptions and the design doc say the field is always empty for runs Candler makes, and is kept for the released helper and stored grading contexts until a helper that treats it as optional is released.
  • README, AGENTS.md and the live candler-v1 goal name the per-run tool census.

Hard parts

  • comparable.snapshots stays as an optional field, because manifests of the maintainer's golden and imported runs list it and their digests are read from it. No existing manifest's digest moves, so the marker stays run-manifest/1.
  • The evaluator protocol's needs.snapshots and context.snapshots are kept: the released Python helper reads context["snapshots"] unconditionally and imported grading fills it, so removing them now would break plug-ins built on the released helper and move grading-context digests. The helper now reads it as optional, so the removal becomes one small step once that helper is released.
  • The schemas commit (feat(schemas)!) touches only crates/candler-schemas/, as the commit job requires, so the workspace does not build at that commit alone; the next commit restores it.
  • Tests that pinned digests, cell order, or recorded cells of planner-built cells were re-taken from the producer, because new cells hash without snapshots.

Not covered

  • container-e2e is read from this PR's CI.
  • htn-creator-eval keeps grading, but its test that validates against catalog-snapshot.schema.json now skips; the schema file needs to move into that repository.
  • Removing the evaluator-protocol snapshots key, after the next helper release: Candler stops sending it, and every grading-context digest moves, so stored grades no longer match a re-imported context.
  • The field's descriptions say "always empty for runs Candler makes"; an imported run that recorded a catalog still carries a non-empty list, and that exception is not stated where the field is described.

Observations

  • This replaces an earlier pull request with the same tree: there, the schemas commit also deleted a core digest vector, which the commit job refuses. Here that deletion moves to the runner commit that removes its producer.

  • Consumers of inspect-run/1 lose catalog and gain a required mcp. A run key for the same experiment differs from before, because the cell hash no longer holds an empty snapshot list.

  • A declared stdio server makes the runner start a probe container; the fake docker needed a top-level inspect for it.

🤖 Generated with Claude Code

LittleCoinCoin and others added 18 commits November 25, 2026 06:00
The guard launches one declared server through candler run and reads the
run back through inspect, as JSON and as text. It fails on this commit:
inspect shows only a catalog that says servers: [].

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Removes tool-catalog-snapshot/1 and its generated schema. inspect-run no
longer carries catalog; it carries mcp, the resolved mcp.* values by path.
A cell leaves comparable.snapshots out of its record and its hash when it
lists none, so a cell without snapshots hashes under a new digest; a cell
that lists them hashes as before.

BREAKING CHANGE: catalog-snapshot.schema.json and inspect-run's catalog are
removed, inspect-run requires mcp, and a cell without snapshots has a new
digest.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Deletes the constant catalog program, its capture, the resolve-time
catalog step, the provider seam, the fake docker's constant and the blob
plumbing that carried the catalog text to the seal. inspect shows the
resolved mcp.* values from the cell. The cell digest oracle gains vectors
for cells without snapshots; the vectors that list them stay for stores
that hold such manifests. The refusal codes only the removed code emitted
leave codes.toml, and the contract pages are regenerated. The README
purpose paragraph and AGENTS.md name the tool census.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
comparable.snapshots is optional: a cell without the key hashes without
it, and a cell that carries it, even as an empty list, is written and
hashed as before. No existing manifest's digest moves, so the version
marker stays run-manifest/1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The importer is the only writer of comparable.snapshots. The oracle
vector invented-1 returns to its first body and digest; invented-4 is the
shape of a new cell, without the key.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Nothing that makes a new run may set comparable.snapshots, so the path
leaves the configuration. An experiment that names it is refused as an
unknown path; drop the setting.

BREAKING CHANGE: an experiment or --set naming snapshots is refused.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The README, CONTRIBUTING and the architecture design name a run's tools
only by the resolved mcp.* values, the census and the trace; the
comparable.snapshots rule is described as the imported old shape.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The recorded comparable cells and the hand-built manifests no longer
carry a snapshots key, as a resolved cell has none, and the cells keep
the order the planner now gives them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A stream ingested before snapshots became optional was keyed with an
empty list. Raw ingest wrote none, so a second ingest found the held run
keyed by another cell and refused it as a conflict. Both importers now
write the list, as an imported run's cell carries it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An experiment that names snapshots is refused at resolve, as the new
guard shows, so no run Candler makes holds a source for that root.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The cell's snapshots key is absent for a run Candler made and present,
possibly empty, only for an imported run. The evaluator protocol's
needs.snapshots and context.snapshots are always empty for runs Candler
makes; they are kept so a released helper and stored grading contexts
stay valid, and go once a helper that treats them as optional is out.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@LittleCoinCoin
LittleCoinCoin merged commit 0197fbd into feat/integrity Nov 24, 2026
8 checks passed
@LittleCoinCoin
LittleCoinCoin deleted the leaf/l3-snapshot-out-2 branch November 24, 2026 21:13
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