feat(cli): output_schema for sim + batch render archive; review nits (v1.5)#438
Merged
Merged
Conversation
Extend run.json output_schema to simulation runs and fold in the output_schema review's low-severity findings. - sim: each sim leaf's run.json declares its traj.tsv column schema (t → time, compartments → state, flow_* → flow), classified from the in-memory artifacts before the atomic commit via a new RecordMeta.output_schema attached at build time. Batch runs also archive model.render.json beside model.ir.json at the ensemble output_dir. - classify is unified: reserved axis/key/prefix names plus a table-specific default (Diagnostic for fit traces, State for trajectories), so one classifier serves fit and sim. - F1: document the naming assumption (reserved vocabulary vs model parameter names — safe because camdl params are epidemiological, never column names). - F2: read the first READABLE chain's trace header, not merely the lexicographically-first directory, so a crashed/absent early chain no longer drops the trace entry. - F4: TableRole::Trace doc covers optimizer traces (if2/nlopt), not only samplers. Verified: a single simulate leaf carries the trajectory schema; a batch run writes model.render.json paired with model.ir.json. Proposal: docs/dev/proposals/2026-07-15-run-output-column-schema.md
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.
output_schema for sim + batch render archive + review nits (v1.5)
Follow-up to #436 (fit
output_schema) and #437 (render). Extends both tosimulation runs and folds in the adversarial review's low-severity findings.
sim
run.jsondeclares itstraj.tsvcolumn schema (t→time,compartments→state,
flow_*→flow), classified from the in-memory artifactsbefore the atomic commit — a new
RecordMeta.output_schemaattached at buildtime (the sim path knows its files up front, unlike the streaming fit path
which sets it at finalize).
model.render.jsonbesidemodel.ir.jsonat the ensembleoutput_dir.
classify unified
One classifier for fit and sim: reserved axis/key/prefix names + a
table-specific default (
Diagnosticfor fit traces,Statefor trajectories).review nits
names; safe because camdl params are epidemiological).
lexicographically-first dir (a crashed/absent early chain no longer drops it).
TableRole::Tracedoc covers optimizer traces (if2/nlopt).Verified: single simulate leaf carries the trajectory schema; a batch run
writes
model.render.jsonpaired withmodel.ir.json.Deferred: predict/survey/profile
output_schema; single-simulate render(mirrors the existing no-
model.ir.json-for-single-sim behavior); anintegration test for the archives.