fix(debug): trace mode creates empty session dirs and overwrites trace.json (#1814)#1819
Merged
fix(debug): trace mode creates empty session dirs and overwrites trace.json (#1814)#1819
Conversation
…erwrites
When running with --dump-format trace, TracingCollector was initialized
with the base dump dir, causing all sessions to write to the same
base_dir/trace.json (overwriting on every run). Each session also left
behind an empty timestamped subdir since DebugDumper created it but
TracingCollector never wrote into it.
Fix: pass the session subdir (dumper.dir()) to TracingCollector::new()
so trace.json lands at {base_dir}/{ts}/trace.json, consistent with the
per-session layout used by json/raw dump formats.
Fixes #1814
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.
Summary
TracingCollector::new()was receiving the base dump dir instead of the per-session timestamped subdir, causing all trace sessions to write to the same{base_dir}/trace.json(overwriting on every run)DebugDumpercreated it butTracingCollectornever wrote into itdumper.dir()(the session subdir) toTracingCollector::new()sotrace.jsonlands at{base_dir}/{ts}/trace.json, consistent with the per-session layout used byjson/rawdump formatsTest plan
cargo nextest run -p zeph-core --lib— all 1846 tests passcargo clippy --workspace --features full -- -D warnings— zero new warningstrace_format_skips_legacy_numbered_filesto reflect new behavior (session dir containstrace.json, no longer empty){base_dir}/{ts}/trace.jsonwith no overwriteFixes #1814