Skip to content

Consolidate run-dir readers behind one readRunDir — kill the N-completion-path field drift #84

Description

@jack-champagne

Problem

The run-dir file contract has one producer but N independent consumers in the extension, each hand-reading and cherry-picking fields. Every additive field has to be remembered in every reader; review is the only thing catching the misses.

Readers today:

Evidence it drifts (not hypothetical)

This is the same species as #83, but on a different boundary: #83 guards the solver↔host stdout grammar; this guards the run-dir files ↔ N extension readers boundary — the row that's missing from #83's table.

Proposed

One readRunDir(runDir): RunRecord that reads run.toml / result.toml / formulation.toml (+ pulse where needed) and returns the complete record; make RunCompletion its return type. Route every completion path through it; hydrateFromRunDir shares the low-level reads. One fixture-based test drives the shared reader and asserts the full record — so adding a field = update one reader + one fixture, and N-path divergence becomes structurally impossible (same "impossible to land green on the shared path" residual #83 relies on).

Sequencing

Land with / right after #81 — it already starts the extraction via readFormulation; finish it before more paths hand-roll their own reads. Cheap, TS-only, no Julia. Gate under #62 alongside the other run-dir contract checks.

Relates: #81, #70, #72, #83, #62, #64, #41.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase:1Live solve polish

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions