Repository navigation
tests: csharp unmodelled-entry case follows the now-modelled hosted-service registration - #1815
Merged
Merged
Conversation
…n unregistered service Symptom: tests/run.py csharp/unmodelled-entry-not-local failed two checks on 0.1.9: impact --delete on SweepWorker (a BackgroundService that Program adds with AddHostedService<T>()) no longer printed "it extends / implements BackgroundService, which the graph does not contain", and --delete on SweepWorker.ExecuteAsync printed "NOT SAFE" instead of "NOT SAFE TO ASSUME". Cause: the C# framework-behavior pipelines rules now link an AddHostedService<T>() site to T's hook overrides (callback_registered). The registration is a real dependent, so the answer is the stronger one: NOT SAFE, with Program.<Main>$ listed as calling / registering ExecuteAsync. The library-base note is printed only when nothing in the graph uses the declaration, so it is correctly absent. The checks still described the service as an entry the graph does not model. Fix: the unmodelled-entry checks move to IdleWorker, a BackgroundService no registration in the graph names, which still gets NOT SAFE TO ASSUME and the library-base note. SweepWorker gets two checks for the modelled answer: NOT SAFE with the registration site, never NOT SAFE TO ASSUME or the dead-code verdict. No engine or query code changes. tests/run.py --lang csharp: 202 of 204 before, 206 of 206 after. graph/test/csharp/tools/pipelines-test.sh: ok. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 30, 2026 07:41
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.
csharp/unmodelled-entry-not-localin the query-layer suite (tests/run.py, which CI does not run) failed 2 checks on 0.1.9. This is not a code defect. #1769 made the engine linkAddHostedService<T>()toT.ExecuteAsync. So the case'sSweepWorkernow has a real dependent,Program.<Main>$, andimpact --deletecorrectly answers "NOT SAFE — 1 callable(s) call or receive it". The case still expected the answer for a framework entry the engine does not model.Tests only. No engine or query code changes.
IdleWorker: aBackgroundServicethat nothing registers. It still gets "NOT SAFE TO ASSUME" and the BackgroundService note.SweepWorkergets two checks for its now-modelled answer. They expect "NOT SAFE" with the registration site, and never "NOT SAFE TO ASSUME" or the dead-code verdict.Tests
tests/run.py --lang csharp: 206/206, against 202/204 before.pipelines-test.sh: ok.Follow-up (not changed here): for
SweepWorker, the tests line still says "NOT CHECKED: … the graph does not model how", although the registration is now modelled.