Skip to content

iter48 issue-879 runtime-callback-persistent-state-not-proto: Foundation proto contract + typed schedule boundary#880

Merged
loning merged 8 commits into
auto-refact-devfrom
refactor/iter48-cluster-048-runtime-callback-persistent-state-not-proto
May 23, 2026
Merged

iter48 issue-879 runtime-callback-persistent-state-not-proto: Foundation proto contract + typed schedule boundary#880
loning merged 8 commits into
auto-refact-devfrom
refactor/iter48-cluster-048-runtime-callback-persistent-state-not-proto

Conversation

@loning
Copy link
Copy Markdown
Contributor

@loning loning commented May 23, 2026

摘要

iter48 issue-879 cluster-048-runtime-callback-persistent-state-not-proto(high,SERIALIZATION-PROTOBUF + MIDDLE-NO-ID-MAPS + ACTOR-CALLBACK-SIGNAL)。

  • Old:Orleans durable callback state 存 hand-written C# RuntimeCallbackSchedulerGrainState + Dictionary<string, ReminderScheduledCallbackState> + byte[] EnvelopeBytes。Schema 依赖 .NET 类形状,跨进程/版本恢复脆弱。
  • New:Foundation runtime callback typed protobuf contract(callback id / generation / schedule fields / delivery mode / trigger envelope = typed EventEnvelope);Orleans grain 改读 proto-backed state;保留现有 actor-scoped scheduler 模式 + lease semantics;不引入新 actor / 新 query surface

Phase 9 共识

META_JUDGE_DONE:consensus:structural:keep existing actor-scoped Orleans callback scheduler grain, replace handwritten persistent state and raw envelope bytes with Foundation runtime protobuf state plus typed EventEnvelope schedule boundary, no new actor or query surface

改动范围

9 files (+159/-60):

  • runtime_callback_scheduler_state.proto(新):Foundation runtime callback proto contract
  • RuntimeCallbackSchedulerGrainState.cs(删):hand-written C# state
  • IRuntimeCallbackSchedulerGrain / RuntimeCallbackSchedulerGrain:改 proto-backed
  • OrleansActorRuntimeDurableCallbackScheduler:typed EventEnvelope boundary(无 raw bytes)
  • runtime_callback_guards.sh:阻止新非 proto IPersistentState
  • 测试:RuntimeCallbackSchedulerStateProtoTests(新)+ OrleansActorRuntimeCallbackScheduler/Forwarding/CiTestAuthorityContract 更新

不引入新 actor / 新 query surface。

Closes #879

📢 cc 原作者: @loning @eanzhao

🤖 Auto-loop / codex-refactor-loop iter48

⟦AI:AUTO-LOOP⟧

…ion runtime proto contract + typed schedule boundary

按 issue #879 Phase 9 r1 consensus(meta-judge: structural):

