What is wrong. The home page cards of #154 are worked out once, at startup, and never again. Server.Start (internal/server/server.go) runs keepHomeCardsFresh on the context fx passes to OnStart, and fx ends that context once start-up is done, 15 seconds in (internal/routewatch/cli.go). The refresh loop then stops. On a fresh start the cards keep saying the table has no route; found by the review of #210, which ran the image for 2.5 minutes and 338,000 routes. The other background parts use context.WithoutCancel for this reason.
What acceptable looks like. The cards are worked out again every minute for as long as the server runs, and the loop stops when the server stops.
Definition of done.
A test that fails on the current code: a server started with a context that ends right after Start still refreshes the cards later.
The fix in internal/server; one reviewed PR into next.
Model: opus-5-5
**What is wrong.** The home page cards of https://git.eeqj.de/sneak/routewatch/issues/154 are worked out once, at startup, and never again. `Server.Start` (`internal/server/server.go`) runs `keepHomeCardsFresh` on the context fx passes to `OnStart`, and fx ends that context once start-up is done, 15 seconds in (`internal/routewatch/cli.go`). The refresh loop then stops. On a fresh start the cards keep saying the table has no route; found by the review of https://git.eeqj.de/sneak/routewatch/pulls/210, which ran the image for 2.5 minutes and 338,000 routes. The other background parts use `context.WithoutCancel` for this reason.
**What acceptable looks like.** The cards are worked out again every minute for as long as the server runs, and the loop stops when the server stops.
**Definition of done.**
- A test that fails on the current code: a server started with a context that ends right after `Start` still refreshes the cards later.
- The fix in `internal/server`; one reviewed PR into `next`.
Model: opus-5-5
clawbot
self-assigned this 2026-10-27 22:23:03 +01:00
Built in #212. The loop that works out the home page cards now runs until Server.Stop, not until the start-up context ends. Stop ends the loop and waits for it before it shuts the HTTP server down. A new test checks both on a fake clock.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/routewatch/pulls/212. The loop that works out the home page cards now runs until `Server.Stop`, not until the start-up context ends. `Stop` ends the loop and waits for it before it shuts the HTTP server down. A new test checks both on a fake clock.
Model: opus-5-5
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.
What is wrong. The home page cards of #154 are worked out once, at startup, and never again.
Server.Start(internal/server/server.go) runskeepHomeCardsFreshon the context fx passes toOnStart, and fx ends that context once start-up is done, 15 seconds in (internal/routewatch/cli.go). The refresh loop then stops. On a fresh start the cards keep saying the table has no route; found by the review of #210, which ran the image for 2.5 minutes and 338,000 routes. The other background parts usecontext.WithoutCancelfor this reason.What acceptable looks like. The cards are worked out again every minute for as long as the server runs, and the loop stops when the server stops.
Definition of done.
Startstill refreshes the cards later.internal/server; one reviewed PR intonext.Model: opus-5-5
Built in #212. The loop that works out the home page cards now runs until
Server.Stop, not until the start-up context ends.Stopends the loop and waits for it before it shuts the HTTP server down. A new test checks both on a fake clock.Model: opus-5-5