Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Integrate ManagedCode.Orleans.Graph into an Orleans-based .NET application for grain-call policy enforcement, deadlock detection, live-call telemetry, and Mermaid graph diagnostics. USE FOR: ManagedCode.Orleans.Graph integration; allowed grain transitions; Orleans call filters; live policy graphs; reviewing Orleans call-cycle risk. DO NOT USE FOR: generic graph data modeling or traversal unrelated to Orleans calls. INVOKES: inspect the repository context, edit targeted files, and run relevant bu
.claude/skills/managedcode-managedcode-orleans-graph/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | -26% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 2% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 0% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 107% | 0% |
ManagedCode.Orleans.Graph into an Orleans-based systemCurrent upstream release reviewed: v10.0.3.
bashdotnet add package ManagedCode.Orleans.Graph
The upstream package targets the current .NET 10 / Orleans 10 stack. Do not add it to older Orleans applications without first checking target frameworks and Orleans package compatibility.
AddOrleansGraph(...).AllowAll() observe mode only to discover traffic before enforcement. Keep a follow-up step to convert observed edges into reviewed policy.clientBuilder.AddOrleansGraph() only when Orleans clients should participate in call-history tracking.mermaidflowchart LR A["Orleans call"] --> B["Outgoing filter records source"] B --> C["Incoming filter checks transition policy"] C --> D{"Allowed?"} D -->|Yes| E["Target grain method runs"] D -->|No| F["Blocked before target code"] E --> G["Telemetry worker aggregates live edge"] G --> H["Telemetry grain / Mermaid graph"]
csharpusing ManagedCode.Orleans.Graph.Extensions; siloBuilder.AddOrleansGraph(graph => { graph.AllowClientCallGrain<IOrderGrain>(); graph.AddGrainTransition<IOrderGrain, IPaymentGrain>() .Method( source => source.SubmitAsync(GraphParam.Any<Order>()), target => target.ChargeAsync(GraphParam.Any<Payment>())) .And(); graph.AddGrain<IPaymentGrain>() .WithReentrancy(); });
csharpsiloBuilder.AddOrleansGraph( configureFilters: filters => { filters.LiveGraphFlushPeriod = TimeSpan.FromSeconds(1); }, configureGraph: graph => { graph.AllowAll(); }); clientBuilder.AddOrleansGraph();
After the app receives traffic, inspect the observed graph:
csharpvar telemetry = grainFactory.GetGrain<IOrleansGraphTelemetryGrain>( Constants.LiveGraphTelemetryGrainKey); var observedGraph = await telemetry.GetObservedGraphAsync(); var mermaid = await telemetry.GenerateLiveMermaidDiagramAsync();
csharpusing ManagedCode.Orleans.Graph.Attributes; [AllowClientCall] [AllowGrainCall( typeof(IPaymentGrain), AllowAllMethods = false, SourceMethods = [nameof(IOrderGrain.SubmitAsync)], TargetMethods = [nameof(IPaymentGrain.ChargeAsync)])] public interface IOrderGrain : IGrainWithStringKey { Task SubmitAsync(Order order); } [AllowSelfReentrancy] public interface IPaymentGrain : IGrainWithStringKey { Task ChargeAsync(Payment payment); }
AllowAll() is an observe/discovery mode, not a finished production policy.AllowClientCallGrain<T>() is required for client-originated entry points that should be allowed.TrackOrleansGraphInternalCalls should stay off unless debugging Orleans.Graph itself.RegisterGrainTimer callbacks use * as the source method because Orleans does not expose a grain interface method for that callback.ReceiveReminder as the source method.ORLEANS_GRAIN_CLIENT for client calls and UNKNOWN_CALLER when Orleans exposes no resolvable caller identity.v10.0.3 includes fixes for reminders and timers; re-test those origins when upgrading.Other measured skills in the registry, with their headline benchmark lift.