Expand description
Hypothesis-loop mismatch classification for the agent runloop.
desirable loop: hypothesis → observation → mismatch → inspect evidence →
revise hypothesis. This module is the pure, testable core of that loop:
it names the mismatch, but never blocks, retries, or performs I/O. The
binary’s deterministic failure diagnosis calls into it to frame the
model-facing next_action; the evaluator scores the behavior.
Dimension key for MismatchEvidence (index → field → meaning):
| field | meaning when set |
|---|---|
exit_code | tool result carried this process exit status |
empty_search_no_match | grep-style exit 1 with no output inside the queried scope |
patch_mismatch | patch context/deletion lines do not match the current file |
verifier_failed | a standalone verifier reported a non-zero status |
repeated_evidence | query returned only previously seen lines/ranges |
Structs§
- Mismatch
Evidence - Structured evidence for one mismatch classification.
Enums§
- Mismatch
Kind - Named mismatch between the agent’s hypothesis and its observation.
Functions§
- append_
revision_ guidance - Append revision guidance to a deterministic
next_action. - classify_
mismatch - Classify mismatch evidence into its highest-priority kind.
- revision_
guidance - Model-facing revision guidance for a classified mismatch.