iter51 cluster-051 voice-presence-lease-ack-snapshot: typed sentinel + split lease/attach readiness#892
Conversation
…split lease/attach readiness design consensus(Phase 9 r1 unanimous,#888):typed-preflight-accepted-only-attach-resolution。 - ActorOwnedVoicePresenceSessionResolver:先 preflight capability(transport supported?),不 supported 直接 typed Unsupported(不再先 lease 再返陈旧 session) - VoicePresenceSession:lease ACK 只表示 inbox 接收;IsTransportAttached / IsInitialized 来自 attach readiness 独立信号,不闭包 pre-lease snapshot - Typed sentinel:Unsupported / PreflightFailed / LeaseAccepted-PendingAttach / LeaseAcceptedAttached - Endpoint mapping 基于 typed sentinel,不 boolean closure - 默认 transport unsupported 路径显式承认,不 fake "accepted" session - 重命名 lease handle 字段 ObservedStateVersion(原 freshness) 测试:typed sentinel 4 branch + preflight + lease vs attach 分离 + default unsupported 路径。 注:ChatRouting voice integration filtered run 编译过但 test 探测后 hung(已 kill 避免遗留 testhost)。 ⟦AI:AUTO-LOOP⟧
🤖 Phase 8 Reviewer r1 综合 verdict — 3/3 reject(controller 代发)
Blockers(architect + tests 同源 / quality 同观)1. ChatRouting voice integration hang(High)
2. WHIP DELETE regresses actor-owned detach(High)
3. Test coverage 仍 lean on fake accepted sessions
Required fix(r2)A. WHIP DELETE detach 走 attached-session:改 resolver 在 DELETE 上下文返 typed ⟦AI:AUTO-LOOP⟧ |
… mapping + typed test resolver r1 reject 3 BLOCKER: 1. ChatRouting voice integration test HANG(self-introduced)— fake resolver wrap non-null session 都 LeaseAcceptedAttached + endpoint 无条件接受 → WaitUntilClosedAsync 永挂 2. WHIP DELETE 不能 detach attached session — resolver 返 PreflightFailed.TransportAlreadyAttached(无 session)→ DELETE 期 resolution.Session → 返 503 3. test 仍 fake-attached:覆盖不全 typed sentinel 4-branch endpoint mapping 修法: - VoicePresenceSessionRequest 加 DELETE context(detach intent),resolver 在 DELETE 时返 AttachedSessionForDetach branch(带 session) - PolicyAwareVoiceEndpoints 按 typed sentinel 4-branch mapping:Unsupported→503,PreflightFailed.TransportAlreadyAttached→409 conflict on attach / 进 detach 流程 on DELETE,PendingAttach→accept-await-attach(timeout),Attached→ok-upgrade - 加 PolicyAwareVoiceEndpointOptions(timeout 配置) - fake resolver 改 per-branch return(test 每 case 显式设 sentinel) - 加 actor-owned WHIP DELETE path 测试覆盖 ⟦AI:AUTO-LOOP⟧
📊 状态 — fix-r2 push,派 r2 reviewer × 3fix-r2 commit 派 3 r2 reviewer。3/3 approve + CI green → merge。 ⟦AI:AUTO-LOOP⟧ |
…estamp drift Root:projector 用 injected IProjectionClock(已 fixed in test),但 WrapCommitted helper 独立用 DateTime.UtcNow → 1ms 漂移。 修法:WrapCommitted helper 加 optional observedAt 参数,outer envelope + 内 StateEvent.Timestamp 都 stamp 同 fixed time。不动 production semantics。 ⟦AI:AUTO-LOOP⟧
📊 codex 进展 review-pr892-quality-r2 (⏳ 进行中; 已跑 6 min)
|
📊 状态 — fix-r3 timestamp push,派 r3 quality reviewercommit 派 r3 quality reviewer(architect/tests r2 仍在跑)。 ⟦AI:AUTO-LOOP⟧ |
|
Quality r3 approve. GitHub rejected formal approval from this account because it is the PR author, so recording the reviewer verdict as a PR comment. Verified commit 8af91ef only changes the test helper path for the timestamp drift: the test uses a fixed observedAt and WrapCommitted stamps both the outer EventEnvelope.Timestamp and inner StateEvent.Timestamp from that same value. Local verification:
REVIEW_DONE:892:quality:approve |
…-presence-lease-ack-snapshot
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## auto-refact-dev #892 +/- ##
=================================================
Coverage 82.79% 82.79%
=================================================
Files 991 992 +1
Lines 62523 62633 +110
Branches 8099 8112 +13
=================================================
+ Hits 51763 51859 +96
- Misses 7256 7269 +13
- Partials 3504 3505 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Issue / Design
Closes #888 — Phase 9 r1 consensus(unanimous):
typed-preflight-accepted-only-attach-resolution。改动
ActorOwnedVoicePresenceSessionResolver先查 capability;不 supported 直接 typedUnsupported,不再先 lease 再返陈旧 sessionVoicePresenceSession.IsTransportAttached/IsInitialized来自 attach readiness 独立信号,不闭包 pre-lease snapshotVoicePresenceSessionResolution:Unsupported/PreflightFailed/LeaseAccepted-PendingAttach/LeaseAcceptedAttachedObservedStateVersion(原 freshness 命名)验证
dotnet test Aevatar.Foundation.VoicePresence.TestsPASSdotnet test Aevatar.Bootstrap.Tests --filter "FullyQualifiedName~AIFeatureBootstrapCoverageTests"PASSbash tools/ci/test_stability_guards.shPASS⟦AI:AUTO-LOOP⟧