iter49 issue-882 script-command-readmodel-activation: 移 activation 出 command service#886
Conversation
…command service,改 committed-state plan provider 按 issue #882 Phase 9 r1 consensus(meta-judge: structural): - ScopeScriptCommandApplicationService 删 ActivateAsync(definitionActorId/catalogActorId) - 新 scripting committed-state projection activation plan provider(参考 PR #875 HealthProbe pattern) - command receipts accepted-only,不暗示 readmodel visibility 不引入新 actor / 不改外部 contract。 Closes #882 ⟦AI:AUTO-LOOP⟧
PR #886 quality review r1Marker: Scope reviewed:
Verdict: reject. Findings
Quality Notes
Verification
REVIEW_DONE:886:quality:reject |
PR #886 Tests Review r1Role: Phase 8 Reviewer (tests) Verdictreject Scope Checked
Blocking Finding
The PR removes Required fix:
Coverage Notes
Verification
REVIEW_DONE:886:tests:reject ⟦AI:AUTO-LOOP⟧ |
🤖 architect r1: 结构方向正确,但 PR #886 仍需退回修测试编译TL;DR
详细说明生产路径我没有看到架构倒退: 阻塞点在 PR HEAD 的未改测试文件: 📎 完整 codex 原始输出(存档备查)---
pr: 886
role: architect
round: r1
head: 11ffa0aee0d5873a41130b2995ef09fa3c8d705d
verdict: reject
---
# PR #886 architect review r1
Marker: `REVIEW_DONE:886:architect:reject`
Scope reviewed:
- `git diff origin/auto-refact-dev...origin/refactor/iter49-cluster-049-script-command-readmodel-activation`
- PR HEAD: `11ffa0aee0d5873a41130b2995ef09fa3c8d705d`
## Verdict
Reject: the production architecture shape matches the Phase 9 structural consensus, but the PR branch is not verifiable because an integration test still depends on the removed command-service activation port and asserts the old activation behavior.
## Evidence
- `src/platform/Aevatar.GAgentService.Application/Scripts/ScopeScriptCommandApplicationService.cs:12-19` on PR HEAD only depends on `IScriptDefinitionCommandPort`, `IScriptCatalogCommandPort`, and `IOptions<ScopeScriptCapabilityOptions>`; `git grep` on the PR ref finds no executable `ActivateAsync` call in that file. This satisfies the requested "activation out of command service" check.
- `src/Aevatar.Scripting.Projection/Orchestration/ScriptingCommittedStateProjectionActivationPlanProvider.cs:23-36` maps committed `ScriptDefinitionGAgent` and `ScriptCatalogGAgent` state events to activation plans, and `src/Aevatar.Scripting.Projection/Orchestration/ScriptingCommittedStateProjectionActivationPlanProvider.cs:39-48` starts the existing `ScriptAuthorityRuntimeLease` durable materialization scope. This follows the #875 pattern: committed-state hook owns projection activation, no command-path priming.
- `src/Aevatar.Scripting.Projection/DependencyInjection/ServiceCollectionExtensions.cs:114-120` registers `ProjectionActivationPlanDispatcher`, `CommittedStateProjectionActivationHook`, and the scripting `IProjectionActivationPlanProvider` together with the existing scripting projection components. This is the expected committed-state activation registration surface.
- `src/platform/Aevatar.GAgentService.Abstractions/ScopeScripts/ScopeScriptModels.cs:49-52` returns only `ScopeScriptCommandAcceptedHandle` values for the definition/catalog commands, and `src/Aevatar.Scripting.Core/Ports/ScriptingCommandAcceptedReceipt.cs:3-7` is an accepted receipt carrying actor id, command id, correlation id, and accepted time. I did not find committed/read-model-observed semantics added to the command receipt.
- No new actor type is introduced by the six-file diff. The only `ProjectionMaterializationScopeGAgent` / `ProjectionSessionScopeGAgent` references in the changed files are pre-existing runtime registrations in `ServiceCollectionExtensions.cs`; the new file is only a plan provider.
- Blocking verifiability issue: `test/Aevatar.GAgentService.Integration.Tests/ScopeScriptCapabilityServiceTests.cs:40-44` on PR HEAD still constructs `ScopeScriptCommandApplicationService` with the removed `IScriptAuthorityReadModelActivationPort` argument, and `test/Aevatar.GAgentService.Integration.Tests/ScopeScriptCapabilityServiceTests.cs:63` still asserts the old definition/catalog readmodel activation calls. This violates AGENTS: "变更必须可验证:架构调整需同步文档,且 `build/test` 通过。" It also leaves a test asserting the old command-path activation pattern that this PR is supposed to delete.
## What would change the verdict
- Update `test/Aevatar.GAgentService.Integration.Tests/ScopeScriptCapabilityServiceTests.cs` to use the new three-argument `ScopeScriptCommandApplicationService` constructor.
- Remove or invert the stale `authorityReadModelActivationPort.Calls` assertion so integration tests no longer encode command-path readmodel activation.
- Re-run the affected integration test project, at minimum:
`dotnet test test/Aevatar.GAgentService.Integration.Tests/Aevatar.GAgentService.Integration.Tests.csproj --nologo --filter FullyQualifiedName~ScopeScriptApplicationServicesTests`
## Verification
- `git diff --check origin/auto-refact-dev...origin/refactor/iter49-cluster-049-script-command-readmodel-activation`: passed.
- Greptile triage: no live Greptile comments found for PR #886.
- `dotnet test test/Aevatar.GAgentService.Integration.Tests/Aevatar.GAgentService.Integration.Tests.csproj --nologo --filter FullyQualifiedName~ScopeScriptApplicationServicesTests` in the PR worktree failed at compile time with `CS1729: 'ScopeScriptCommandApplicationService' does not contain a constructor that takes 4 arguments`.
REVIEW_DONE:886:architect:reject
⟦AI:AUTO-LOOP⟧⟦AI:AUTO-LOOP⟧ |
📊 codex 进展 review-pr886-quality-r1 (⏳ 进行中; 已跑 9 min)
|
📊 codex 进展 review-pr886-tests-r1 (⏳ 进行中; 已跑 9 min)
|
|
Round 2 integration compile fix applied. Changed:
Verification:
FIX_DONE:886:round-2:applied-1:rejected-0:blocked-0 ⟦AI:AUTO-LOOP⟧ |
按 PR #886 r1 全 3 reject 根本因(CS1729 编译错误): - ScopeScriptCapabilityServiceTests.cs:40 更新 constructor 到新 signature - 删除/更新旧 ActivateAsync 断言(activation 已移到 ScriptingCommittedStateProjectionActivationPlanProvider) applied=1 rejected=0 blocked=0(per fix-pr886-r2 codex) ⟦AI:AUTO-LOOP⟧
📊 codex 进展 fix-pr886-r2 (⏳ 进行中; 已跑 9 min)
|
🤖 Phase 8 Reviewer —
|
Phase 8 Reviewer —
|
📊 codex 进展 review-pr886-architect-r2 (⏳ 进行中; 已跑 12 min)
|
📊 codex 进展 review-pr886-tests-r2 (⏳ 进行中; 已跑 12 min)
|
PR #886 quality review r2Marker: Scope reviewed:
Verdict: reject. Findings
Evidence
Verification
REVIEW_DONE:886:quality:reject |
|
Round 3 Codecov coverage-gap fix applied. Changed:
Codecov detail:
Verification:
Report: FIX_DONE:886:round-3:applied-1:rejected-0:blocked-0 ⟦AI:AUTO-LOOP⟧ |
📊 状态 — fix-r3 done + quality reviewer r3 dispatchfix-r3 commit r2 only quality reject → r3 派 quality 单 reviewer 验证(architect/tests r2 已 approve);quality approve + CI green → merge。 ⟦AI:AUTO-LOOP⟧ |
📊 状态 — quality r3 reject(CI infra),派 investigatorquality r3 reject 原因不是 PR 代码: 派独立 investigator codex 查根因 → 决策 → 准备 infra fix。本 PR 暂保 reviewing,等 infra issue/PR fix 后重审 quality。 ⟦AI:AUTO-LOOP⟧ |
…-run projection(同 pattern) Follow-up #889:同根 PROJECTION_DISABLED pattern 但走 draft-run lifecycle 而非 evolution session。test fixture 调 query 前没 activate draft-run projection → 抛 Projection disabled。 修法同 #889 pattern:test-only DI wrapper,前置 EnsureActorProjectionAsync,不动 production。 验证: - ScopeDraftRunActorQueryIntegrationTests PASS - coverage_quality_guard.sh PASS,reached coverage analysis line 88.3% branch 72.3% - test_stability_guards PASS #883/#884/#886/#872 等本 PR merge 后应可全 unblock CI。 ⟦AI:AUTO-LOOP⟧
…projection (#890) * fix(#889): integration fixture pre-activate script evolution session projection Root: attach-only projection lifecycle refactor 后,integration test 调 ProposeAsync 之前没 activate evolution session projection → RuntimeScriptEvolutionInteractionService 抛 'Script evolution projection is disabled'。CI coverage-quality 暴露此 fixture drift。 修法:test/Aevatar.Integration.Tests/ScriptEvolutionIntegrationTestKit.cs 加 test-only DI wrapper(IScriptEvolutionApplicationService + IScriptEvolutionProposalPort),normalize ScopeId/ProposalId 同 production,resolve sessionActorId via IScriptingActorAddressResolver,EnsureActorProjectionAsync 前置 lease,null 时显式失败。Host-backed 测试 ScriptAutonomousEvolutionOrleans3ClusterConsistencyTests 同样 post-AddScriptCapability 应用。 不动 production runtime semantics。 注:coverage_quality_guard.sh 仍可能 exit 1,因独立 ScopeDraftRunActorQueryIntegrationTests 也走相同 PROJECTION_DISABLED 路径(draft-run 而非 evolution session)— 已 follow-up。 ⟦AI:AUTO-LOOP⟧ * fix(#890): ScopeDraftRunActorQueryIntegrationTests pre-activate draft-run projection(同 pattern) Follow-up #889:同根 PROJECTION_DISABLED pattern 但走 draft-run lifecycle 而非 evolution session。test fixture 调 query 前没 activate draft-run projection → 抛 Projection disabled。 修法同 #889 pattern:test-only DI wrapper,前置 EnsureActorProjectionAsync,不动 production。 验证: - ScopeDraftRunActorQueryIntegrationTests PASS - coverage_quality_guard.sh PASS,reached coverage analysis line 88.3% branch 72.3% - test_stability_guards PASS #883/#884/#886/#872 等本 PR merge 后应可全 unblock CI。 ⟦AI:AUTO-LOOP⟧
…t-command-readmodel-activation
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## auto-refact-dev #886 +/- ##
===================================================
+ Coverage 82.79% 82.81% +0.02%
===================================================
Files 991 992 +1
Lines 62523 62560 +37
Branches 8099 8104 +5
===================================================
+ Hits 51763 51807 +44
+ Misses 7256 7254 -2
+ Partials 3504 3499 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
摘要
iter49 issue-882 cluster-049-script-command-readmodel-activation(high,R04-cqrs-read-write-separation)。
ScopeScriptCommandApplicationService.UpsertAsync调_authorityReadModelActivationPort.ActivateAsync(definitionActorId/catalogActorId)在写命令前先启动 readmodel projection — query/write 绑同请求栈。ScriptingCommittedStateProjectionActivationPlanProvider(参考 iter47 cluster-005 status-dashboard-startup-projection-activation: HealthProbeStartupService 改 committed-state activation #875 HealthProbe pattern);command receipts accepted-only。Phase 9 共识
META_JUDGE_DONE:consensus:structural:move scope-script authority readmodel activation out of command service into scripting committed-state projection activation plans, with command receipts accepted-only改动范围
6 files (+217/-41):
不引入新 actor。
Closes #882
📢 cc: @loning
🤖 Auto-loop / codex-refactor-loop iter49
⟦AI:AUTO-LOOP⟧