fix: align ApplicationInsights packages so func host boots (S5-004r)#96
Merged
Conversation
…boots (S5-004r) Microsoft.ApplicationInsights.WorkerService 3.0.0 is OTel-based and removed classic API types (ITelemetryInitializer) that Functions.Worker.ApplicationInsights 2.50.0 is built against, so the worker died at DI bootstrap with TypeLoadException. Downgrade to 2.23.0 (latest classic 2.x) — both packages are used by Program.cs, so removal was not an option. Also: - Drop the OpenTelemetry.Api 1.15.3 pin: the vulnerable chain (GHSA-g94r-2vxg-569j) came via AI 3.0.0 -> Azure.Monitor.OpenTelemetry.Exporter and is gone on 2.23.0; `dotnet list package --vulnerable --include-transitive` is clean without it. - Register bare TacticalConfig in the composition root: OptionsSleeveManager takes the bare type (siblings take IOptions<TacticalConfig>), which failed DI graph validation on boot — a second boot-blocker previously masked by the TypeLoadException and invisible to the unit suite (tests never build the host graph). - Runbook preflight: add a host-boot smoke line (function banner + no TypeLoadException proves the worker process actually loaded). Verified by booting the real host: Azurite + func start, worker initialized, both DailyOrchestrator timers listed, stable 35s+, zero crash signatures. 590/590 tests green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…es (S5-004r) Judge fix-now items (all docs/comment-only, no behavior change): - Program.cs: document the App Insights enablement gate (registration is inert until APPLICATIONINSIGHTS_CONNECTION_STRING is set) and clarify that the HttpClient ILogger filter does not cover AI 2.x dependency telemetry. - Runbook: host-boot smoke now precedes the function-list check (steps 4-5) -- the banner is meaningless until the worker has provably booted. - Functions csproj: trace why the S5-005 OpenTelemetry.Api pin was removed (vulnerable chain only existed on the AI 3.0.0 dependency tree). - DECISIONS.md Known Debt: KD-005 (AI 2.x->3.x upgrade blocked on Functions Worker AI compatibility) and KD-006 (discord.com URI redaction required before ever enabling App Insights). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Microsoft.ApplicationInsights.WorkerService3.0.0 was incompatible withMicrosoft.Azure.Functions.Worker.ApplicationInsights2.50.0, causing the isolated worker to crash at startup withTypeLoadException: ITelemetryInitializer.TacticalConfigDI registration that also blocked host boot.Why
S5-004r rework item: the 590-test suite never boots the Functions host, so the package incompatibility shipped invisibly. The 12-week paper run (starting 2026-06-11) requires the host to stay up with all 4 timers, so host boot is now an explicit acceptance criterion.
Test plan
dotnet build TradingSystem.sln— 0 warnings, 0 errorsdotnet test TradingSystem.sln— 590/590 passed, 0 skippedfunc start, Core Tools 4.8.0 / runtime 4.1046): "Worker process started and initialized", all 4 timer functions registered (DailyOrchestrator_EndOfDay, DailyOrchestrator_PreMarket, IncomeSleeve_MonthlyReinvest, IncomeSleeve_QuarterlyAudit), no TypeLoadException🤖 Generated with Claude Code