1. 新 runtime_callback_scheduler_state.proto:Foundation runtime callback proto contract(actor id / callback id / generation / periodic / due/period / fire index / delivery mode / trigger envelope)
2. 删 RuntimeCallbackSchedulerGrainState.cs(hand-written C# class + Dictionary + byte[] EnvelopeBytes)
3. 替换 IRuntimeCallbackSchedulerGrain / RuntimeCallbackSchedulerGrain 使用 proto-backed state
4. OrleansActorRuntimeDurableCallbackScheduler 改 typed EventEnvelope schedule boundary(无 raw bytes)
5. runtime_callback_guards.sh 更新:阻止非 proto IPersistentState<...State> callback payload
6. 测试:RuntimeCallbackSchedulerStateProtoTests(新) / OrleansActorRuntimeCallbackSchedulerTests / OrleansActorRuntimeForwardingTests / CiTestAuthorityContractTests 更新

不引入新 actor / 新 query surface;保留 actor-scoped Orleans scheduler grain + lease semantics。

Closes #879

⟦AI:AUTO-LOOP⟧
@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

Phase 8 Tests Review - PR #880 r1

Role: tests reviewer
Head: e4ec590

Verdict: comment

Checks:

  • Proto contract round-trip: covered by RuntimeCallbackSchedulerState_ShouldRoundtripTypedScheduleContract.
  • Guard fire condition: covered by RuntimeCallbackGuardRejectsHandwrittenCallbackPayloadState; direct bash tools/ci/runtime_callback_guards.sh passes on PR HEAD.
  • Migration/fallback path: no fallback migration exists; the PR resets to runtime-callback-scheduler-v2, and that slot change is asserted.
  • [Skip] / new Task.Delay: no new skipped tests or polling waits in the touched tests; bash tools/ci/test_stability_guards.sh passes.

Finding:

  • Non-blocking test gap: RuntimeCallbackSchedulerState_ShouldReadAndWriteThroughOrleansPersistentState does not actually exercise Orleans persistence or Orleans protobuf serialization. It uses a DispatchProxy implementation of IPersistentState<RuntimeCallbackSchedulerState> and only counts WriteStateAsync / ReadStateAsync calls while keeping the same in-memory object alive. That cannot catch failures in Orleans state provider serialization, activation reload, or storing RuntimeCallbackSchedulerState with nested EventEnvelope. Given this PR's purpose is replacing durable callback state with a generated proto contract, add one integration-style test that schedules through RuntimeCallbackSchedulerGrain with Orleans memory storage, deactivates/re-resolves or otherwise reloads the grain, and verifies the stored callback envelope survives and can fire/cancel from restored state.

Validation run:

  • dotnet test test/Aevatar.Foundation.Runtime.Hosting.Tests/Aevatar.Foundation.Runtime.Hosting.Tests.csproj --nologo --filter "FullyQualifiedName~RuntimeCallbackSchedulerStateProtoTests|FullyQualifiedName~OrleansActorRuntimeCallbackSchedulerTests|FullyQualifiedName~OrleansActorRuntimeForwardingTests": passed, 25 tests, 0 skipped.
  • dotnet test test/Aevatar.Architecture.Tests/Aevatar.Architecture.Tests.csproj --nologo --filter FullyQualifiedName~CiTestAuthorityContractTests: passed, 11 tests, 0 skipped.
  • bash tools/ci/runtime_callback_guards.sh: passed.
  • bash tools/ci/test_stability_guards.sh: passed.

REVIEW_DONE:880:tests:comment

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

Phase 8 quality review — PR #880 r1

Scope checked:

  • Proto contract and field naming for runtime callback scheduler persistent state.
  • Removal of handwritten scheduler state and raw envelope byte boundary.
  • Refactor note / guard coverage for the structural change.

Findings: none.

Quality notes:

  • RuntimeCallbackSchedulerState / RuntimeScheduledCallback field names are clear and single-purpose: actor_id, callback_id, generation, periodic, due_time_millis, period_millis, fire_index, delivery_mode, trigger_envelope.
  • Production references to deleted RuntimeCallbackSchedulerGrainState, ReminderScheduledCallbackState, and EnvelopeBytes are gone. Remaining hits are only guard/test negative cases and the explanatory refactor comment.
  • The refactor comment documents the old durable C# state + raw bytes pattern and the new protobuf typed boundary. The new CI guard also locks the intended invariant.

Verification run on clean worktree at e4ec59079f86d95454b8e4240a26b0d44dac6875:

  • dotnet build src/Aevatar.Foundation.Runtime.Implementations.Orleans/Aevatar.Foundation.Runtime.Implementations.Orleans.csproj --nologo passed, with pre-existing analyzer warnings.
  • bash tools/ci/runtime_callback_guards.sh passed.
  • bash tools/ci/test_stability_guards.sh passed.
  • dotnet test test/Aevatar.Foundation.Runtime.Hosting.Tests/Aevatar.Foundation.Runtime.Hosting.Tests.csproj --nologo passed: 203 passed, 15 skipped.
  • dotnet test test/Aevatar.Architecture.Tests/Aevatar.Architecture.Tests.csproj --nologo --filter CiTestAuthorityContractTests passed: 11 passed.

Note: gh pr review --approve was attempted, but GitHub rejected it because the authenticated account owns the PR. This comment carries the review artifact and marker for the loop.

REVIEW_DONE:880:quality:approve

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

Phase 8 Reviewer - architect (round r1)

PR: #880
HEAD: e4ec59079f86d95454b8e4240a26b0d44dac6875
Base diff reviewed: origin/auto-refact-dev...origin/refactor/iter48-cluster-048-runtime-callback-persistent-state-not-proto

Verdict: reject

Scope Checked

Checklist

  • runtime_callback_scheduler_state.proto field completeness: pass for the requested shape. It has actor id, callback id, generation, periodic/schedule fields, fire index, delivery mode, and typed EventEnvelope trigger envelope.
  • Orleans grain uses proto-backed state: pass. RuntimeCallbackSchedulerGrain now injects IPersistentState<RuntimeCallbackSchedulerState> and the hand-written RuntimeCallbackSchedulerGrainState file is deleted.
  • No raw bytes across scheduler grain boundary: pass for this PR scope. IRuntimeCallbackSchedulerGrain.ScheduleTimeoutAsync and ScheduleTimerAsync now accept EventEnvelope, not byte[].
  • No new actor type / query surface: pass.
  • Lease semantics: fail.

Blocking Finding

  1. Changing the persistent state slot resets generation fencing and can let stale leases cancel fresh callbacks.

    RuntimeCallbackSchedulerGrain changes the Orleans persistent state name from runtime-callback-scheduler to runtime-callback-scheduler-v2 while preserving the same external lease identity tuple (ActorId, CallbackId, Generation, Backend). On the new empty slot, ResetExistingCallbackAndGetNextGenerationAsync starts from 0, so the first post-upgrade schedule for a reused callback id returns generation 1 again.

    That breaks the existing lease contract. Workflow state persists callback leases as { actor_id, callback_id, generation, backend } in WorkflowRuntimeCallbackLeaseState, and the codec restores exactly that tuple into RuntimeCallbackLease. CancelAsync accepts a cancellation whenever expectedGeneration matches the current stored generation. After this PR, an old persisted lease such as (actor-1, cb-1, generation=1, Dedicated) can cancel a newly scheduled callback with the same actor/callback id after upgrade because the v2 state restarts generation at 1. The same generation is also stamped onto fired callback envelopes, so generation reuse weakens inbound callback fencing as well.

    Evidence:

    • src/Aevatar.Foundation.Runtime.Implementations.Orleans/Grains/Callbacks/RuntimeCallbackSchedulerGrain.cs:13 sets SchedulerStateName = "runtime-callback-scheduler-v2".
    • src/Aevatar.Foundation.Runtime.Implementations.Orleans/Grains/Callbacks/RuntimeCallbackSchedulerGrain.cs:115 starts missing callback generation from 0, then returns generation + 1.
    • src/Aevatar.Foundation.Runtime.Implementations.Orleans/Grains/Callbacks/RuntimeCallbackSchedulerGrain.cs:75 cancels if the persisted generation equals the supplied expected generation.
    • src/workflow/Aevatar.Workflow.Core/workflow_state.proto:146 persists callback leases with only actor id, callback id, generation, and backend.
    • src/workflow/Aevatar.Workflow.Core/Execution/WorkflowRuntimeCallbackLeaseStateCodec.cs:12 and :30 round-trip that same tuple.
    • src/Aevatar.Foundation.Runtime/Callbacks/RuntimeCallbackEnvelopeFactory.cs:33 stamps callback id/generation/fire index into fired envelopes.

    Required fix: keep generation monotonic for the same external lease namespace. Either migrate/read enough of the old scheduler slot to carry forward the per-callback generation and active schedule, or introduce an explicit typed epoch/slot into the lease and fired callback contract before resetting the storage namespace. Without one of those, v2 storage is not just a serialization refactor; it changes the lease fencing model.

Non-Blocking Notes

  • Active legacy Orleans reminders will also fire against the same grain/reminder names but find no entry in the new v2 state slot, then unregister without publishing the callback. If the intended behavior is to abandon all pre-existing schedules, that needs an explicit contract decision; it is not "preserve lease semantics".
  • The new RuntimeCallbackStateProtoTests prove protobuf round-trip and reflection shape, but they do not exercise a real Orleans storage migration/upgrade scenario. Add a regression test for old-lease-vs-new-schedule generation fencing.

Verification

Clean detached worktree at PR HEAD /tmp/aevatar-pr880:

  • dotnet build src/Aevatar.Foundation.Runtime.Implementations.Orleans/Aevatar.Foundation.Runtime.Implementations.Orleans.csproj --nologo: passed.
  • dotnet test test/Aevatar.Foundation.Runtime.Hosting.Tests/Aevatar.Foundation.Runtime.Hosting.Tests.csproj --nologo --filter "FullyQualifiedName~RuntimeCallbackSchedulerStateProtoTests|FullyQualifiedName~OrleansActorRuntimeCallbackSchedulerTests|FullyQualifiedName~OrleansActorRuntimeForwardingTests": passed, 25 tests.
  • dotnet test test/Aevatar.Architecture.Tests/Aevatar.Architecture.Tests.csproj --nologo --filter FullyQualifiedName~CiTestAuthorityContractTests: passed, 11 tests.
  • bash tools/ci/runtime_callback_guards.sh: passed.
  • bash tools/ci/test_stability_guards.sh: passed.

Note: .claude/skills/review/checklist.md is missing in this checkout, so the generic gstack checklist could not be loaded. I used the PR-specific architect checklist from the prompt.

REVIEW_DONE:880:architect:reject

⟦AI:AUTO-LOOP⟧

Empty commit to retry actions/checkout@v4 transient failure on PR #880(infrastructure issue, not code).

⟦AI:AUTO-LOOP⟧
@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

📊 状态 — r1 architect reject → fix-r1 dispatch

architect r1 reject。BLOCKER:SchedulerStateName -v2 重置 generation fencing 破坏 lease 合同 — 旧 persisted lease 可 cancel 升级后新 schedule(同 actor/cb generation reuse)。

Required fix:A. 迁移 old slot 同步 generation;或 B. 加 typed epoch/slot 到 lease + envelope proto。

派 fix-r1 with explicit guidance。

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

📊 codex 进展 fix-pr880-r1 (⏳ 进行中; 已跑 11 min)

 
@@ -56,6 +58,7 @@
         pending.TimeoutLease.Should().NotBeNull();
         pending.TimeoutLease!.ActorId.Should().Be("owner-1");
         pending.TimeoutLease.Backend.Should().Be(WorkflowRuntimeCallbackBackendState.Dedicated);
+        pending.TimeoutLease.SlotEpoch.Should().Be(RuntimeCallbackSlotEpoch.OrleansSchedulerV2);
         pending.TimeoutMs.Should().Be(12_000);
     }
 

