Skip to content

Small fixes from the health check: caches, test registration, validation, filter errors [all-db] - #447

Merged
jeff377 merged 6 commits into
mainfrom
claude/p3-small-fixes
Nov 12, 2026
Merged

jeff377 merged 6 commits into
mainfrom
claude/p3-small-fixes

Conversation

@jeff377

@jeff377 jeff377 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Part of #441

  • Language resource misses are capped. LanguageResourceCache limits its miss markers like the other key caches, so a caller cannot grow the cache without bound by asking for languages that do not exist.
  • A remote client fetches a form's definitions at once. FormDefinitionLoader fetches layout and language in parallel when the client is remote; the in-process client keeps fetching them one after another, since it runs on the caller's services.
  • Test database registration no longer changes the cached settings in place. SharedDatabaseState adds its entries to a copy and replaces the cached instance in one step, so other test classes reading it see either the old or the complete new instance. Duplicate registrations are skipped.
  • The permission binding validator reports a model id that differs from the registry only in case. The registry collection is case-insensitive while runtime role checks are ordinal, so such a binding validated but never granted anything. No definition in the repository differs in case.
  • The unused endpoint reachability probe is removed from HttpUtilities (internal).
  • An unreadable filter value answers -32602 InvalidParams with a message naming the field, instead of -32099 with a fixed message. It throws the new public Polhem.Core.Exceptions.InvalidRequestValueException, an ArgumentException. The conversion has not shipped in a release, so the CHANGELOG line and the 1.13.0 notes are updated in place.

Public API: adds InvalidRequestValueException (additive).

Verified locally: clean Release build; Definition, Db, Api.Core, Api.Server, Api.Client, Business, ObjectCaching and Core unit tests against the local database containers; doc checks. CI: full ([all-db]), because the test database registration changes for every provider.

… at once over a remote client

LanguageResourceCache keeps its miss markers in a capped set, like the session and API key caches: the language and namespace come from any signed-in caller of System.GetLanguage. FormDefinitionLoader fetches the layout layers and the language resources of the fall-back chain concurrently when the client is remote, where each fetch is a round trip; an in-process client keeps fetching one after another, since its calls run on the caller's services.
A filter value that cannot be read as the type of its field now throws
InvalidRequestValueException, which the error contract sends as -32602
with its message, instead of an InvalidOperationException that answered
-32099 with a fixed message.

Public API: adds Polhem.Core.Exceptions.InvalidRequestValueException.
Additive only; the conversion it replaces has not shipped in a release.
@jeff377
jeff377 enabled auto-merge (squash) November 12, 2026 14:29
@sonarqubecloud

Copy link
Copy Markdown

@jeff377
jeff377 merged commit 56d5486 into main Nov 12, 2026
4 checks passed
@jeff377
jeff377 deleted the claude/p3-small-fixes branch November 12, 2026 14:44
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