Tracing adapter based on generic CBOR observation - #39
Draft
plaidfinch wants to merge 5 commits into
Draft
Conversation
A new workspace crate bridging the observation hook into the tracing ecosystem: one INFO session span per observed session (kind, protocol, ordinal), a role-elected event when the election is decided, one DEBUG stream span per directed stream, and one DEBUG event per wire item carrying its exact length and an RFC 8949 diagnostic-notation-style rendering — structure unfolded, embedded-CBOR tags shown as <<...>>, the registered atom tags named, every dimension of the rendering bounded by constants rather than by the input. Message events are stamped from a session-scoped atomic counter, dogfooding the hook's documented interleaving-reconstruction pattern. The core crate's dependency surface is untouched: the adapter lives in crates/rumors-tracing and consumes only the public API. The README is derived via tools/readme, which gains the crate in its roster.
The hook's session identity deliberately carries no ordinal (session numbering is consumer-side, like message interleaving), so the adapter counts the sessions it observes itself and stamps each session span from that internal counter; emitted vocabulary and field names are unchanged. Merges the ruling commits from the wire lane. Owner-ruled (rumors#35 follow-up rulings, 2026-08-19).
…ndaries
Three review-driven changes, all local to the adapter crate:
- The crate doc's cost sentence now states the full disabled-target
cost: the enabled check plus one relaxed atomic increment (the
message ordinal must advance even unobserved, or enabling a
subscriber mid-session would emit colliding ordinals). README
re-derived from the rustdoc.
- A concurrent-sessions test: two counterparties gossip with clones
of one observed peer's handle inside one tokio::join! on a
current-thread runtime, so the sessions interleave at await points.
It pins that the two session spans carry ordinals {0, 1} as a set
and that each session's message ordinals stay dense from 0 --
session numbering under genuine concurrency, not only sequentially.
- An unfold-budget boundary test: tag-24 embedded CBOR nested one
level past UNFOLD_BUDGET renders the innermost embedded byte string
as raw hex, pinning that the budget spans embedded-CBOR boundaries
rather than resetting at each re-parse.
Both new tests were held against their known-bad mechanisms before
landing: a budget that resets per boundary and a session counter that
stops advancing each fail the respective test.
Public crate rustdoc must not point at source-only items; the parenthetical already states why the ordinal advances unobserved.
Rumors::send is fallible: admission runs the receiver's decode and can reject. The tests now assert the sends they depend on were admitted, instead of discarding the verdict they were built to observe.
plaidfinch
force-pushed
the
tracing-adapter
branch
from
August 21, 2026 00:20
5748ba1 to
ab58e18
Compare
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.
No description provided.