tokens used
256,752
Implemented option B: added typed `slot_epoch` fencing to runtime callback leases and fired callback envelopes.

Key changes:
- Dedicated Orleans scheduler v2 now stamps `SlotEpoch = 2` on leases, persisted scheduler state, and fired envelopes.
- Cancel now fences on `(slot_epoch, generation)` so an old lease `(epoch 0, generation 1)` cannot cancel a new v2 schedule `(epoch 2, generation 1)`.
- Workflow callback lease state and sub-workflow definition resolution events now persist/restore `slot_epoch`.
- Added regression coverage for old lease vs new schedule fencing, envelope matching, proto roundtrip, and workflow lease codec.

Verification:
- `dotnet test test/Aevatar.Foundation.Runtime.Hosting.Tests/Aevatar.Foundation.Runtime.Hosting.Tests.csproj --no-restore --nologo`
- `dotnet test test/Aevatar.Workflow.Core.Tests/Aevatar.Workflow.Core.Tests.csproj --no-restore --nologo`
- `bash tools/ci/test_stability_guards.sh`
- `bash tools/ci/runtime_callback_guards.sh`

自动更新每 10 分钟;edit-in-place 不堆评论;codex 完成后此 comment 自动删除(per Auric "完成后删掉就好了 否则太占空间")。
🤖 controller progress reporter

