Give each run a session directory with structured events - #22
Merged
Conversation
A run now owns logs\YYYY-MM-DD\HHMMSS\, holding bootstrap.log beside events.jsonl and session.json, matching the macOS build and the managed-software tools. Every line written to the human log is also appended as a JSON record with its bracketed tag lifted into an event type and status, and session.json carries the run type, outcome, tool version, environment and counts. Retention drops day directories past the window and session directories past a cap of 100, and still sweeps the flat per-run files the old layout left.
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.
A run now owns
logs\YYYY-MM-DD\HHMMSS\, holdingbootstrap.logbesideevents.jsonlandsession.json— the same layout the macOS build and the managed-software tools use.Every line written to the human log is also appended as a JSON record, with a leading
[TAG]lifted into the event's type and status:[SUCCESS]becomesstatus: SUCCESS,[SKIPPED]becomesSKIPPED,[PROGRESS]and[SUB-PROGRESS]becomePROGRESS,[OUTPUT]becomes anoutputevent, and an unrecognised bracket is left in the message rather than invented into a type.session.jsonis written when the run starts, so a run that never finishes still leaves arunningrecord, and rewritten at the end with the outcome, duration, tool version, environment and counts.Retention now drops day directories past the window and session directories past a cap of 100, and still sweeps the flat per-run files the old layout left at the logs root. The app's log viewer lists session directories and those flat files together, newest first, and reads a stamp at either second or minute resolution.
Closes #21