Skip to content

fix(945): correct five stale comments, narrow the elisp retry handler - #949

Merged
mdorman merged 9 commits into
mainfrom
issue-945-stale-comments
Aug 13, 2026
Merged

fix(945): correct five stale comments, narrow the elisp retry handler#949
mdorman merged 9 commits into
mainfrom
issue-945-stale-comments

Conversation

@mdorman

@mdorman mdorman commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Closes #945.

Five in-source comments that described machinery the code no longer has, plus the one real behaviour defect they exposed.

The behaviour fix

jaunder--create-with-retry documented retrying "a signalled transport error or a 5xx", but its condition-case caught bare error — so it retried any signalled condition, including the configuration error raised when auth-source holds no entry for the blog. A user with no stored credential waited through two backoffs (~3s) for a message that was available on the first attempt.

The handler now catches plz-error. condition-case matches by hierarchy, so plz-curl-error / plz-http-error still retry; a configuration error surfaces at once. The docstring is unchanged — narrowing is what makes it true.

The existing exhaustion test stood in for a transport failure with (error "boom"), encoding the same wrong model; it now signals a real plz-curl-error with plz's own data shape. A new test pins one attempt and zero backoff for a configuration error.

plz is now required directly rather than arriving via jaunder-transport: condition-case silently never matches a condition symbol no define-error has run for, so a transitive require made that a failure mode nothing would catch.

The comment corrections

Site Was Now
host/src/metrics.rs "Helper arguments are bounded enums" bounded enums or a &'static str from a closed set — atompub_request's op is the second case
xtask/src/server_fn_coverage/extract.rs ×4 server-fn-tracing writes the span name #[macros::server] derives it (#714)
docs/observability.md same claim same fix
docs/adr/0081-*.md same claim dated annotation; decision prose untouched
web/src/audiences/component.rs Invalidator::patched — no such method client::reactive::patched
flake.nix "The 7 non-compiling static checks" count dropped

Two deviations from the issue as filed, both deliberate:

On item D, the count was dropped rather than corrected 7→8. This was its third home; a count in prose that no gate checks is the drift itself. tools/devtool/src/check.rs keeps its count, where the number sits beside ALL.

No ADR: nothing here is a new decision.

Deferred

#948 — the posts::api::listing collision example in the flow-coverage docs (three sites plus ADR-0081) appears unreachable under the macro's placement rule (#358). Found by the branch review, in lines this branch was editing; left out because it needs a real judgement about whether the module check is still load-bearing, not a wording fix.

Verification

cargo xtask validate green, e2e included. Both review axes run: spec conformance found all eleven acceptance criteria delivered with no scope creep; standards found no hard violations.

jaunder--create-with-retry documented retrying a signalled transport error or a
5xx, but its condition-case caught bare 'error' — so any signalled condition was
retried, including the configuration error raised when auth-source holds no
entry for the blog. A user with no stored credential waited through two backoffs
for a message that was available on the first attempt.

Narrow the handler to plz-error, the condition a transport failure actually
raises. condition-case matches by hierarchy, so plz-curl-error and
plz-http-error are still caught; a configuration error now surfaces at once. The
docstring is unchanged — narrowing is what makes it true.

The exhaustion test signalled a bare 'error' to stand in for a transport
failure, encoding the same wrong model; it now signals a real plz-curl-error
with plz's own data shape. A new test pins the first-attempt failure and zero
backoff for a configuration error.

Refs #945
The module doc said helper arguments are bounded enums, so a call site can never
emit an unbounded attribute. Not every helper is enum-derived: atompub_request
takes op: &'static str, supplied by atompub_op — a matched-route-plus-method
lookup. The invariant the sentence protects holds; the mechanism it names does
not cover every case.

Adopt the wording docs/ARCHITECTURE.md already carries: bounded enums, or a
&'static str from a closed set the call site cannot widen.

Refs #945
Four comments in the flow-coverage extractor attributed web.<vertical>.<ident>
to the server-fn-tracing gate. The macro derives it: #[macros::server] emits the
#[tracing::instrument] with the name (#714). The gate enforces PII discipline —
a recordable-type default-deny, a refusal to skip pattern-bound parameters by
name, and a refusal of unmodelled attribute arguments — and authors nothing.

The forward-matching rationale is untouched: the extractor computes every
candidate from the inventory because the naming regime can change again, which
is a claim about the code as it stands.

ADR-0011 is dropped from these citations for the name; its span-name half is
partly superseded by #714.

Refs #945
Two more copies of the error #945 found in the extractor comments. Neither was
reached by the #927 replay: observability.md is not ARCHITECTURE.md, and
ADR-0081 was annotated for other claims but not this one. Both are documents a
reader consults before the source, so leaving them would preserve the wrong
mental model in the most-read place.

observability.md is live prose and is edited. ADR-0081 records a decision, so it
gets a dated annotation in the form ADR-0052 already uses; its original bullet
stands. The decision the bullet records — match the name forward from the
inventory, never invert it — is unchanged, and the regime moving a third time
without an extractor edit is evidence for it.

Refs #945
Two unrelated stale claims from #945, both one line.

The audiences component credited Invalidator::patched for the in-place patch
plumbing. Invalidator has no such method; the symbol is the free function
client::reactive::patched, called two lines below the comment.

flake.nix said "the 7 non-compiling static checks" — there are eight. Rather
than correct the number, drop it: this was its third home, and a count in prose
that no gate checks is the drift itself. The issue reference stays, and the live
list is pub const ALL in tools/devtool/src/check.rs, where the number sits
beside the thing it counts.

Refs #945
Branch-review follow-ups.

jaunder-publish.el reached plz only transitively through jaunder-transport, but
the narrowed retry handler now dispatches on the plz-error condition — and
condition-case silently never matches a condition symbol no define-error has run
for. A transitive require makes that a silent, testable-only-by-luck failure, so
require plz where it is used.

Also reword the ADR-0081 annotation: it said the regime "moved a third time"
while the extractor comment and observability.md both say the repo has had two
naming regimes. Both are true of different things (authorship vs name shape) and
the juxtaposition read as a contradiction.

Refs #945
@mdorman
mdorman enabled auto-merge August 13, 2026 00:56
@mdorman
mdorman added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit 46cf7b6 Aug 13, 2026
7 checks passed
@mdorman
mdorman deleted the issue-945-stale-comments branch August 13, 2026 01:12
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.

Five stale in-source comments found while rebuilding the architecture view

1 participant