Skip to content

sync: the per-peer diagnostic was silent, not quiet - #70

Merged
myobie merged 1 commit into
mainfrom
fix/reconcile-diagnostic-was-silent
Aug 24, 2026
Merged

sync: the per-peer diagnostic was silent, not quiet#70
myobie merged 1 commit into
mainfrom
fix/reconcile-diagnostic-was-silent

Conversation

@myobie

@myobie myobie commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

What this changes

#69 shipped an instrument that emits nothing. The per-peer reconcile timing
went out at debug!. The daemon's default validation filter is fabric=info
(validation_log_filter, src/daemon.rs). The line was dropped before reaching
the log.

I merged it, cut a release, rolled it to Silber, then found three sync passes
and zero reconcile_peer lines
. Three passes is the positive control: the
absence was the filter, not an idle daemon. Without that check I would have read
an empty result as "reconcile is rare" and been wrong a fourth time in one
evening.

The fix is one word. At ~4.6 lines/min against the ~15 that log already writes,
INFO is proportionate, and a diagnostic nobody can read is not cheaper than one
they can.

The test is the point of this PR, and I argued against it in #69

I wrote there:

A test asserting that a log line fires would need a subscriber-capture harness
and would mirror the change rather than check it.

The first half was true. The second half was wrong, and it cost a merge, a
release and a deploy.

It is not a mirror. It pins the interaction between two things written far
apart, in different files: the level a diagnostic chooses, and the filter the
daemon actually runs. Either can move without the other, and neither file
mentions the other.

the_default_validation_filter_passes_info_and_drops_debug builds the shipped
default filter, installs it with a capturing writer, emits one INFO and one DEBUG
event on the validation target, and asserts the first arrives and the second does
not.

What was verified, and what was not

Platform: macOS 15 on arm64 (Silber). Linux is CI's.

  • cargo test --lib — 238 passed, 0 failed.
  • cargo test --bins — 12 passed, 0 failed.

I watched it fail in the exact shape of the bug. Changing the probe to
debug! reproduces #69, and the test reports an INFO diagnostic on the validation target must reach the log, got: with an empty log.

Not verified: the per-peer split itself. That is the next step — deploy this,
then read whether the relay-routed peer dominates. The measurement #69 existed to
take has still not been taken.

The general lesson, since this is the second instance tonight

An instrument that cannot be read is worth less than no instrument, because it
looks like data. This is the same family as a green test on a behaviour that
never happens, and the same family as #67, where a test that could not compile
kept every check green.

#69 shipped the per-peer reconcile timing at `debug!`. The daemon's
default validation filter is `fabric=info`, set in
`validation_log_filter`. So the line was dropped before it reached the
log, and the instrument emitted NOTHING.

I merged it, cut a release, rolled it to Silber, and then found three
sync passes and zero `reconcile_peer` lines. Three passes is the positive
control: the absence was the filter, not an idle daemon. Without that
check I would have read an empty result as "reconcile is rare" and been
wrong a fourth time in one evening.

The fix is one word, `debug!` to `info!`. At about 4.6 lines a minute
against the roughly 15 that log already writes, INFO is proportionate,
and a diagnostic nobody can read is not cheaper than one they can.

THE TEST IS THE POINT OF THIS COMMIT, AND I ARGUED AGAINST IT IN #69.

I wrote there: "A test asserting that a log line fires would need a
subscriber-capture harness and would mirror the change rather than check
it." The first half was true. The second half was wrong, and it cost a
merge, a release and a deploy.

It is not a mirror. It pins the INTERACTION between two things written
far apart and in different files: the level a diagnostic chooses, and the
filter the daemon actually runs. Either can move without the other, and
neither file mentions the other.

`the_default_validation_filter_passes_info_and_drops_debug` builds the
shipped default filter, installs it with a capturing writer, emits one
INFO and one DEBUG event on the validation target, and asserts the first
arrives and the second does not.

I WATCHED IT FAIL IN THE EXACT SHAPE OF THE BUG. Changing the probe to
`debug!` reproduces #69, and the test reports "an INFO diagnostic on the
validation target must reach the log, got: " with an empty log.

Verified on macOS 15 arm64: 238 lib tests, 12 bin tests, all pass.

Agent: Silber.fabric
@myobie
myobie merged commit 1e20282 into main Aug 24, 2026
2 checks passed
@myobie
myobie deleted the fix/reconcile-diagnostic-was-silent branch August 24, 2026 18:29
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