Skip to content

fix(debug): trace mode creates empty session dirs and overwrites trace.json (#1814)#1819

Merged
bug-ops merged 1 commit intomainfrom
debug-trace-session-dir
Mar 15, 2026
Merged

fix(debug): trace mode creates empty session dirs and overwrites trace.json (#1814)#1819
bug-ops merged 1 commit intomainfrom
debug-trace-session-dir

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 15, 2026

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)
  • Each session also left behind an empty timestamped subdir since DebugDumper created it but TracingCollector never wrote into it
  • Fix: pass dumper.dir() (the session subdir) 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

Test plan

  • cargo nextest run -p zeph-core --lib — all 1846 tests pass
  • cargo clippy --workspace --features full -- -D warnings — zero new warnings
  • Updated test trace_format_skips_legacy_numbered_files to reflect new behavior (session dir contains trace.json, no longer empty)
  • Manual: run two trace sessions, confirm each produces {base_dir}/{ts}/trace.json with no overwrite

Fixes #1814

…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
@github-actions github-actions bot added bug Something isn't working size/S Small PR (11-50 lines) documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate and removed bug Something isn't working size/S Small PR (11-50 lines) labels Mar 15, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 15, 2026 14:00
@bug-ops bug-ops merged commit e11b945 into main Mar 15, 2026
15 checks passed
@bug-ops bug-ops deleted the debug-trace-session-dir branch March 15, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(debug): --dump-format trace creates empty session dirs and overwrites trace.json

1 participant