You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consolidate the duplicated helpers across Infrastructure projects #754
Several small helpers exist as verbatim copies across Infrastructure, and one copy has already drifted into a bug (the culture-sensitive timestamp parse, issue #723). Backlog.SharedKernel holds only Results, Handlers and Ai, so there is no natural home yet. Found in the 2026-09-27 repository review.
Context
Verified identical bodies:
TrimForMessage three times: AzureFoundryChatClient.cs line 261, AzureFoundryCostClient.cs line 256, AzureFoundryEmbeddingsClient.cs line 125 (all under src/Infrastructure/Backlog.Infrastructure.AzureFoundry).
Rfc3339 three times: GitHubActivityBaselineClient.cs line 166, GitHubActivityClient.cs line 1037, ClaudeUsageClient.cs line 366.
PullRoute, Retired and WatermarkAfter three times each across TaskSyncClient/TaskSyncSession, Sessions/SessionSync* and Annotations/AnnotationSync* in src/Infrastructure/Backlog.Infrastructure.Sync, differing only by route constant or timestamp property.
Unavailable/Expired exception factories three times across the Cosmos replicas in src/Infrastructure/Backlog.Infrastructure.Cosmos.
OpenAsync plus PRAGMA journal_mode = WAL plus CREATE TABLE IF NOT EXISTS boilerplate three times: SqliteTaskRepository.cs line 268, Inbox/SqliteInboxRepository.cs line 287, Roadmap/SqliteRoadmapPlanRepository.cs line 157, and each runs the DDL on every open.
Add Backlog.SharedKernel/Text (or a per-project Internal static where the helper is truly project-local) for TrimForMessage, Rfc3339 and the timestamp parse.
Make the sync replica's route/retired/watermark trio one generic ReplicaRoutes<T> with a selector.
Extract a SqliteSchema.EnsureAsync(connection, ddl) that runs once per process per path, and one OpenAsync that sets WAL.
Add a test per extracted helper so behaviour is pinned before the copies are deleted.
Activity
JSdotNet commentedon Sep 30, 2026
The issue sweep opened draft pull request #902 for this issue. Its body lists what could not be proved by a test.