Skip to content

fix(parses): ingest never awaits Census — guild resolve is cache/store-only inline - #194

Merged
VortexUK merged 1 commit into
mainfrom
fix/ingest-zero-census
Jul 28, 2026
Merged

fix(parses): ingest never awaits Census — guild resolve is cache/store-only inline#194
VortexUK merged 1 commit into
mainfrom
fix/ingest-zero-census

Conversation

@VortexUK

Copy link
Copy Markdown
Owner

Summary

Root-caused from a user's failed upload (2026-07-28 19:33Z): a never-seen uploader's inline Census guild lookup hit a degraded Census (TimeoutErrors all evening in the Railway log) and blew the ACT plugin's 20 s HttpClient timeout — the upload "failed" client-side while the server committed the parse anyway ~5 s later (7.5 MB parses.db WAL right after the abort).

  • _resolve_uploader_guild_async gains allow_census (default False). Response path: character_cache (any age, get_stale) → durable census_store → never-seen ⇒ CENSUS_UNAVAILABLE.
  • The endpoint then reuses the existing outage machinery: commit with guild_name=NULL, schedule _backfill_encounter_guild (BackgroundTasks) which opts in with allow_census=True for the live lookup + roster prewarm after the response.
  • Combatant snapshots were already zero-Census inline — the handler now never waits on Census at all.

Follow-up (plugin repo): bump the 20 s HttpClient timeout.

Test plan

  • New: response-path resolve asserts Census is never called for a never-seen uploader and returns the backfill marker; backfill path asserts live lookup + prewarm fire with allow_census=True.
  • All 57 ingest tests green; full suite 1640; ruff + pyright clean.

🤖 Generated with Claude Code

…e-only inline

2026-07-28 incident: a never-seen uploader's inline Census guild lookup
hit a degraded Census and blew the ACT plugin's 20s HttpClient timeout -
the upload "failed" client-side while the server committed the parse
anyway ~5s later.

_resolve_uploader_guild_async now takes allow_census (default False):
the response path serves from character_cache (any age) then the durable
census_store; a never-seen uploader returns CENSUS_UNAVAILABLE, the
encounter commits with guild_name=NULL, and the existing
_backfill_encounter_guild background task (now allow_census=True) does
the live lookup + roster prewarm after the response. Combatant snapshots
already worked this way - the handler is now zero-Census end to end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VortexUK
VortexUK merged commit 13901d7 into main Jul 28, 2026
6 checks passed
@VortexUK
VortexUK deleted the fix/ingest-zero-census branch July 28, 2026 20:07
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.

1 participant