Skip to content

bug: (Actors.Next) - Framework hardening - #1938

Merged
WhitWaldo merged 18 commits into
masterfrom
actors-concurrency-tweaks
Oct 19, 2026
Merged

WhitWaldo merged 18 commits into
masterfrom
actors-concurrency-tweaks

Conversation

@WhitWaldo

@WhitWaldo WhitWaldo commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR hardens Actors.Next ahead of the v1.19 release, addressing concurrency, correctness, and reliability issues across the framework:

• Fixes reentrancy propagation, mailbox deadlocks, stream recovery, scheduling races, and deactivation during active turns
• Improves state persistence, migration, legacy-envelope compatibility, identity serialization, and recovery from failed activation
• Coordinates cache eviction with in-flight commits and tracks mutations within reference-containing structs
• Preserves mutations made during an in-flight state commit—including reverting a value to its previous durable value—so subsequent saves cannot incorrectly treat newer state as clean
• Stabilizes state-envelope metadata across custom JSON naming policies and explicitly rejects malformed envelopes
• Corrects state-machine initialization, timer dispatch, failed-event handling, and hierarchical handler precedence, including deferred-event replay
• Gives hierarchical state timeouts independent ownership, allowing parent and child deadlines to coexist and preserving parent deadlines across sibling-state transitions
• Adds timeout-generation validation so callbacks queued before a timeout is restarted, extended, or canceled cannot affect the replacement registration
• Ties in-memory actor timers to activation lifetime, ensuring they are stopped after normal deactivation, failed activation, factory failure, or disposal failure without removing durable reminders
• Enforces in-memory reminder TTLs and safely cleans up expired registrations
• Fixes generated-code edge cases and cross-assembly registration, deduplicates inherited contract methods, and reports incompatible wire-name collisions
• Reduces generator memory usage and resolves build-time memory exhaustion
• Expands unit, allocation, generated-proxy, and Dapr runtime integration coverage, including test-runtime isolation, migration persistence, actor reactivation, concurrent state mutation, queued timeout replacement, hierarchical deadlines, and timer cleanup across activation boundaries
• Strengthens the Auction example’s deterministic soft-close race test so an already-queued original timeout is rejected after a last-second bid reschedules the deadline
• Clarifies that the Cart example uses an activation-local timer rather than a durable reminder and corrects its Dapr app-channel launch port in the documentation

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

…patching prior to 1.19 release

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
@WhitWaldo WhitWaldo added this to the v1.19 milestone Oct 18, 2026
@WhitWaldo WhitWaldo self-assigned this Oct 18, 2026
@WhitWaldo WhitWaldo added the kind/bug Something isn't working label Oct 18, 2026
@WhitWaldo
WhitWaldo requested review from a team as code owners October 18, 2026 15:09
@WhitWaldo WhitWaldo changed the title bug: Actors.Next - Concurrency fault corrections bug: (Actors.Next) - Concurrency fault corrections Oct 18, 2026
@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.85%. Comparing base (fa7e0f7) to head (56af183).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1938   +/-   ##
=======================================
  Coverage   65.85%   65.85%           
=======================================
  Files         372      372           
  Lines       10774    10774           
  Branches     1264     1264           
=======================================
  Hits         7095     7095           
  Misses       3348     3348           
  Partials      331      331           
Flag Coverage Δ
net10.0 65.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…f the Actors.Next framework:

- State and identity
- Activation
- Generators
- Registration across assemblies
- State machines
- Testing

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
@WhitWaldo WhitWaldo changed the title bug: (Actors.Next) - Concurrency fault corrections bug: (Actors.Next) - Framework hardening Oct 18, 2026
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…-member inspection, eliminating unused hash metadata and redundant graph traverseal, filtering and deduplicating candidates earlier and caching repeated calculations.

Adding testing for correctnessa and regression coverage.

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
- Cache eviction now coordinates with in-flight persistence
- Struct state containing mutable references is tracked correctly
- Envelope metadata supporst custom JSON naming policies and rejects malformed recognized envelopes
- State-machine dispatch respects the nearest handler, ignore or defer declaration
- Reminder TTL expiration cleans up registrations safely
- Generated proxies deduplicate equivalent inherited methods and report incompatible wire-name collisions

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
- State commits update the durable baseline without losing newer cached cahnges
- Timeout registration IDs reject stale callbacks after cancellation or rescheduling
- Parent and child timeouts have independent registrations that survive sibling transtions
- Deactivation and failed activation clean up in-memory timers - even when lifecycle hooks throw - without removing reminders

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
…ade in this branch

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
@WhitWaldo
WhitWaldo merged commit 67fed24 into master Oct 19, 2026
740 of 741 checks passed
@WhitWaldo
WhitWaldo deleted the actors-concurrency-tweaks branch October 19, 2026 04:29
marcduiker pushed a commit to dapr/docs that referenced this pull request Oct 19, 2026
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
marcduiker added a commit to marcduiker/dapr-docs that referenced this pull request Oct 22, 2026
The Testing cross-reference was deliberately removed on v1.19 in 63b8413
(the update for dapr/dotnet-sdk#1938) and describes the earlier behaviour,
where advancing virtual time ran the callbacks rather than only admitting
the due ones. Resolve this hunk to v1.19, matching every other Actors.Next
file in this upmerge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>
marcduiker added a commit to marcduiker/dapr-docs that referenced this pull request Oct 22, 2026
Routine upmerge of the current release branch into the pre-release branch,
following the maintainer guide. Squashed into a single commit: the previous
upmerge (dapr#5347) landed on v1.19 as a single-parent commit, so a merge commit
here exposes every v1.18 commit since the June merge base (342 of them) and
the DCO check cannot enumerate them.

Conflict resolution:
- Kept v1.19 for preview-only content (Scheduler-served actor placement,
  Search/Vector/Binary Store alpha APIs, Redis OIDC auth,
  Dapr-Actor-Activation-Id) and for the newer .NET Actors.Next rewrites
  reflecting dapr/dotnet-sdk#1938.
- Took v1.18 for the Dapr Agents quickstarts table and the Anthropic
  provider dict-tool details, which are newer there.
- Excluded version information: hugo.yaml keeps the v1.19 preview settings,
  dapr-latest-version.html keeps 1.19.0, the 1.16.x rows in
  support-release-policy.md stay Unsupported, and
  .github/workflows/website-root.yml stays deleted since it belongs only on
  the branch that is currently the live "latest".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/actor/client kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant