Skip to content

tests: csharp unmodelled-entry case follows the now-modelled hosted-service registration - #1815

Merged
swapnilpaliwal-sd merged 1 commit into
0.1.9from
fix/cs-unmodelled-entry-case
Sep 30, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
0.1.9from
fix/cs-unmodelled-entry-case

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

csharp/unmodelled-entry-not-local in 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 link AddHostedService<T>() to T.ExecuteAsync. So the case's SweepWorker now has a real dependent, Program.<Main>$, and impact --delete correctly 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.

Tests

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.

…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
swapnilpaliwal-sd merged commit 36fa701 into 0.1.9 Sep 30, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the fix/cs-unmodelled-entry-case branch September 30, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant