Skip to content

iter56 cluster-868: endpoint runtime lifecycle 收口 + DraftRun interaction port#918

Merged
loning merged 1 commit into
auto-refact-devfrom
refactor/iter56-cluster-868-endpoint-runtime-lifecycle
May 23, 2026
Merged

iter56 cluster-868: endpoint runtime lifecycle 收口 + DraftRun interaction port#918
loning merged 1 commit into
auto-refact-devfrom
refactor/iter56-cluster-868-endpoint-runtime-lifecycle

Conversation

@loning
Copy link
Copy Markdown
Contributor

@loning loning commented May 23, 2026

摘要

iter56 cluster-868 — Phase 9 r4 unanimous(4 轮收敛后达成 IGAgentDraftRunInteractionPort framing):

核心:NyxIdChat / DraftRun endpoint 不再直接操作 `IActorRuntime`,所有 endpoint runtime lifecycle 走 Application interaction port + CQRS Core 命令骨架。

  • 新增 `IGAgentDraftRunInteractionPort`:DraftRun actor create/reuse/register/rollback 收敛到 Application interaction service
  • 删除 旧 `IGAgentDraftRunActorPreparationPort` + preparation service surface(被 interaction port 取代)
  • NyxID stream/approval endpoint 不再直接注入/读取 `IActorRuntime`
  • NyxID relay endpoint 改走 `INyxIdRelayIngressPort`,不再直接 create actor / dispatch envelope

边界

  • 不新增 Core CQRS cleanup semantics
  • 不新增 actor type / envelope kind / Projection phase
  • DraftRun rollback 走 interaction port(per consensus,resolver/target cleanup 不足以处理 pre-dispatch BindAsync / observation start failure)

影响范围

