Skip to main content

Module eval_context

Module eval_context 

Source
Expand description

harn eval context — deterministic context-engineering mode runner.

§.harn dispatch (W6 partial port — see harn#2306)

The evaluation pipeline (manifest load, evaluate_context_eval_manifest invocation, per-run scoring) stays in Rust — it reaches into harn_vm::orchestration::context_eval internals (mode runs, projection policies, scoring) that aren’t reachable from script-land today without G4 (#2297) exposing the orchestration surface.

The rendering layer (the markdown body of summary.md, the one-line human summary, the --json pretty form) is delegated to crates/harn-stdlib/src/stdlib/cli/eval/context.harn. The Rust shim pre-serialises the ContextEvalReport to JSON, forwards it via [CONTEXT_REPORT_ENV], dispatches three times (markdown for summary.md, summary for stdout, optional JSON for stdout when --json is set), and writes the captured payloads to disk / real stdout. The artifacts that need byte-identical serde output (summary.json, per_run.jsonl) stay on the Rust side because Harn’s json_stringify_pretty sorts dict keys alphabetically and the on-disk format is consumed by the regression-check / hosted ingestion paths that depend on the serde struct-field order.

HARN_CLI_IMPL=rust keeps the legacy direct-render path for the parity-snapshot harness (#2299) until the C1 ratchet (#2314) lands.

Functions§

run