Skip to content

Drop idle connections and resend reset requests; selection-colour ticks; ticker picker wording - #52

Merged
robdevops merged 4 commits into
mainfrom
claude/kind-newton-ad0z2q
Oct 19, 2026
Merged

robdevops merged 4 commits into
mainfrom
claude/kind-newton-ad0z2q

Conversation

@robdevops

Copy link
Copy Markdown
Owner

Summary

Three follow-ups to #51.

  • Stale connections: the shared HTTP session reuses connections, and a server closes one left idle, so the next request on it failed with a reset (errno 104) and a chart went as text.
    • net.fresh drops a host's connections that have been unused for 20 seconds before the next request to that host.
    • Transport.sent sends a request the server reset once more, whole: a chart is sent again as a chart, not as its heading plus text. If the first copy did arrive despite the reset, it comes twice.
    • This covers every network, since it's in the shared posting code.
  • Button colour: a ticked toggle uses each network's selection colour instead of green: Telegram blue (primary), Discord blurple (style 1). Slack keeps its single selection style, primary, which is green. A toggle that is off stays red.
  • Wording: CLAUDE.md and a test docstring said "tickers menu" for what the rest of the code and docs call the ticker picker.

Testing

  • .venv/bin/python -m unittest discover -s tests -b: 640 tests pass, including new ones for the idle drop and the resend.
  • util/record_outputs.py: 293 steps identical.
  • I could only test the reset with a simulated one, not a real Telegram reset. After deploying, look for "was reset, sending it again" in the log.

Generated by Claude Code

A toggle that is on (a ticked ticker in the .price picker) is drawn as
the button shown now is: Telegram's primary (blue) and Discord's style 1
(blurple), in place of success and style 3 (green). Slack has one
selection colour, primary, which is green, and keeps it. A toggle that
is off stays red.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVEkZofdPjQ4jtXFKipeUX
CLAUDE.md and a test docstring said "tickers menu" for what the rest of
the code and docs call the ticker picker.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVEkZofdPjQ4jtXFKipeUX
…again

The shared session reuses connections, and a server closes one left idle:
the next request on it failed with a reset (errno 104), and a chart that
met it went as text.

- net.fresh: a host's connections unused for 20 seconds are dropped before
  the next request to it, so a stale one is never reused.
- Transport.sent sends a request the server reset once more, whole (a
  chart as a chart), and only then gives up as before; net.was_reset reads
  the reset through requests' and urllib3's wrapping. At worst a message
  that did arrive comes twice.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JVEkZofdPjQ4jtXFKipeUX
@robdevops
robdevops merged commit 698f75d into main Oct 19, 2026
4 checks passed
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