Skip to content

EMRY-016: Run metadata files (run.meta, config.json, summary.json) - #61

Merged
vxfemboy merged 1 commit into
mainfrom
emry-016-run-metadata
Jun 25, 2026
Merged

EMRY-016: Run metadata files (run.meta, config.json, summary.json)#61
vxfemboy merged 1 commit into
mainfrom
emry-016-run-metadata

Conversation

@vxfemboy

Copy link
Copy Markdown
Member

Closes EMRY-016 (#14). Branched off main. Completes M1.

What

emry-store/src/meta.rs:

  • RunMetaFile + Summary structs; run_dir_name / create_run_dir for the logs/{project}_{timestamp}/ layout; write_json helper.
  • A dependency-free UTC epoch→YYYYMMDD_HHMMSS formatter (Hinnant civil_from_days) — avoids pulling in a date crate.

emry-engine/src/session.rs: Engine::start writes run.meta (v4 run_id, start_time, mode) + config.json; finish writes summary.json (duration, reason, steps, dropped). RunConfig gains a mode field.

Verification

  • ./scripts/pre-commit-rust.sh green: clippy -D warnings, 43 engine + 17 store tests, meta.rs 100% / session.rs 96% lines, total 97.99%
  • Ran the demo: the run dir now contains all five files; confirmed run.meta (v4 uuid + "file" mode) and summary.json (200 steps, COMPLETED) contents.
  • Timestamp formatter tested at epoch 0 (19700101_000000) and a known 2021 value.

Review

A focused review verified the civil_from_days transcription against Hinnant's reference (era/day-of-era/month/day math, negative-z truncation, constants) — correct. Two 'important' findings examined and declined as non-bugs (.and() error priority is intentional; the create_run_dir clock-fallback concern is pre-existing and unused by the engine).

emry-store::meta adds the run-directory layout: RunMetaFile + Summary structs,
run_dir_name/create_run_dir for logs/{project}_{timestamp}/, and a
dependency-free UTC epoch->YYYYMMDD_HHMMSS formatter (Hinnant civil_from_days).
Engine::start writes run.meta (v4 run_id, start_time, mode) + config.json;
finish writes summary.json (duration, reason, steps, dropped). RunConfig gains
a mode field. Demo now emits the full five-file layout.
@vxfemboy
vxfemboy merged commit 2534280 into main Jun 25, 2026
3 checks passed
@vxfemboy
vxfemboy deleted the emry-016-run-metadata branch June 25, 2026 04:27
@vxfemboy vxfemboy mentioned this pull request Jun 25, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant