fix(workbench): read the grafted closing span past a doubled marker - #2745
Open
zancas wants to merge 1 commit into
Open
fix(workbench): read the grafted closing span past a doubled marker#2745zancas wants to merge 1 commit into
zancas wants to merge 1 commit into
Conversation
Commit a6a973d gave zingolib/src/lightclient/sync.rs its own committed SYNC_SPAN markers, so on a modern arm the sync-ab graft now wraps an already instrumented launch and every session closes its span twice: the committed line bare, the grafted line carrying the output count. closing_span split the whole log on the close marker and examined the segment between the first two occurrences, which ends immediately before the grafted line and therefore never contains the count. The reader returned nothing forever, every modern arm burned its full 3600-second warm-up budget, and the comparison aborted while the session log looked healthy. The reader now takes its reading from the last complete line that carries both the close marker and the count, examining only text up to the final newline so a truncated line still yields no reading. Arms without committed markers, such as the zingolib_beta_ironwood tag, close once and are read as before. A falsifier test pins the doubled-close case. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Problem
Commit a6a973d added committed SYNC_SPAN markers to zingolib/src/lightclient/sync.rs. The sync-ab graft wraps that already instrumented launch. Each session therefore closes its span twice. The committed line is bare. The grafted line carries the output count.
closing_span split the whole log on the close marker. It examined only the segment between the first two occurrences. That segment never contains the count. The reader returned nothing forever. Every modern arm burned its full 3600-second warm-up budget. The comparison aborted while the session log looked healthy.
Fix
The reader now takes its reading from the last complete line that carries both the close marker and the count. It examines only text up to the final newline. A truncated line still yields no reading. Arms without committed markers close once and are read as before. A falsifier test pins the doubled-close case.
Verification
cargo check, clippy, and fmt are clean. The fixed rig completed two full A/B comparisons on 2026-08-25 with 0.05% and 0.00% output drift.
🤖 Generated with Claude Code