Repository navigation
Experiment records: hypothesis, prediction, measured gap, reflection - #28
Open
AdvayMonga wants to merge 2 commits into
Open
AdvayMonga wants to merge 2 commits into
AdvayMonga wants to merge 2 commits into
Conversation
- New ledger kinds `hypothesis` and `reflection`, written by the agent's `hypothesis` and `reflect` tools.
- bench, equiv, submit, profile, trace, kernel and hostprof require `hypothesis_id` (an open hypothesis of the run)
and `expect` {metric, value, unit: absolute|change_pct, why}; refused while the run's latest measured record has
no reflection.
- The measured record carries `experiment`: the prediction, the measured value, the gap and the noise band, or why
the lab could not compute the measured counterpart. Held-out records may carry it (gap from the aggregate).
- The brief lists the run's hypotheses with their measurements and reflections.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A refused call (nothing measured) carries no experiment and needs no reflection. - A held-out record's experiment block is checked: known fields, scalar values only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AdvayMonga
force-pushed
the
feat/experiment-records
branch
from
October 12, 2026 15:12
69155f3 to
beccf81
Compare
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.
Stacked on #27. Decided 2026-10-11: no measured number without the agent's reasoning beside it, and no reasoning without the number.
What
New
hypothesisandreflecttools write ledger kindshypothesis(hypothesis, rationale, optionalabandon_ifandfrom_record) andreflection(record, reflection, optionalalternative).bench,equiv,submit,profile,trace,kernelandhostprofrequire:hypothesis_id: an open hypothesis of this run;expect: metric, value, unit (absoluteorchange_pctvs the run's baseline), why.They also refuse a call while the run's latest measured record has no reflection. So the order is always hypothesis → prediction → measurement → reflection.
The measured record carries
experiment: the prediction, the measured value the lab resolved from the result, the gap, and the noise band. When the lab can't compute the measured value,actual_missingsays why (e.g. a trace has no scalar metric; the reflection carries it).Held-out
submitrecords may carry the block; its gap comes from the agent-visible aggregate.The tool's reply ends with the prediction, the measurement and the gap, as facts.
The brief lists the run's hypotheses with their measurements and reflections.
Enforcement is at the agent's tool boundary: direct harness calls (baseline, tests) are unaffected.
Tests:
tests/test_lab_experiments.pycovers schema, refusals, the gap for absolute, change and submit, blocking until reflected, and the summary. The scripted session tests now file hypotheses. Full suite passes; ruff clean.🤖 Generated with Claude Code