Skip to content

Add Redis Persistence Support for Orleans Integration#10

Merged
loning merged 2 commits into
devfrom
feat/orleans-garnet-persistence
Feb 22, 2026
Merged

Add Redis Persistence Support for Orleans Integration#10
loning merged 2 commits into
devfrom
feat/orleans-garnet-persistence

Conversation

@loning
Copy link
Copy Markdown
Contributor

@loning loning commented Feb 22, 2026

  • Added support for Redis as a persistence backend for Orleans by including the Microsoft.Orleans.Persistence.Redis package.
  • Updated Directory.Packages.props to reference the new Redis package.
  • Modified docker-compose files to configure the Garnet service for Redis integration, ensuring proper environment variables are set for Orleans.
  • Enhanced documentation to reflect the new Garnet persistence options and updated setup instructions for distributed architecture.
  • Implemented tests to validate the integration of Orleans with Garnet, ensuring consistent state management across nodes.

- Added support for Redis as a persistence backend for Orleans by including the `Microsoft.Orleans.Persistence.Redis` package.
- Updated `Directory.Packages.props` to reference the new Redis package.
- Modified `docker-compose` files to configure the Garnet service for Redis integration, ensuring proper environment variables are set for Orleans.
- Enhanced documentation to reflect the new Garnet persistence options and updated setup instructions for distributed architecture.
- Implemented tests to validate the integration of Orleans with Garnet, ensuring consistent state management across nodes.
- Added approved polling wait entry for external/distributed eventual-consistency probes in the CI testing allowlist.
- Updated the description to clarify the purpose of the allowlist.
@loning loning merged commit f375e30 into dev Feb 22, 2026
2 checks passed
eanzhao added a commit that referenced this pull request Apr 30, 2026
19 inline comments arrived after de82e0a; verified each. Three of them
(#13, #14, #16) point at the HttpClient captive bug already fixed in
de82e0a — those will be answered with a reply. Three are NyxID-side
contract gaps (#15, #18, #19) verified against ~/Code/NyxID HEAD cdfef0a;
those need separate NyxID PRs and will be tracked. The rest are fixed
here:

- /model list (codex MAJOR #11): read owner default from
  context.RegistrationScopeId, not the ambient queryPort overload —
  channel inbound has no Studio HTTP request behind it, so the ambient
  resolver returned `default`/unrelated state. Falls back to ambient
  only when the scope is empty (defensive). Tests pinned.
- StateTokenCodec.TryDecodeAsync (consensus MINOR #10): map
  AevatarOAuthClientNotProvisionedException to a distinct
  state_client_not_provisioned code instead of state_signature_invalid.
  IdentityOAuthEndpoints surfaces a "正在初始化, 30 秒后重试" detail
  for that code, matching the /init handler's cold-start message.
- AevatarOAuthClientBootstrapService (#8, #9):
  - wrap RunWithRetryAsync in RunSafelyAsync that logs any escape so
    the unobserved-task exception sink is no longer the only safety net.
  - StopAsync now catches TimeoutException too: when the host shutdown
    deadline fires before the bootstrap task observes its own
    _stoppingCts cancellation, log + return cleanly instead of leaking
    a noisy trace.
- AevatarOAuthClientGAgent.HandleEnsureProvisioned (#6, #7): document
  why CancellationToken.None is the contract — the framework's
  EventHandlerDiscoverer requires single-parameter handlers, so a
  turn-scoped CT cannot be surfaced. The named HTTP client's per-
  request timeout bounds the worst case during silo shutdown.
- NyxIdRedirectUriResolver (#4): emit a warning when all URL sources
  are unset and the environment is not developer-shaped, parity with
  NyxIdAuthorityResolver's existing fallback warning. Wired through
  bootstrap + broker call sites.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
eanzhao added a commit that referenced this pull request May 8, 2026
- #15 (major, di): AddOrnnSkills now self-registers NyxIdApiClient and
  NyxIdToolOptions via TryAdd safety nets so workflow hosts that enable
  Ornn without AddNyxIdTools get a clean 404 path on missing BaseUrl
  rather than a confusing DI resolution failure.
- #3 (major, di): Introduce IExternalIdentityBindingProjectionPort and
  inject the interface in IdentityOAuthEndpoints. The concrete class
  remains for runtime composition; the registration also publishes the
  interface as a forwarder so existing tests that hold the concrete type
  keep working.
- #14 + #17 (major, concurrency): TurnStreamingReplySink TOCTOU concern
  was based on a misread — drainSignal is captured inside the same lock
  acquisition as _dispatchInProgress=false in the cap branch, and the
  throttle gate's nextIsFinal=false invariant makes _drainTcs guaranteed
  null on that path. Document the invariants so future readers don't
  re-flag this.
- #20 (major, arch): Replace the singleton Dictionary cache in
  NyxIdLlmServiceCatalogClient with IMemoryCache. Per CLAUDE.md
  "中间层状态约束", per-caller state lives in a host-owned cache, not
  a service field. AbsoluteExpiration policy preserved (30s).
- #9 (minor): /api/v1/proxy/services?per_page=100 was already extracted
  into NyxIdLlmCatalogRoutes.ProxyServicesPath — both call sites already
  use the constant.
- #10 (minor): LooksLikeLlmRouteCandidate already has negative-signal
  filtering plus a two-distinct-weak-signals threshold. No change.
- #11 (minor): ExternalIdentityBindingProjector already logs a Warning
  with DocumentId/EventId/Version on the empty-binding delete path.

Build clean (Ornn / Identity / NyxidChat / Channel.Runtime), updated
catalog client test passes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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