Activity on an IRC listener connection now keeps its user from being removed by the idle cleanup.
GetSessionByToken set last_seen on the session and the client for every authenticated HTTP API request; nothing did that for the IRC listener, so its users were removed SESSION_IDLE_TIMEOUT after connecting however active they were. Those two UPDATEs now live in UpdateLastSeen, which GetSessionByToken and the IRC listener's handleMessage both call. handleMessage calls it for every command from a registered client, PING, PONG and unknown commands included, before running the command. Both last_seen rows in README.md now count IRC listener commands.
What the diff does not show:
The new test checks GetStaleOrphanSessions, the query by which the cleanup in internal/handlers picks the users it removes; the cleanup loop itself cannot be reached from internal/ircserver.
WHOIS idle time for an IRC listener user now counts from their last command, PING included, as it already counted from the last request for HTTP API users.
#120 rewrites the same README.md rows and adds a sentence saying an IRC listener client counts as idle from when it connected; whichever merges second must drop that sentence.
Judgement call: the refresh runs on every command, with no minimum interval between writes. It is the same two writes every HTTP API request already makes, and an interval would add state to every connection.
Failed refresh: GetSessionByToken still ignores it, as before; the IRC listener logs it and runs the command anyway.
Model: opus-5-5
Activity on an IRC listener connection now keeps its user from being removed by the idle cleanup.
`GetSessionByToken` set `last_seen` on the session and the client for every authenticated HTTP API request; nothing did that for the IRC listener, so its users were removed `SESSION_IDLE_TIMEOUT` after connecting however active they were. Those two UPDATEs now live in `UpdateLastSeen`, which `GetSessionByToken` and the IRC listener's `handleMessage` both call. `handleMessage` calls it for every command from a registered client, `PING`, `PONG` and unknown commands included, before running the command. Both `last_seen` rows in `README.md` now count IRC listener commands.
What the diff does not show:
- The new test checks `GetStaleOrphanSessions`, the query by which the cleanup in `internal/handlers` picks the users it removes; the cleanup loop itself cannot be reached from `internal/ircserver`.
- WHOIS idle time for an IRC listener user now counts from their last command, `PING` included, as it already counted from the last request for HTTP API users.
- https://git.eeqj.de/sneak/neoirc/pulls/120 rewrites the same `README.md` rows and adds a sentence saying an IRC listener client counts as idle from when it connected; whichever merges second must drop that sentence.
Judgement call: the refresh runs on every command, with no minimum interval between writes. It is the same two writes every HTTP API request already makes, and an interval would add state to every connection.
Failed refresh: `GetSessionByToken` still ignores it, as before; the IRC listener logs it and runs the command anyway.
Model: opus-5-5
Every command a registered IRC listener client sends, PING and PONG
included, now sets last_seen on its session and its client, so the
idle cleanup no longer removes an IRC user who is still active; one
who sends nothing for SESSION_IDLE_TIMEOUT is still removed. The two
UPDATEs that GetSessionByToken ran for every authenticated HTTP API
request move into UpdateLastSeen, which both transports now call. The
IRC listener refreshes on every command, with no interval between
writes: that is what every HTTP API request already costs. README.md
describes last_seen to match.
Model: opus-5-5
PASS: every command from a registered IRC listener client now refreshes last_seen through the same UpdateLastSeen the HTTP API uses, which meets the definition of done of #121.
Model: opus-5-5
PASS: every command from a registered IRC listener client now refreshes `last_seen` through the same `UpdateLastSeen` the HTTP API uses, which meets the definition of done of https://git.eeqj.de/sneak/neoirc/issues/121.
Model: opus-5-5
clawbot
merged commit ccb2bf7960 into next2026-10-08 10:47:56 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Activity on an IRC listener connection now keeps its user from being removed by the idle cleanup.
GetSessionByTokensetlast_seenon the session and the client for every authenticated HTTP API request; nothing did that for the IRC listener, so its users were removedSESSION_IDLE_TIMEOUTafter connecting however active they were. Those two UPDATEs now live inUpdateLastSeen, whichGetSessionByTokenand the IRC listener'shandleMessageboth call.handleMessagecalls it for every command from a registered client,PING,PONGand unknown commands included, before running the command. Bothlast_seenrows inREADME.mdnow count IRC listener commands.What the diff does not show:
GetStaleOrphanSessions, the query by which the cleanup ininternal/handlerspicks the users it removes; the cleanup loop itself cannot be reached frominternal/ircserver.PINGincluded, as it already counted from the last request for HTTP API users.README.mdrows and adds a sentence saying an IRC listener client counts as idle from when it connected; whichever merges second must drop that sentence.Judgement call: the refresh runs on every command, with no minimum interval between writes. It is the same two writes every HTTP API request already makes, and an interval would add state to every connection.
Failed refresh:
GetSessionByTokenstill ignores it, as before; the IRC listener logs it and runs the command anyway.Model: opus-5-5
PASS: every command from a registered IRC listener client now refreshes
last_seenthrough the sameUpdateLastSeenthe HTTP API uses, which meets the definition of done of #121.Model: opus-5-5