yavsc/src/Yavsc.Org
Paul Schneider 9846210fd6
Some checks failed
Dotnet build and test / log-the-inputs (pull_request) Has been cancelled
Dotnet build and test / build (pull_request) Has been cancelled
ApplicationDbContext: drop redundant HasOne on 3 Client navs
LoadClientAsync(id) on ClientController used to trip an
IndexOutOfRangeException at the InMemory shaper for any
.Include() of one of three Client navs: RedirectUris,
AllowedScopes, AllowedGrantTypes. Five other Client navs (with
the same EF shape and the same application-level config) worked
fine.

Bisection pointed at the InMemory provider; that hypothesis was
wrong. The real cause is in ApplicationDbContext.OnModelCreating:
yavsc was redeclaring the HasOne<Client>().WithMany(...).
HasForeignKey(e => e.ClientId) for all eight Client* navs. The
same relation is already declared (more completely, with
.IsRequired().OnDelete(DeleteBehavior.Cascade)) by
IdentityServer8's ConfigureClientStore via ModelBuilderExtensions.

The redundant mapping on three specific entities — ClientScope,
ClientRedirectUri, ClientGrantType — interacts with the InMemory
provider's shaper in a way that throws IndexOutOfRange. Removing
the redundancy fixes it.

This commit also walks back b12c272d:
- Drops .AsSplitQuery() from LoadClientAsync (no longer needed
  for the InMemory shaper, and the Postgres path it was a hedge
  against was a false alarm — there is no Postgres production
  bug here, only an InMemory shaper quirk surfaced by the
  redundant mapping).
- Removes the 9 Bisect_*_alone tests that were the artefact of
  the provider-hypothesis phase. They pointed at the right
  entities but for the wrong reason.
- Keeps EditRedirectUris_GET_after_add_lists_both_uris as the
  end-to-end regression sentinel: with the fix in place, it
  loads a Client with two RedirectUris and asserts both are
  rendered. Without the fix, it fails with IndexOutOfRange.
2026-07-12 02:39:13 +01:00
..
Avatars-Dev reorg 2026-02-28 21:17:54 +00:00
Bills-Dev reorg 2026-02-28 21:17:54 +00:00
Controllers ApplicationDbContext: drop redundant HasOne on 3 Client navs 2026-07-12 02:39:13 +01:00
data reorg 2026-02-28 21:17:54 +00:00
Data-Dev reorg 2026-02-28 21:17:54 +00:00
Extensions Revert "repoduces the bug" 2026-07-11 22:17:58 +01:00
Helpers Identity reloaded 2026-07-05 23:56:10 +01:00
keys reorg 2026-02-28 21:17:54 +00:00
Migrations Blog: enforce Restrict FK on BlogPost.Author and Comment.Author 2026-07-11 18:45:27 +01:00
Resources Ui fixes 2026-07-04 19:49:48 +01:00
Services fixes the compile and timestamps to db 2026-07-11 03:26:13 +01:00
Temp-Dev reorg 2026-02-28 21:17:54 +00:00
ViewComponents fixes the compile and timestamps to db 2026-07-11 03:26:13 +01:00
ViewModels refact 2026-05-30 19:34:22 +01:00
Views Blog: render user avatar through a null-safe helper 2026-07-11 19:41:09 +01:00
wwwroot Ui fixes 2026-07-04 19:49:48 +01:00
.eslintrc.json reorg 2026-02-28 21:17:54 +00:00
appsettings-org-template.json background colors 2026-06-20 19:20:22 +01:00
appsettings-org.json background colors 2026-06-20 19:20:22 +01:00
appsettings-org.Testing.json Revert "repoduces the bug" 2026-07-11 22:17:58 +01:00
AssemblyInfo.cs test(yavsc.org): cover the kid derivation in ComputeKid 2026-07-09 20:28:58 +01:00
Contants.cs code cleanup 2026-06-25 23:55:52 +01:00
CustomModelBinder.cs reorg 2026-02-28 21:17:54 +00:00
Directory.Packages.props Identity reloaded 2026-07-05 23:56:10 +01:00
libman.json reorg 2026-02-28 21:17:54 +00:00
License.md reorg 2026-02-28 21:17:54 +00:00
Makefile reorg 2026-02-28 21:17:54 +00:00
noteLocalization.md reorg 2026-02-28 21:17:54 +00:00
Program.cs WIP: refactoring pour déploiement 2026-06-14 12:17:03 +01:00
Startup.cs reorg 2026-02-28 21:17:54 +00:00
tempkey.jwk reorg 2026-02-28 21:17:54 +00:00
Yavsc.Org.csproj Revert "repoduces the bug" 2026-07-11 22:17:58 +01:00