Skip to content

Export a Command's whole Trace as local OTLP JSON Lines - #1058

Merged
JacobStephens2 merged 3 commits into
issue-700from
issue-991
Oct 22, 2026
Merged

JacobStephens2 merged 3 commits into
issue-700from
issue-991

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

thirdshift logs <command> --export <dir>
  Command record → Command → Runs → stages
  every Session trace → retained spans + log records
  <dir>/spans.jsonl + <dir>/logs.jsonl

Exports one complete local Trace, including child Runs, with the Command record's times. Adds CLI help and guide documentation. Nothing is sent anywhere.

Closes #991

Evidence

  • Before: cargo test --test export_trace trace_only_sessions_export_once_even_when_the_record_names_the_old_log failed with duplicate span ID in Trace.
    After: normalizing Session paths before deduplication passes the regression.
  • CLI tests decode the exported files with OpenTelemetry's official types, check parent closure and record times, and cover Pickup run → Spec run → Tickets in one Trace.
  • Before: the full selection and CI caught help_is_a_compact_reference_with_a_link_to_the_details failing at 66 lines.
    After: advertising export on the existing logs row passes cargo test --test command_surface help_is_a_compact_reference_with_a_link_to_the_details; the 65-line limit remains intact.
  • cargo check, formatting, and guide generation checks pass. The Linux CI job passed the full Rust suite and clippy with warnings denied on exact head ceb23e0 (9m24s job execution, including setup and compilation).
  • /usr/bin/time -p scripts/affected-tests origin/issue-700 passed all 36 site browser tests locally. Following docs/testing.md, its duplicate Rust run was stopped once the exact-head CI suite passed: 710.21s local wall time, including 18.37s Rust compilation. This interrupted local Rust run is not counted as a passing suite.
  • Console browser CI passed on its single rerun after a test setup race accessed an uninitialized EventSource. No Console changes were needed.

Test seams

  • The thirdshift logs <command> --export <dir> CLI and its two exported OTLP JSON Lines files, decoded with OpenTelemetry's official types; retained show --json observations provide Command record times and child ownership.

Review coverage

Independent Standards and Spec reviews use issue-700 at upstream commit f21fc0072493ac62563c2ea2d2620f4b8c1e5a92 (the local checkout of that branch was older). Both read all nine changed files, including site/docs/index.html; no generated exclusions or unread changed files. Standards raised one P3 test-duplication judgment, resolved and verified in 170c237. Spec found no issues. Reports are retained in .thirdshift-review-hW56iY/standards.md and spec.md with each axis's final files-read list.

The coordinator checked the later help-text correction in src/main.rs (ceb23e0) against the existing compact-help regression test.

Unaddressed findings

Standards

None. The single finding was addressed.

Spec

None.

Merge Danger

Door: two-way

Blast Radius: logs

Adds an explicit local export operation. Existing export files are refused. Incomplete ancestry or malformed Session trace requests fail before publication.

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit 7ded763 into issue-700 Oct 22, 2026
24 of 25 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-991 branch October 22, 2026 05:06
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