Skip to content

fix(workbench): read the grafted closing span past a doubled marker - #2745

Open
zancas wants to merge 1 commit into
devfrom
sync_ab_doubled_close
Open

fix(workbench): read the grafted closing span past a doubled marker#2745
zancas wants to merge 1 commit into
devfrom
sync_ab_doubled_close

Conversation

@zancas

@zancas zancas commented Aug 26, 2026

Copy link
Copy Markdown
Member

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

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>
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