Skip to content

Stop counting yourself, and say when a request has not finished - #46

Merged
kristianwind merged 1 commit into
mainfrom
beacon-and-log-fixes
Sep 1, 2026
Merged

kristianwind merged 1 commit into
mainfrom
beacon-and-log-fixes

Conversation

@kristianwind

Copy link
Copy Markdown
Owner

Two things found while chasing a third.

The collector counted its own instance

Kristian asked whether he was collecting from himself. He was:

beacon_pings:   c5b20da4…  v0.4.5   last seen 31/8 00:24
this instance:  c5b20da4…            ← the same id
beacon.enabled = 0

So "installations: 1" meant "nobody else has installed this" while reading as "one person out there is running it". Those are opposite answers to the only question the beacon exists to ask, and on mimir.guide the difference between zero users and one is the entire signal.

Self is excluded from every figure now, including the version breakdown. Excluded rather than subtracted, so a stale row from before the sender was switched off does not linger either — his still says v0.4.5 while the instance runs v0.5.3.

The off state was never broken, incidentally: the last ping was sent while the beacon was still on.

A request that never finished left no trace

The line is written after the handler returns, so a handler still running writes nothing. That cost half an hour today: a request failed in a browser, the log was empty, and I read "no line" as "it never arrived" — when the log could not tell those apart. It was only settled by sending the same request with curl and watching it appear.

A request still running after five seconds now says so. Paired with the completion line it gives the duration; standing alone it says the request never finished, which is the case that was invisible.

At info, not warning. An opinion from the AI layer takes 20–30 seconds by design — the production log showed one at ms=32362 while this was being written — so a warning on every one of them is an alarm nobody reads by the end of the week. A test pins the level, because "make it a warning, it's important" is exactly the change somebody makes later.

🤖 Generated with Claude Code

Two things found while chasing a third.

**The collector counted its own instance.** Kristian asked whether he
was collecting from himself; he was. The production table held one row,
and its instance_id was the instance's own — so "installations: 1" meant
"nobody else has installed this" while reading as "one person out there
is running it". Those are opposite answers to the only question the
beacon exists to ask, and on mimir.guide the difference between zero
users and one is the whole signal.

Self is now excluded from every figure, including the version
breakdown. Excluded rather than subtracted, so a stale row from before
the sender was switched off does not linger either — his row still says
v0.4.5 while the instance runs v0.5.3.

**A request that never finished left no trace.** The line is written
after the handler returns, so a handler still running writes nothing.
That cost half an hour today: a request failed in a browser, the log was
empty, and I read "no line" as "it never arrived" when the log could not
tell the two apart. It was only settled by sending the same request with
curl and watching it appear.

A request still running after five seconds now says so. Paired with the
completion line it says how long something took; standing alone it says
the request never finished, which is the case that was invisible.

At info, not warning, and that is the whole of the second decision: an
opinion from the AI layer takes twenty to thirty seconds by design — the
production log shows one at 32362 ms while this was being written — so a
warning on every one of them is an alarm nobody reads by the end of the
week. There is a test pinning the level, because "make it a warning, it
is important" is exactly the change somebody would make later.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kristianwind
kristianwind merged commit c80083f into main Sep 1, 2026
3 checks passed
@kristianwind
kristianwind deleted the beacon-and-log-fixes branch September 1, 2026 12:46
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.

2 participants