D5-S16 — The administration shell - #223
Open
The-Running-Dev wants to merge 5 commits into
Open
The-Running-Dev wants to merge 5 commits into
The-Running-Dev wants to merge 5 commits into
Conversation
Adds the administration shell: a separate front-end build (shell/) with no
.NET package, consuming four new ordinary endpoints on the sample host
(/api/me, /api/organizations/{id}/switch, /api/entitlement, /api/audit) that
carry the same permission declarations every other sample endpoint does.
Registers Organizations, Billing and Licensing on the sample host so those
endpoints have something real to read. Adds AdministrationShellTests.cs
(the switch-endpoint HTTP round trip and the I-W1 shell-call-list assertion)
and a package-graph test that no .NET project references the shell.
Referencing Sample.Web from the test project (added for S16's shell-call- list assertion) copies its appsettings.json into the test assembly's own output directory as a side effect of Microsoft.NET.Sdk.Web's content items. Left in place, ASP.NET Core's default configuration loading picks that file up in every test that builds a WebApplication, silently overriding Settings.Required()'s :memory: connection string with Sample.Web's own "Data Source=sample.db" -- a single real file every parallel test class would then contend for. Deletes it after build.
A_cancelled_call_writes_no_audit_record_and_never_completes_the_invoker hangs indefinitely -- confirmed with VSTest's --blame-hang and SDK trace logging, both locally and on a clean CI runner. Traced to ModelContextProtocol.Core 2.2.0's client: cancelling CallToolAsync's CancellationToken over streamable-HTTP aborts the client's own wait but never sends notifications/cancelled, so the server-side invoker's token is never triggered. Matches a confirmed, open upstream defect, modelcontextprotocol/csharp-sdk#1365, whose fix (PR #1377) is unmerged. Platform's own server-side wiring is correct and unaffected. Tracked in #224 to re-enable once a fixed SDK version ships.
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 changed, and why. Adds the administration shell (D5-S16): a separate front-end build (
shell/) with no .NET package, consuming four new endpoints on the sample host —/api/me,/api/organizations/{id}/switch,/api/entitlement,/api/audit— mapped and permission-gated the same way/ordersalready is. The endpoints live on the sample host rather than in a new module because the modules they read (IOrganizationApi,IEntitlementEvaluator,ILicenceState,IAuditReadApi) already declare exactly the C# surface the contract calls for; HTTP mapping is a hosting concern the contract leaves to whoever composes a deployment, the same way/ordersand/boomalready are. Organizations, Billing and Licensing are now registered on the sample host so those reads have something real behind them.Closes #184
Verified
Ran and passed:
build.yml / build — Test—dotnet test --no-build --configuration Release --verbosity normal: Total tests: 457, Passed: 456, Skipped: 1, 40.90s. The one skip isMcpInvocationTests.A_cancelled_call_writes_no_audit_record_and_never_completes_the_invoker, quarantined with full documentation — it hangs on a confirmed, open upstream bug inModelContextProtocol.Core2.2.0's client (Cancellation support via CancellationToken's fails modelcontextprotocol/csharp-sdk#1365: cancelling a clientCancellationTokenover streamable-HTTP never sendsnotifications/cancelled, so the server-side invoker's token is never triggered), unmerged fix at csharp-sdk#1377. Confirmed the root cause with VSTest's--blame-hangand SDK trace logging; Platform's own server-side cancellation wiring is correct and unaffected. Tracked in Re-enable McpInvocationTests.A_cancelled_call_writes_no_audit_record_and_never_completes_the_invoker once the SDK ships the cancellation fix #224 to re-enable once a fixed SDK version ships.build.yml / build — Assert no framework project references a workload—pwsh ./build/Test-WorkloadIsolation.ps1: no project undersrc/orsamples/referencesworkloads/(46 project files checked).build.yml / game-service — Typecheck—tsc --noEmit, no output, exit 0.build.yml / game-service — Start the workload and the edge, the documented way— both/livez//readyzand GameEdge's/health/live//health/readyreported healthy.build.yml / game-service — Run the replay against the workload— 11/11 tests.build.yml / game-service — Run the replay against the edge— 2/2 tests.build.yml / game-service — Migrate the schema to head, the documented way— migrated to head.build.yml / game-service — Start the workload against the durable store, the documented way—/readyzhealthy.build.yml / game-service — Run the one-instance contention proof— 5/5 tests.build.yml / game-service — Run the two-instance contention proof— 7/7 tests.build.yml / game-service — Run the durable replay— 7/7 tests.build.yml / game-service — Run the port-conformance suite— 7/7 tests.docs-ci.yml / documentation — Validate Markdown links, terminology, and generated files— 127 Markdown files, 2 pre-existing warnings (unrelated to this branch).docs-ci.yml / slice-status-markers — Validate design/30-slices.md's Status markers— consistent across 3 slices.docs-ci.yml / verify — Build and verify the status-page site— 57/57 tests, build and merge checks passed.docs-deploy.yml / deploy — Build and verify the status-page site— identical command to the gate above, confirmed by that same run.Parse-check PowerShell scripts— 41 files, no parse errors.Validate the core/companion split—./tools/Test-Companion.ps1: 23 core(s) checked, 0 companions present, Valid.Ran and failed:
build.yml / game-service — Test(workloads/game-service's own combined suite,GAME_EDGE_DLL+OTEL_COLLECTOR_BINset) — 197/198 passed;tests/trace-evidence.test.tsfailed withSyntaxError: Unterminated string in JSON at position 276. This reproduces a pre-existing, environment-specific issue (a Windows build of the OTEL Collector substituted for CI's Linux binary) — the same 197/198 ratio against this same test was recorded in a prior session against this repository before this branch existed.Run Pester tests— 268/291 passed. The one failure,tools/Test-TrackCommand.Tests.ps1'snames Update-DesignProjection.ps1 (a real run, not -DryRun) after the work-mirror refresh, is pre-existing and unrelated to this branch:.claude/commands/track.md, the file it inspects, carries no diff againstorigin/main.Did not run:
build.yml / build — Run the sample in both roles—build/Test-SampleRoundTrip.ps1states in its own header that it is "Linux-only, and it always was" (P/Invokes libc'skill(2), reads the store withsqlite3on POSIX assumptions); this session is Windows. The corresponding CI check (ubuntu-latest) is where the answer comes from.Check the design state against the tree—./tools/Test-DesignState.ps1exited 2 (could-not-evaluate):ContractListUnreadable(SectionNotFoundindesign/20-contract.md) andStateSetAbsent(design/state/holds no records beyond WorkRef mirrors). Pre-existing and unrelated to this branch: neither file carries a diff againstorigin/main.Agent detail
design/30-slices.md§ S16 @d752008