…generation fencing across v2 storage upgrade

architect r1 BLOCKER:`SchedulerStateName -v2` 重置 generation fencing,旧 persisted lease 可 cancel 升级后新 schedule。

修法 B(typed epoch):
- 新 lease/envelope proto 加 `slot_epoch` 字段
- v2 storage 用新 epoch
- cancel/cancel-by-generation 校验 (slot_epoch, generation) 一对
- 旧 epoch 的 lease 不能 cancel 新 epoch 的 schedule

加 regression test:old-epoch-lease-vs-new-schedule-fencing。

⟦AI:AUTO-LOOP⟧
@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

📊 状态 — fix-r1 push + reviewer r2 architect

commit f3981bb5(20 files +201/-19)应用 typed slot_epoch 修法 B:lease + envelope proto 加 epoch 字段,v2 用新 epoch,cancel 校验 (slot_epoch, generation) 一对 → 旧 epoch lease 不能 cancel 新 epoch schedule。

加 regression test WorkflowRuntimeCallbackLeaseStateCodecTests

派 r2 architect reviewer 单审。approve + CI green → merge。

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

✅ Phase 8 Reviewer architect r2 APPROVE — fix 成功

REVIEW_DONE:880:architect:approve — typed slot_epoch 修法 B 验证 OK,old-epoch-vs-new-schedule fencing regression 真覆盖。

