Skip to content

Tech debt

The most significant finding for WorkCalendar is that its wrapper, WorkCalendarServiceProxy, is never invoked by any other repository source — every operation it exposes is dead code from this repository's perspective, even though the wrapper itself calls all four generated operations correctly*.

Findings

Severity Finding Evidence Recommendation
High WorkCalendarServiceProxy has no in-repository caller — none of its four methods is reached end-to-end from any business code in this repository No call site to WorkCalendarServiceProxy found anywhere outside its own declaration (Services/SAIF.Services.Web.Proxies/WorkCalendarServiceProxy.cs)* Confirm whether the wrapper is genuinely unused (candidate for removal) or is consumed by a caller outside this repository's scope; if unused, remove it to reduce maintenance surface
High No timeout, retry, or circuit-breaking is configured for any of the four operations WorkCalendarServiceProxy.cs:16-19 (binding constructed with all defaults) Add an explicit timeout and a bounded retry policy, given the operations are idempotent lookups safe to retry
Medium Dispose() calls Close() only, with no Abort() fallback for a faulted channel WorkCalendarServiceProxy.cs:49-65 Wrap disposal in a try/catch that calls Abort() on CommunicationException or TimeoutException
Medium No cancellation support on any operation WorkCalendarServiceProxy.cs:25,30,36,42 Not applicable to the synchronous ClientBase<T>-generated members without regenerating the reference with async support
Low An unwired configuration value workCalendarServiceUrl exists in an environments file but is not read by any repository source Services/SAIF.Services.WebApi/EnvironmentApi/App_Data/environments.xml* Confirm whether this value is a leftover, or is intended to supply WorkCalendarServiceProxy's constructor argument and is simply not yet wired up
Low Idempotent, side-effect-free lookups (IsWorkingDay, NextWorkDay, FirstWorkDayOfMonth, LastWorkDayOfMonth) have no caching despite being safe to cache WorkCalendarServiceProxy.cs:25,30,36,42* Consider a short-lived cache keyed by (date, calendar) if a caller is added, to reduce load on SAIFDates†

Note: Statements marked with † are derived from dependency library documentation via the Legends CLI. Statements marked with * were inferred from code structure or contextual evidence. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Services/SAIF.Services.Web.Proxies/WorkCalendarServiceProxy.cs
  • Services/SAIF.Services.WebApi/EnvironmentApi/App_Data/environments.xml