Seam
Repositories that compare a caller-supplied DateTimeOffset against a SQLite-stored TEXT timestamp column rely on the caller passing UTC. PR #1421 (issue #1403) fixed the four known boundary sites and hardened them with .ToUniversalTime() at the bound, after its review empirically confirmed EF's SQLite mapping preserves the source offset — a non-UTC bound compares as an offset-preserving string, not as an instant.
Gap
LlmQueueRepository.GetStuckProcessingNonCaptureAsync (the proven parameterized pattern #1421 mirrored) — and potentially other query sites — pass the caller's DateTimeOffset through without normalizing to UTC. Today every caller passes UTC, so behavior is correct; but the invariant is enforced by convention only. A future caller passing a local-offset value would silently compare by offset-preserved string and mis-select rows (the exact failure class PR #1421's review caught and fixed at its own sites, severity HIGH there).
Suggested direction
Sweep backend/src/Taskdeck.Infrastructure/Repositories/ for every raw-SQL or interpolated query that binds a DateTimeOffset parameter compared against a stored TEXT timestamp; either add .ToUniversalTime() at the bind site (cheap, local, matches #1421's pattern) or centralize via a small helper. Add one regression test per fixed site with a non-UTC-offset bound (the DeleteOldEntriesAsync_WithNonUtcCutoff_ComparesByInstant_NotOffsetPreservedString test from PR #1421 is the template).
Provenance
Seeded from PR #1421's implementation round (issue #1403), overnight run 2026-07-18 — the worker's residual note flagged the convention-only invariant; tracked per review policy (no silent drops).
Seam
Repositories that compare a caller-supplied
DateTimeOffsetagainst a SQLite-stored TEXT timestamp column rely on the caller passing UTC. PR #1421 (issue #1403) fixed the four known boundary sites and hardened them with.ToUniversalTime()at the bound, after its review empirically confirmed EF's SQLite mapping preserves the source offset — a non-UTC bound compares as an offset-preserving string, not as an instant.Gap
LlmQueueRepository.GetStuckProcessingNonCaptureAsync(the proven parameterized pattern #1421 mirrored) — and potentially other query sites — pass the caller'sDateTimeOffsetthrough without normalizing to UTC. Today every caller passes UTC, so behavior is correct; but the invariant is enforced by convention only. A future caller passing a local-offset value would silently compare by offset-preserved string and mis-select rows (the exact failure class PR #1421's review caught and fixed at its own sites, severity HIGH there).Suggested direction
Sweep
backend/src/Taskdeck.Infrastructure/Repositories/for every raw-SQL or interpolated query that binds aDateTimeOffsetparameter compared against a stored TEXT timestamp; either add.ToUniversalTime()at the bind site (cheap, local, matches #1421's pattern) or centralize via a small helper. Add one regression test per fixed site with a non-UTC-offset bound (theDeleteOldEntriesAsync_WithNonUtcCutoff_ComparesByInstant_NotOffsetPreservedStringtest from PR #1421 is the template).Provenance
Seeded from PR #1421's implementation round (issue #1403), overnight run 2026-07-18 — the worker's residual note flagged the convention-only invariant; tracked per review policy (no silent drops).