Fetching submissions #38

Merged
maleszka merged 43 commits from feature/submissions into main 2026-10-29 14:00:38 +01:00
Owner
No description provided.
maleszka force-pushed feature/submissions from cceaf4834d
All checks were successful
CI / build (pull_request) Successful in 27s
to dc153ddc87
All checks were successful
CI / build (pull_request) Successful in 26s
2026-10-27 22:42:27 +01:00
Compare
maleszka force-pushed feature/submissions from 8f0aa1e3fb
Some checks failed
CI / build (pull_request) Has been cancelled
to a5c008672a
All checks were successful
CI / build (pull_request) Successful in 31s
2026-10-28 20:58:53 +01:00
Compare
[api/fetchers] load initial feeds from cached_feeds
All checks were successful
CI / build (pull_request) Successful in 26s
0b8bece7dc
maleszka force-pushed feature/submissions from 0b8bece7dc
All checks were successful
CI / build (pull_request) Successful in 26s
to 4fef1f0b28
All checks were successful
CI / build (pull_request) Successful in 28s
2026-10-28 22:29:25 +01:00
Compare
Status/Code/CacheEntry/Summary and FetchedSubmission's clone/eql/lessThan/
greaterThan helpers were untested pure allocator-only logic; the CacheEntry.eql
lang-by-pointer bug fixed earlier on this branch would have been caught
immediately by the CacheEntry.eql regression test added here.
Covers both the first-page (no cursor) and next-page (id%3C cursor) branches,
previously untested since this function was added.
[api/fetchers] add tests for SubmissionsFeed's loadEntriesFromCache and dropRefAndNewer
All checks were successful
CI / build (pull_request) Successful in 25s
cfa18d5999
Both are pure, offline logic over hand-built CacheEntry fixtures: no platform
or network needed. Covers the happy-path chain reconstruction, both error
branches (SubmissionsListStartMissing, MultipleSubmissionsListStarts,
SubmissionRefIsNotUnique), the documented silent-drop behavior on a broken
prev_ref link, and dropRefAndNewer's truncation of the chain plus its
ref_to_idx/needs_update bookkeeping.
[api/fetchers] add tests for SubmissionsListFetcher's reconcile/persist/purge helpers
All checks were successful
CI / build (pull_request) Successful in 29s
ac2062f915
reconstructFeeds, saveFeedsToRelation, purgeCachedSubmits, and purgeCachedFeeds
only touch the in-memory Submission.Relation/SubmissionsFeed.Relation maps and
a hand-buildable Feed/ContestGraph, never self.platform, so they're testable
without any network or PlatformAPI instance (self.platform is left undefined
in these tests, matching how ContestGraphFetcher's own tests already isolate
MetadataTable from the platform-dependent parts of that fetcher).

Covers: feed creation/reuse/eviction across reconstructFeeds calls (including
that a reused feed keeps its own in-memory last_updated/needs_update rather
than the freshly-supplied Info), submission persistence with prev_ref
chaining, the skip-if-unchanged path (a regression test for the CacheEntry.eql
fix earlier on this branch), and both purge functions' cache/in-memory
reconciliation.

Dropped a planned test for saveFeedsToRelation's IdentifierMappingFailed path:
it logs via log.err, and this Zig version's test runner fails the whole binary
on any err-level log regardless of std.testing.log_level, with no escape
hatch - consistent with there being no existing test in this codebase that
exercises a genuine log.err call site.
maleszka changed title from WIP: Fetching submissions to Fetching submissions 2026-10-29 14:00:31 +01:00
maleszka deleted branch feature/submissions 2026-10-29 14:00:39 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
maleszka/wbij!38
No description provided.