r1 时 tests/quality 已 approve(只 architect reject)→ effective 3/3 approve。

CI 当前状态

  • ✅ fast-gates / changes
  • ❌ slow-test-guards(NEW failure,非 coverage-quality infra issue)
  • ⏳ host-composition-smoke / coverage-quality / event-sourcing-regression / kafka-transport-integration 仍 pending

待 pending 完成 + slow-test-guards 复查;若 slow-test-guards 仍 fail 派 fix。

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

📊 codex 进展 review-pr880-architect-r2 (⏳ 进行中; 已跑 12 min)

- Grain cancel rejects same-generation stale leases when `expectedSlotEpoch` does not match the stored callback.
- Regression coverage exists in `RuntimeCallbackSchedulerGrain_ShouldNotCancelV2ScheduleWithOldEpochLease`, which verifies an old epoch lease cannot remove a v2 schedule with the same generation.

Verified:
- `dotnet test test/Aevatar.Foundation.Runtime.Hosting.Tests/Aevatar.Foundation.Runtime.Hosting.Tests.csproj --filter "...RuntimeCallback..." --nologo` passed: 18 tests.
- `dotnet test test/Aevatar.Workflow.Core.Tests/Aevatar.Workflow.Core.Tests.csproj --filter "...LeaseStateCodecTests|...SubWorkflowOrchestratorStateCoverageTests" --nologo` passed: 9 tests.
- `bash tools/ci/test_stability_guards.sh` passed.
- `bash tools/ci/runtime_callback_guards.sh` passed.

REVIEW_DONE:880:architect:approve  
⟦AI:AUTO-LOOP⟧
tokens used
101,398
No blocker found. The r1 case is covered and implemented correctly:

- New v2 schedules stamp `SlotEpoch = OrleansSchedulerV2` on the lease, persisted scheduler state, and fired envelope.
- Durable cancel now passes `(generation, slot_epoch)` to the scheduler grain.
- Grain cancel rejects same-generation stale leases when `expectedSlotEpoch` does not match the stored callback.
- Regression coverage exists in `RuntimeCallbackSchedulerGrain_ShouldNotCancelV2ScheduleWithOldEpochLease`, which verifies an old epoch lease cannot remove a v2 schedule with the same generation.

Verified:
- `dotnet test test/Aevatar.Foundation.Runtime.Hosting.Tests/Aevatar.Foundation.Runtime.Hosting.Tests.csproj --filter "...RuntimeCallback..." --nologo` passed: 18 tests.
- `dotnet test test/Aevatar.Workflow.Core.Tests/Aevatar.Workflow.Core.Tests.csproj --filter "...LeaseStateCodecTests|...SubWorkflowOrchestratorStateCoverageTests" --nologo` passed: 9 tests.
- `bash tools/ci/test_stability_guards.sh` passed.
- `bash tools/ci/runtime_callback_guards.sh` passed.

自动更新每 10 分钟;edit-in-place 不堆评论;codex 完成后此 comment 自动删除(per Auric "完成后删掉就好了 否则太占空间")。
🤖 controller progress reporter

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

Phase 8 Tests Review - PR #880 r2

Role: tests reviewer
Head: 0e67ae0aec7d41c4e6ba37fec0a80eb72aeb5fcb

Verdict: approve

Scope checked:

  • fix-r1 typed slot_epoch option B on runtime callback lease, fired callback envelope, scheduler proto state, and workflow lease state.
  • Regression coverage for stale old-epoch lease vs new v2 schedule with reused generation.
  • r1 tests note about scheduler state serialization coverage remains non-blocking; the current fix adds the missing fencing regression that was needed after architect r1.

Findings: none.

