Skip to content

Log a logger's clamped timestamps the way Save Capture already does - #522

Merged
thebhef merged 1 commit into
mainfrom
task155-logger-clamp
Oct 14, 2026
Merged

thebhef merged 1 commit into
mainfrom
task155-logger-clamp

Conversation

@thebhef

@thebhef thebhef commented Sep 23, 2026

Copy link
Copy Markdown
Owner

A logger's finish line reported only the frame count, even when the
writer had to move an event forward because it arrived stamped before
the file's own anchor (ADR 0024: a frame before the anchor has no
representation in BLF and is written at the anchor instead). Save
Capture already turns that report into a system-log warning via
capture.rs's clamped_timestamp_warning; the logger's finish path, and
each size-cap split part, did not — parity, not new design, per the
task's ruling.

LogWriter::write and finish now hand the caller the closed part's
cannet_blf::FinishedCapture (Option, since a no-op close reports
nothing) instead of discarding it. run_logger turns a Some into the
same warning Save Capture emits, at the run's own finish and at every
part a size-cap split closes along the way. New host tests drive a
LogWriter through a frame stamped before its anchor and assert the
clamp is reported both ways, reusing capture::clamped_timestamp_warning
rather than writing a second formatter.

Also corrects the two sentences the driver-unwrap phase (task 155
phase 1) left claiming an upstream python-can issue tracks the Kvaser
timer-wrap defect. The owner has ruled cannet does not modify or
petition its python-can dependency, so the sidecar README and the
technology-inventory python-can entry now say the defect is worked
around locally with no upstream change pursued.

Running this task's full CI matrix (its final phase) surfaced a
rustdoc broken-intra-doc-link regression already on this branch's
base: FirstDrop's doc comment linked Self::frames_dropped_before_session
from inside FirstDrop itself (no such method there — the method is
TraceStore's), and two doc comments linked the private
crate::emitters::DropEpisode as an intra-doc link, which rustdoc
--document-private-items=false rejects. Both fixed in trace_store/mod.rs
as part of this commit, being small, unambiguous, and blocking the
rustdoc -D warnings lane.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

thebhef commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@thebhef
thebhef force-pushed the task155-logger-clamp branch from 229f9ca to 4f16288 Compare September 24, 2026 01:39
This was referenced Sep 24, 2026

thebhef commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner Author

Merge activity

  • Oct 14, 9:10 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 14, 10:24 PM UTC: Graphite rebased this pull request as part of a merge.
  • Oct 14, 10:27 PM UTC: @thebhef merged this pull request with Graphite.

@thebhef
thebhef changed the base branch from task155-drops-loud to graphite-base/522 October 14, 2026 22:18
@thebhef
thebhef changed the base branch from graphite-base/522 to main October 14, 2026 22:22
A logger's finish line reported only the frame count, even when the
writer had to move an event forward because it arrived stamped before
the file's own anchor (ADR 0024: a frame before the anchor has no
representation in BLF and is written at the anchor instead). Save
Capture already turns that report into a system-log warning via
capture.rs's clamped_timestamp_warning; the logger's finish path, and
each size-cap split part, did not — parity, not new design, per the
task's ruling.

LogWriter::write and finish now hand the caller the closed part's
cannet_blf::FinishedCapture (Option, since a no-op close reports
nothing) instead of discarding it. run_logger turns a Some into the
same warning Save Capture emits, at the run's own finish and at every
part a size-cap split closes along the way. New host tests drive a
LogWriter through a frame stamped before its anchor and assert the
clamp is reported both ways, reusing capture::clamped_timestamp_warning
rather than writing a second formatter.

Also corrects the two sentences the driver-unwrap phase (task 155
phase 1) left claiming an upstream python-can issue tracks the Kvaser
timer-wrap defect. The owner has ruled cannet does not modify or
petition its python-can dependency, so the sidecar README and the
technology-inventory python-can entry now say the defect is worked
around locally with no upstream change pursued.

Running this task's full CI matrix (its final phase) surfaced a
rustdoc broken-intra-doc-link regression already on this branch's
base: FirstDrop's doc comment linked Self::frames_dropped_before_session
from inside FirstDrop itself (no such method there — the method is
TraceStore's), and two doc comments linked the private
crate::emitters::DropEpisode as an intra-doc link, which rustdoc
--document-private-items=false rejects. Both fixed in trace_store/mod.rs
as part of this commit, being small, unambiguous, and blocking the
rustdoc -D warnings lane.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@thebhef
thebhef force-pushed the task155-logger-clamp branch from db0a5b5 to 30a8733 Compare October 14, 2026 22:23
@thebhef
thebhef merged commit 89978a1 into main Oct 14, 2026
10 checks passed
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