Skip to content

#134 feat: the consumer loop logs its recovery after a failure run - #141

Merged
gregoryfoster merged 4 commits into
mainfrom
134-consumer-recovery-log
Nov 16, 2026
Merged

gregoryfoster merged 4 commits into
mainfrom
134-consumer-recovery-log

Conversation

@gregoryfoster

Copy link
Copy Markdown
Member

Refs #134

The consume loop now logs its recovery: the first good step after one or more failed steps logs one INFO consumer loop recovered with after_failures (Replicator's shape, CannObserv/replicator#193), then resets the count. No record on a good step after none, nor when a stop ends a backoff.

  • src/processor/consumer.py: a failures count beside backoff in run(); docstring.
  • tests/test_consumer.py (integration): fail×3 then good → 1 record (after_failures == 3, INFO, after the WARNINGs); two runs → [2, 1]; good only → none; stop during a backoff → none; the boot path (broker.invalid unresolved twice) → one record with after_failures == 2, after consuming.
  • Spec: Amended 2026-11-16 entry, §3 Health clause. NETWORK.md § Tailnet flaps: signature, a query for the INFO record (-p warning hides it), the window's end. MONITORING.md: one line.
  • Plan: docs/plans/2026-11-16-134-consumer-recovery-log.md. Brief check: Consumer loop logs no recovery after a failure run (backoff resets silently) #134 comment 6928995289.

No contract, wire, lock or processor_version change. Deploy = restart.

🤖 Generated with Claude Code

gregoryfoster and others added 4 commits November 16, 2026 20:53
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first good step after one or more failed steps logs one INFO
`consumer loop recovered` with `after_failures`, then resets the count
(Replicator's shape, replicator#193). No record on a good step after
none, nor when a stop ends a backoff. Spec Amended entry and §3 Health;
NETWORK.md's flap signature, query and window; MONITORING.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…every WARNING

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p_after

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gregoryfoster
gregoryfoster merged commit 1b5e306 into main Nov 16, 2026
3 checks passed
@gregoryfoster
gregoryfoster deleted the 134-consumer-recovery-log branch November 16, 2026 21:10
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