Test coverage verified:

  • RuntimeCallbackSchedulerGrain_ShouldNotCancelV2ScheduleWithOldEpochLease proves an old epoch lease (slot_epoch=0, generation=1) cannot cancel a v2 schedule (slot_epoch=2, generation=1).
  • DurableScheduleAndCancelAsync_ShouldFenceGenerationWithSlotEpoch verifies the durable scheduler returns v2 leases and forwards the epoch into grain cancel.
  • WorkflowRuntimeCallbackLeaseStateCodecTests.ToStateAndRuntime_ShouldPreserveSlotEpoch verifies workflow lease persistence preserves the typed epoch.
  • Runtime callback proto/envelope tests cover scheduler state round-trip and fired envelope slot epoch stamping.

Validation run on clean detached PR worktree:

  • dotnet test test/Aevatar.Foundation.Runtime.Hosting.Tests/Aevatar.Foundation.Runtime.Hosting.Tests.csproj --no-restore --nologo --filter "FullyQualifiedName~RuntimeCallbackSchedulerStateProtoTests|FullyQualifiedName~OrleansActorRuntimeCallbackSchedulerTests|FullyQualifiedName~RuntimeCallbackEnvelopeFactoryTests|FullyQualifiedName~OrleansActorRuntimeForwardingTests": passed, 30 tests, 0 skipped.
  • dotnet test test/Aevatar.Workflow.Core.Tests/Aevatar.Workflow.Core.Tests.csproj --nologo --filter "FullyQualifiedName~WorkflowRuntimeCallbackLeaseStateCodecTests|FullyQualifiedName~SubWorkflowOrchestratorStateCoverageTests": passed, 9 tests, 0 skipped.
  • bash tools/ci/runtime_callback_guards.sh: passed.
  • bash tools/ci/test_stability_guards.sh: passed.

Note: an earlier parallel dotnet test invocation hit an MSBuild deps.json file lock because two test commands shared project output directories. The same Foundation command passed when rerun serially, so this is not a PR regression.

REVIEW_DONE:880:tests:approve

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

📊 codex 进展 review-pr880-tests-r2 (⏳ 进行中; 已跑 12 min)

EOF
gh pr comment 880 --body-file /tmp/pr880-tests-r2-comment.md' in /Users/auric/aevatar-wt-iter48-cluster-048-runtime-callback-persistent-state-not-proto
 succeeded in 1620ms:
https://github.com/aevatarAI/aevatar/pull/880#issuecomment-4525136104

codex
Review 内容已整理为 r2 tests approve 评论并正在提交到 PR。
codex
已完成 PR #880 tests r2 review,并评论到 PR:

https://github.com/aevatarAI/aevatar/pull/880#issuecomment-4525136104

结果:fix-r1 已覆盖 typed `slot_epoch` fencing,targeted tests 与 guards 通过,无新 tests blocker。

REVIEW_DONE:880:tests:approve

⟦AI:AUTO-LOOP⟧
tokens used
64,624
已完成 PR #880 tests r2 review,并评论到 PR:

https://github.com/aevatarAI/aevatar/pull/880#issuecomment-4525136104

结果:fix-r1 已覆盖 typed `slot_epoch` fencing,targeted tests 与 guards 通过,无新 tests blocker。

自动更新每 10 分钟;edit-in-place 不堆评论;codex 完成后此 comment 自动删除(per Auric "完成后删掉就好了 否则太占空间")。
🤖 controller progress reporter

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

📊 状态 — fix-r2 push 完成,等 CI

commit 98d0c8ce 补 coverage。CI run 26332229508 queued。

⟦AI:AUTO-LOOP⟧

@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

❌ Patch coverage is 85.33333% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.92%. Comparing base (9763437) to head (cf567c2).
⚠️ Report is 18 commits behind head on auto-refact-dev.

Files with missing lines Patch % Lines
.../Grains/Callbacks/RuntimeCallbackSchedulerGrain.cs 75.00% 10 Missing and 1 partial ⚠️
@@                 Coverage Diff                 @@
##           auto-refact-dev     #880      +/-   ##
===================================================
+ Coverage            82.83%   82.92%   +0.08%     
===================================================
  Files                  998      994       -4     
  Lines                63092    63055      -37     
  Branches              8161     8157       -4     
===================================================
+ Hits                 52261    52286      +25     
+ Misses                7304     7244      -60     
+ Partials              3527     3525       -2     
Flag Coverage Δ
ci 82.92% <85.33%> (+0.08%) ⬆️

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