agents/Aevatar.GAgents.NyxidChat/* (Relay / Streaming endpoints + NyxIdRelayIngressPort)
src/platform/Aevatar.GAgentService.Abstractions/ScopeGAgents/GAgentDraftRunInteractionContracts.cs (new)
src/platform/Aevatar.GAgentService.Application/ScopeGAgents/GAgentDraftRunInteractionService.cs (new)
src/platform/Aevatar.GAgentService.Hosting/Endpoints/ScopeGAgentEndpoints.cs
- 删除 GAgentDraftRunPreparationContracts + ActorPreparationService + 对应 test
+ 新增 InteractionContracts + InteractionService + 对应 test

LOC +1005/-1154 net -149(包含 4 个新增文件后净减)

Coverage

  • Patch coverage 238/252 = 94.44%

验证

  • bash tools/ci/test_stability_guards.sh PASS
  • bash tools/ci/architecture_guards.sh PASS
  • GAgentDraftRun (37) + ScopeGAgentEndpoints (50) + NyxIdChat (96) = 183 tests PASS

Closes #868

🤖 Auto-loop / codex-refactor-loop iter56

⟦AI:AUTO-LOOP⟧

…ion port

#868 Phase 9 r4 consensus(4 轮收敛达成 IGAgentDraftRunInteractionPort):

- 新增 IGAgentDraftRunInteractionPort:DraftRun actor create/reuse/register/rollback 收敛到 Application interaction service
- 删除旧 IGAgentDraftRunActorPreparationPort + preparation service surface(被 interaction port 取代)
- NyxID stream/approval endpoint 不再直接注入/读取 IActorRuntime
- NyxID relay endpoint 改走 INyxIdRelayIngressPort,不再直接 create actor / dispatch envelope
- 补 unit + integration + NyxID coverage tests

LOC +1005/-1154 net -149(大 cleanup)
Patch coverage 238/252 = 94.44%
GAgentDraftRun + ScopeGAgentEndpoints + NyxIdChat tests 183 passed
test_stability_guards.sh + architecture_guards.sh PASS

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

loning commented May 23, 2026

📊 状态卡片 — reviewer 派出

维度
阶段 派出 codex(role=reviewer)
codex log review-pr918-omnibus-r1.log
工作目录 /Users/auric/aevatar
timeout 5400s(~90 min 上限)
上下文 omnibus r1 派出(architect+tests+quality;DraftRun interaction port,94.44% patch coverage)
下一步自动会做 1. 三 reviewer 完成 verdict marker 2. controller 计算 consensus 3. unanimous → auto-merge / reject → fix r<N+1>
是否需要人介入 ❌ 否(自动推进)

🤖 controller status banner

⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 23, 2026

📊 codex 进展 review-pr918-omnibus-r1 (⏳ 进行中; 已跑 3 min)

No reject findings.

Architect: endpoint source no longer injects `IActorRuntime`; DraftRun endpoint delegates through `IGAgentDraftRunInteractionPort`; Nyx relay endpoint delegates through `INyxIdRelayIngressPort`; I did not find new CQRS Core cleanup semantics, actor type semantics, or projection phase changes in the patch.

Tests/quality: `GAgentDraftRunInteractionPortTests` covers the new port lifecycle/rollback behavior, integration tests verify endpoint delegation through the port, and old preparation port references are gone from active code. Remaining mentions are source guards or historical docs. Naming is consistent with the requested business-level interaction/ingress boundary.

Verification passed:
`test_stability_guards.sh`
`architecture_guards.sh`
`dotnet test test/Aevatar.GAgentService.Tests/Aevatar.GAgentService.Tests.csproj --filter GAgentDraftRun --nologo` passed with 37/37 tests.

REVIEW_DONE:918:omnibus:approve
⟦AI:AUTO-LOOP⟧
tokens used
108,865
No reject findings.

Architect: endpoint source no longer injects `IActorRuntime`; DraftRun endpoint delegates through `IGAgentDraftRunInteractionPort`; Nyx relay endpoint delegates through `INyxIdRelayIngressPort`; I did not find new CQRS Core cleanup semantics, actor type semantics, or projection phase changes in the patch.

Tests/quality: `GAgentDraftRunInteractionPortTests` covers the new port lifecycle/rollback behavior, integration tests verify endpoint delegation through the port, and old preparation port references are gone from active code. Remaining mentions are source guards or historical docs. Naming is consistent with the requested business-level interaction/ingress boundary.

Verification passed:
`test_stability_guards.sh`
`architecture_guards.sh`
`dotnet test test/Aevatar.GAgentService.Tests/Aevatar.GAgentService.Tests.csproj --filter GAgentDraftRun --nologo` passed with 37/37 tests.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

❌ Patch coverage is 88.02395% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.17%. Comparing base (3d041bc) to head (3d25ba8).
⚠️ Report is 2 commits behind head on auto-refact-dev.

Files with missing lines Patch % Lines
...n/ScopeGAgents/GAgentDraftRunInteractionService.cs 86.66% 9 Missing and 9 partials ⚠️
...tService.Hosting/Endpoints/ScopeGAgentEndpoints.cs 87.50% 0 Missing and 2 partials ⚠️
@@                 Coverage Diff                 @@
##           auto-refact-dev     #918      +/-   ##
===================================================
- Coverage            83.20%   83.17%   -0.03%     
===================================================
  Files                  992      995       +3     
  Lines                63389    63502     +113     
  Branches              8198     8214      +16     
===================================================
+ Hits                 52744    52819      +75     
- Misses                7113     7135      +22     
- Partials              3532     3548      +16     
Flag Coverage Δ
ci 83.17% <88.02%> (-0.03%) ⬇️

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

Files with missing lines Coverage Δ
...ScopeGAgents/GAgentDraftRunInteractionContracts.cs 100.00% <100.00%> (ø)
...cation/ScopeGAgents/ServiceCollectionExtensions.cs 100.00% <100.00%> (ø)
...tService.Hosting/Endpoints/ScopeGAgentEndpoints.cs 86.93% <87.50%> (-0.78%) ⬇️
...n/ScopeGAgents/GAgentDraftRunInteractionService.cs 86.66% <86.66%> (ø)

... and 8 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 进展 bootstrap-audit-60-issues (⏳ 进行中; 已跑 7 min)

[refactor-design] cluster-062-runtime-recovery-by-actorid-prefix
refactor-design-needed, auto-loop, phase9-auto-solve, 🔍 phase:design-solving, 🤖 human:auto-推进
⟦AI:AUTO-LOOP⟧


codex
BOOTSTRAP_DONE:audit-iter-60:opened-2:skipped-1

Opened:
- #920 `[refactor-design] cluster-061-workflow-catalog-sync-query-blocking`
- #921 `[refactor-design] cluster-062-runtime-recovery-by-actorid-prefix`

Skipped:
- `cluster-060-command-path-projection-activation`: duplicate of #910, already merged in PR #916. PR #916 removed command-path projection activation and replaced Studio activation with committed-state provider.

Dedup checked against open #911/#917, merged PR #909/#913/#915/#916/#918, and audit-iter-56/57/58/59 clusters.
tokens used
46,930
BOOTSTRAP_DONE:audit-iter-60:opened-2:skipped-1

Opened:
- #920 `[refactor-design] cluster-061-workflow-catalog-sync-query-blocking`
- #921 `[refactor-design] cluster-062-runtime-recovery-by-actorid-prefix`

Skipped:

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

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