Skip to content

Tech debt

No ConsoleLogService.Flush() or LogWriter.Flush() call exists in this repository, so the CRITICAL finding common to this framework does not apply here. Three HIGH-severity findings do apply, all related to error handling and batch atomicity around the Imaging API and OnBase integrations.

CRITICAL

No CRITICAL findings were identified in this repository.

HIGH

Finding Component Impact Recommended action
No per-record error isolation — one failure aborts the batch, with no compensation for records already marked processed OnBaseKeywordSync/OnBaseKeywordSyncRunner.cs, OnBaseKeywordSync/Services/KeywordUpdater.cs A single bad record stops the remaining batch and leaves earlier records already marked processed and earlier OnBase updates already applied, with no rollback Add per-record try/catch with logging and continuation, and reconcile already-processed records independently of a mid-batch failure
Records are marked processed even when no update was sent to OnBase (BR-OBKS-010) OnBaseKeywordSync/Services/KeywordUpdater.cs A skipped record (e.g., no documents to update, or values unchanged) is indistinguishable from a successfully-updated record once marked processed, which can mask missed updates Confirm this is the intended business behavior; if not, mark processed only when an update was actually sent
Async OnBase calls are fire-and-forget: the returned Task is never awaited, so faults are unobserved and success is logged unconditionally OnBaseKeywordSync/Services/OnBaseKeywordSyncClient.cs, OnBaseKeywordSync/Services/KeywordUpdater.cs A failed asynchronous OnBase update is logged as "Update sent to OnBase" and the record is marked processed, even though OnBase never applied the change Await the async call (or otherwise observe its result) before marking the record processed

Additional findings (below HIGH severity)

The following lower-severity findings were recorded during analysis and are included here for completeness, though they do not meet the CRITICAL/HIGH bar required for the primary tables above.

Finding Severity Component
MarkAsProcessedException is declared but never thrown — the intended error wrapper is unimplemented dead code Medium OnBaseKeywordSync/Exceptions/MarkAsProcessedException.cs
Extensions.LogError dereferences a possibly-null _debugLogFile and leaks an undisposed StreamWriter Medium OnBaseKeywordSync/Extensions.cs
environmentsettings/settings.yml has three false: keys where value: is required, on track enttest8 Medium environmentsettings/settings.yml
The debug log file is truncated at every start regardless of debugger state Low OnBaseKeywordSync/Extensions.cs
SAIF.Framework.Data.NHibernate is referenced but unused Low OnBaseKeywordSync/OnBaseKeywordSync.csproj
ImagingApiClient.MarkKeywordSyncSetAsProcessed and Services/KeywordUpdateResult.cs are unreferenced Low OnBaseKeywordSync/Services/
ProcessInavlidPersonKeywordSyncs and InititializeOBEFormData are misspelled in the public/private API surface Low OnBaseKeywordSync/Services/ImagingApiClient.cs, OnBaseKeywordSync/Services/OnBaseKeywordSyncClient.cs
Configuration key prefix casing is inconsistent (OnBaseKeywordSync. vs onbasekeywordsync.) Low OnBaseKeywordSync/Services/ImagingApiClient.cs
App.config ships ApplicationHost=np12, a non-production track, in source control Low OnBaseKeywordSync/App.config
LogService is registered as ILogService but never resolved, and receives no LoggerProvider despite ConfigureOpenTelemetry being wired Low OnBaseKeywordSync/Program.cs
The runner's TApp generic argument is the abstract ConsoleBase<ArgumentContainer> rather than the concrete application type Low OnBaseKeywordSync/Program.cs
Newtonsoft.Json is pinned at 8.0.3 (2016-era) with a binding redirect Low OnBaseKeywordSync/OnBaseKeywordSync.csproj, OnBaseKeywordSync/App.config

Sources

  • OnBaseKeywordSync/OnBaseKeywordSyncRunner.cs
  • OnBaseKeywordSync/Services/KeywordUpdater.cs
  • OnBaseKeywordSync/Services/OnBaseKeywordSyncClient.cs
  • OnBaseKeywordSync/Exceptions/MarkAsProcessedException.cs
  • OnBaseKeywordSync/Extensions.cs
  • OnBaseKeywordSync/Services/ImagingApiClient.cs
  • OnBaseKeywordSync/Services/KeywordUpdateResult.cs
  • OnBaseKeywordSync/App.config
  • OnBaseKeywordSync/Program.cs
  • OnBaseKeywordSync/OnBaseKeywordSync.csproj
  • environmentsettings/settings.yml