Files with missing lines Coverage Δ
.../Runtime/Callbacks/RuntimeCallbackEnvelopeState.cs 77.14% <100.00%> (+8.39%) ⬆️
...ractions/Runtime/Callbacks/RuntimeCallbackLease.cs 100.00% <100.00%> (ø)
...cks/OrleansActorRuntimeDurableCallbackScheduler.cs 92.47% <100.00%> (+0.51%) ⬆️
...Callbacks/InMemoryActorRuntimeCallbackScheduler.cs 73.97% <100.00%> (ø)
...untime/Callbacks/RuntimeCallbackEnvelopeFactory.cs 92.85% <100.00%> (+0.35%) ⬆️
...xecution/WorkflowRuntimeCallbackLeaseStateCodec.cs 93.33% <100.00%> (+12.56%) ⬆️
...orkflow.Core/Primitives/SubWorkflowOrchestrator.cs 79.43% <100.00%> (+0.03%) ⬆️
.../Grains/Callbacks/RuntimeCallbackSchedulerGrain.cs 49.18% <75.00%> (+14.56%) ⬆️

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

📊 codex 进展 fix-pr880-r3-codecov (⏳ 进行中; 已跑 9 min)

+        RuntimeCallbackScheduleDeliveryMode protoMode,
+        RuntimeCallbackDeliveryMode runtimeMode)
+    {
+        var method = typeof(RuntimeCallbackSchedulerGrain).GetMethod(
+            "FromProtoDeliveryMode",
+            BindingFlags.NonPublic | BindingFlags.Static);
+
+        method.Should().NotBeNull();
+        method!.Invoke(null, [protoMode]).Should().Be(runtimeMode);
+    }
+
     private static EventEnvelope CreateEnvelope(string id) => new()
     {
         Id = id,

tokens used
111,922
Done. Added pure test coverage for slot epoch typed callback lines and pushed PR #880 head to `7d03d9ca`.

Validated locally:
- `dotnet test test/Aevatar.Foundation.Runtime.Hosting.Tests/Aevatar.Foundation.Runtime.Hosting.Tests.csproj --nologo --collect:"XPlat Code Coverage"` passed
- `bash tools/ci/test_stability_guards.sh` passed
- `git diff --check` passed

PR checks restarted; `changes` was in progress when I checked.

自动更新每 10 分钟;edit-in-place 不堆评论;codex 完成后此 comment 自动删除(per Auric "完成后删掉就好了 否则太占空间")。
🤖 controller progress reporter

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

📊 codex 进展 fix-pr880-r4-codecov (⏳ 进行中; 已跑 8 min)

+        Generation = generation,
+        SlotEpoch = RuntimeCallbackSlotEpoch.OrleansSchedulerV2,
+        DueTimeMillis = 1000,
+        DeliveryMode = RuntimeCallbackScheduleDeliveryMode.FiredSelfEvent,
+        TriggerEnvelope = CreateEnvelope("evt-1"),
+    };
+
     private class RuntimeCallbackPersistentStateProxy : DispatchProxy
     {
         public RuntimeCallbackSchedulerState State { get; set; } = new();

tokens used
133,427
已完成并推送到 PR #880 分支,head 现在是 `cf567c2d`.

变更只改测试:
- [RuntimeCallbackSchedulerStateProtoTests.cs](/Users/auric/aevatar-wt-iter48-cluster-048-runtime-callback-persistent-state-not-proto/test/Aevatar.Foundation.Runtime.Hosting.Tests/RuntimeCallbackSchedulerStateProtoTests.cs)
- 补了 `RuntimeCallbackSchedulerGrain` 的 generation mismatch、slot epoch match cancel、unknown delivery mode 分支覆盖。

验证通过:
- `dotnet test test/Aevatar.Foundation.Runtime.Hosting.Tests/Aevatar.Foundation.Runtime.Hosting.Tests.csproj --nologo --collect:"XPlat Code Coverage"`:217 passed, 15 skipped
- `bash tools/ci/test_stability_guards.sh`
- `git diff --check`

PR checks 已重新开始,当前看到 `changes` in progress。

自动更新每 10 分钟;edit-in-place 不堆评论;codex 完成后此 comment 自动删除(per Auric "完成后删掉就好了 否则太占空间")。
🤖 controller progress reporter

@loning loning merged commit 0b626b1 into auto-refact-dev May 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant