Repository navigation
LIST ACTIVE: answer 403 when no news server gave a first list - #383
Merged
Merged
Conversation
When the news server refused LIST ACTIVE (or could not be reached) and the cache had no active list yet, CServer::active set the retry mark, which made the empty list look fresh: LIST ACTIVE, LIST ACTIVE.TIMES and NEWGROUPS answered 215/231 with nothing, as if the server had no groups, in that session and every other one for ACTIVE_RETRY_SECONDS. Now a first fill that got a list from no server keeps the first-fill mark, records the time in the refresh lock file (.active.refresh) and reports the list as missing; those commands answer 502. A session that waited for the lock, or comes within ACTIVE_RETRY_SECONDS (60), finds that time and answers 502 without asking the servers again; after that the next session fetches. updatenews -a still always fetches. A list that exists keeps the retry mark as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
go vet (run by go test) rejects a variable as client.Conn.Cmd's format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The failed first fill's time held other tries off for ACTIVE_RETRY_SECONDS even when Timeouts gives the active list a shorter TTL; the retry mark for a list that exists uses the shorter of the two. With Timeouts 1, TestUpstreamCutOffActive's second session two seconds later was no longer sent upstream. Use the same shorter time. The manual said .active.refresh holds no data: it now holds that time. (Review council round 1, Sonnet.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its short-build part (the list fetched again after the 2-second retry time) ran nowhere: the step has a fixed list of tests. (Review council round 1, Fable.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RFC 3977 3.2.1: 502 is permanent, 403 a temporary problem; the client may ask again once the news server gives its list. (Maintainer's choice, 2026-11-16.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Other failures answer 403 as well; only this case's reply ('no active
list') shows that the missing list was detected. (Review council,
Sonnet.)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comments only. (Review council round 2, Sonnet's note.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erns With several Read patterns, any_complete was set after each pattern's reply. A server that answered the first pattern (with no groups) and then refused the next pattern and the plain LIST ACTIVE counted as having given its list, so on a fresh cache LIST ACTIVE answered an empty 215 again instead of 403. Now the server counts once every pattern's reply was read. TestListActiveRefusedOnePattern. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
go-while
added a commit
that referenced
this pull request
Nov 17, 2026
…1.3.23 Folds the changes/ entries merged into main since the last sync and removes them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the news server refuses LIST ACTIVE (or can't be reached) and the cache has no active list yet, NewsCache answered
215with an empty list: clients saw a server without groups. It now answers403(RFC 3977 3.2.1: a temporary problem, try again later).Before: the failed first fill set the retry mark (
ACTIVE_RETRY_SECONDS), so the empty list looked fresh to this session and every other one for 60 s. LIST ACTIVE, LIST ACTIVE.TIMES and NEWGROUPS sent nothing.Now (
CServer::active, NServer.cc):.active.refresh, 8 bytes) and reports the list as missing (CServer::active_missing()).ACTIVE_RETRY_SECONDS(60), or the active TTL (Timeouts) if shorter. After it the next session fetches..active.refresh("holds no data") is updated.updatenews -a(wait_for_refresh) always fetches.403 the news server gave no active list, try again later. GROUP is unaffected.Tests:
TestListActiveRefusedOnePattern(one Read pattern answered with no groups, the next one and plain LIST ACTIVE refused: 403, not an empty 215) andTestListActiveRefusedFreshCache(tests/e2e/active_test.go): upstream refuses bothlist active *andlist active; the five commands get 403; a second session gets 403 without a new upstream LIST ACTIVE (normal build); GROUP still 211; in the short-limit build, after the 2-second retry time a new session gets the list.Test-host runs (jobq.sh, head 0f5a8a3): Debian 13 full make check PASS; Fedora 46 short-limit build, the active/deadline tests PASS; main + the new test only on Fedora 45: FAIL as expected (empty 215).
council r2: terra 9.5, sonnet 9 (r1: sonnet 5, terra 6, fable 9); fresh check at 366083f: sonnet 8, luna-low 9, luna-high 10, luna-max 8 (found the Read-pattern case, fixed in 2db3b65). Test-host runs at 2db3b65: Debian 13 make check PASS; the new test fails on 366083f (empty 215).
🤖 Generated with Claude Code