Commit graph

4 commits

Author SHA1 Message Date
Claude
bec76d4889
fix(evals): carry hash_surface on the CaseResult the register matrix actually uses
Corrects bf17f42, which claimed a fix that did not work.

That commit added hash_surface to evals/cognition/runner.py::CaseResult. The
test imports run_eval from evals/run_cognition_eval.py, which builds
evals/metrics.py::CaseResult — a DIFFERENT class with the same name. Thirteen
files in this repo define one. I matched on the class name instead of following
the import, so the field never reached the assertion and _diff_rows raised
AttributeError: 'CaseResult' object has no attribute 'hash_surface'. That is why
the count went 99 -> 100: the same 99 divergences, plus one error.

The diagnosis in bf17f42 was right; only its aim was wrong. Confirmed directly
at the pipeline seam:

  register=None         surface = 'Truth is what is true. pack-grounded...'
                   hash_surface = 'Truth is what is true. pack-grounded...'
  register=socratic_v1  surface = 'Consider the question: Truth is what is...'
                   hash_surface = 'Truth is what is true. pack-grounded...'

surface varies across the register axis (as it must), hash_surface does not (as
it must not), trace_hash matches. So the field added to CognitiveTurnResult in
bf17f42 is correct and stays; this moves the eval-side plumbing to the class the
test really consumes, and reverts the edit to the one it does not.

[Verification]: PARTIAL. Three registers green — socratic_v1, terse_v1,
manifesto_v1, 24 passed, where all three failed before. The full 99-register run
(~17 min) was still executing when the tree had to be committed; result to
follow, and bf17f42's DO NOT MERGE stands until it is green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FduW6Krm3PPQv3P5iwBYtx
2026-07-25 14:25:31 +00:00
Shay
9bbdcc96aa
feat(W-008): L10 Shape B hybrid engine-state persistence (#271)
* ci: re-trigger full-pytest

* docs: ADR-0146 — L10 Shape B hybrid engine-state persistence

* feat(W-008): Shape B engine-state persistence spike (ADR-0146)

* fix(W-008): eval isolation + env-var path + empty-manifest guard

- evals/run_cognition_eval.py: all ChatRuntime() calls pass no_load_state=True
  so parallel eval workers never touch engine_state/ checkpoints
- engine_state/__init__.py: honour CORE_ENGINE_STATE_DIR env var (ADR-0146 spec)
- engine_state/__init__.py: load_manifest() skips empty file instead of crashing
  (defensive against partial writes in concurrent contexts)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 11:45:54 -07:00
Shay
0eaba474ed
parallel eval runner (#46) 2026-05-19 23:51:59 -07:00
Shay
366f7a08c4
Add cognitive eval harness and calibration replay (#30)
* feat: add cognitive eval harness with CLI integration

20 eval cases across 8 categories (definition, comparison, cause,
procedure, recall, correction, verification, unknown). Metrics:
intent accuracy, term capture, surface groundedness, versor closure,
trace determinism. CLI: `core eval cognition [--json] [--report PATH]`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add operator calibration replay with deterministic grid search

Bounded parameter tuning via eval replay evidence. Grid search over
salience_top_k and inhibition_threshold with invariant regression
guard (versor closure must not regress). Frozen CalibrationParams,
before/after metrics, no pack or identity mutation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-15 07:41:36 -07:00