Commit Graph
4 Commits
Author SHA1 Message Date
sneak 276a3c81ad Bound each shutdown stage by the stop deadline (closes #100)
check / check (push) Canceled after 0s
Shutdown passes its context to every stage: the streamer, the four
handlers, the WHOIS fetcher, the database maintainer and the HTTP server
each stop waiting when it ends. A handler then skips its last write and
logs how many updates it did not write, and the HTTP server closes the
connections still open. The database is checkpointed and closed last,
and left open once the deadline has passed, since a write may still
hold it. The stop hook gives Shutdown 8 seconds and fx 9, inside the 10
seconds upaas and docker stop allow, so a stop signal exits 0.

Model: opus-5-5
2026-10-19 23:13:03 +00:00
clawbot 28df9f8d49 Drain the handler queues before stopping the handlers on shutdown (closes #69)
check / check (push) Canceled after 0s
Shutdown stopped the handlers before the streamer, so updates still in the
handler queues, up to 20,000 per queue, were not written, and a lost
withdrawal left its route in the table after a restart.

Shutdown now stops the streamer first. Streamer.Stop queues the STATE
messages it holds for a full queue, closes the queues and returns once
every worker has handed its handler everything on its queue; then each
handler writes what it holds before its Stop returns. PeeringHandler.Stop
now waits for its loop's final write instead of running a second one
beside it.

Model: opus-5-5
2026-10-19 13:08:48 +02:00
clawbot 3667d09800 Count every peer the feed has heard from in bgp_peer_count (closes #74)
check / check (push) Canceled after 0s
bgp_peer_count grew only on OPEN messages, so it started at 0 while
updates arrived from hundreds of peers whose sessions were already up, and
it kept peers whose sessions had gone down. Now any message from a peer
adds it to the streamer's peer set, and a NOTIFICATION or a STATE message
whose state is down removes it without adding it first. The rule is in
updatePeers, called for every message.

Model: opus-5-5
2026-10-19 12:24:49 +02:00
clawbot b89987e356 Re-vendor the shared files from sneak/prompts at 0653579 (closes #52)
check / check (push) Canceled after 0s
Takes .golangci.yml, .dockerignore, .gitignore, .editorconfig, the
workflow and REPO_POLICIES.md from sneak/prompts 0653579, with this
repository's own entries after the shared content. Lint (golangci-lint
v2.14.0) and test are Dockerfile phases that script/lint and script/test
build alone with a new CACHEBUST value, keeping Go's and golangci-lint's
caches; the image build depends on both. make fmt and make fmt-check also
format the markdown with prettier, pinned in yarn.lock. The agent
guidance moves to AGENTS.md. The Go code is fixed for what the new
configuration finds, and the AS and prefix detail reads now return the
rows' error after their loops.

Model: opus-5-5
2026-10-19 12:10:11 +02:00