Skip to content

iter57 cluster-072: Studio catalog storage Protobuf serializers (#955)#956

Merged
loning merged 2 commits into
auto-refact-devfrom
refactor/iter57-cluster-072-studio-catalog-serializers
May 24, 2026
Merged

iter57 cluster-072: Studio catalog storage Protobuf serializers (#955)#956
loning merged 2 commits into
auto-refact-devfrom
refactor/iter57-cluster-072-studio-catalog-serializers

Conversation

@loning
Copy link
Copy Markdown
Contributor

@loning loning commented May 24, 2026

摘要

iter57 cluster-072(severity:medium)— Studio catalog storage 改用 Protobuf serializer

  • Old:Studio catalog 存储用 JSON serializer 持久化(违反 CLAUDE "统一 Protobuf:State 持久化必须用 Protobuf")
  • New:StudioCatalogProtobufStorageSerializer 替代;ConnectorCatalogStorageSerializer + RoleCatalogStorageSerializer 改用 typed proto;tools/ci/studio_catalog_storage_serializer_guard.sh 加强防回流

违反:CLAUDE.md「序列化(强制)— 统一 Protobuf」「禁止 JSON/XML/自定义字符串格式用于 Actor State、WorkflowRun State、模块持久态、投影检查点等事实存储」

Scope

8 files changed(+526 / −591 净 −65)— ConnectorCatalog / RoleCatalog 两条主存储 path + Studio local reader + 新 guard

local PASS:architecture_guards + test_stability + dotnet build + StudioCatalogProtobufStorageSerializerTests

closes #955

🤖 Generated with Claude Code via codex-refactor-loop iter57

⟦AI:AUTO-LOOP⟧

issue #955 direct implement(medium severity,no design):
- Studio catalog 存储改用 Protobuf 序列化(满足 CLAUDE '统一 Protobuf' 强制)
- 新 StudioCatalogProtobufStorageSerializer + 测试
- 删除原 JSON serializer(违反 '禁止 JSON 用于持久态')

closes #955
local PASS:architecture + test_stability + build + StudioCatalogProtobufStorageSerializerTests

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

loning commented May 24, 2026

Findings:

  1. src/Aevatar.Studio.Infrastructure/Storage/ConnectorCatalogStorageSerializer.cs:8 and src/Aevatar.Studio.Infrastructure/Storage/RoleCatalogStorageSerializer.cs:8 are no longer on any production path. After this PR, local catalog import reads JSON through StudioLocalCatalogImportReader plus the import parsers, while catalog/draft writes and reads are handled directly by the actor-backed stores through proto events/readmodels. git grep on the PR head only finds these serializers in tests and the new guard. That leaves a production layer with no business use, which violates the repo rule to delete invalid/pass-through layers, and it makes the stated storage serializer replacement mostly unobservable in runtime behavior.

  2. tools/ci/studio_catalog_storage_serializer_guard.sh:9 only scans those two now-unused serializer files. Because the real production paths are ActorBackedConnectorCatalogStore / ActorBackedRoleCatalogStore and the import parsers, this guard can pass while JSON handling is reintroduced in an actual catalog persistence path. The guard needs to cover the real write/read boundary, or the unused serializers and their tests should be removed and the guard should target the actor-backed/projection storage paths that actually own catalog persistence.

Validation run:

  • dotnet test test/Aevatar.Studio.Tests/Aevatar.Studio.Tests.csproj --nologo --filter StudioCatalogProtobufStorageSerializerTests passed, 10/10.
  • bash tools/ci/studio_catalog_storage_serializer_guard.sh passed.
  • bash tools/ci/test_stability_guards.sh passed.
  • bash tools/ci/architecture_guards.sh passed.

Verdict: reject until the Protobuf serializer/guard is either wired into the actual production persistence boundary or removed in favor of guarding the real actor-backed catalog path.

REVIEW_DONE:956:omnibus:reject
⟦AI:AUTO-LOOP⟧

@loning
Copy link
Copy Markdown
Contributor Author

loning commented May 24, 2026

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


codex
Posted PR comment with verdict `reject`: https://github.com/aevatarAI/aevatar/pull/956#issuecomment-4527717687

Could not submit a formal “request changes” review because GitHub rejects that on the current user’s own PR, so I posted the review as a PR comment.

Validation passed:
- targeted Studio serializer tests: 10/10
- `studio_catalog_storage_serializer_guard.sh`
- `test_stability_guards.sh`
- `architecture_guards.sh`

REVIEW_DONE:956:omnibus:reject
⟦AI:AUTO-LOOP⟧
tokens used
145,919
Posted PR comment with verdict `reject`: https://github.com/aevatarAI/aevatar/pull/956#issuecomment-4527717687

Could not submit a formal “request changes” review because GitHub rejects that on the current user’s own PR, so I posted the review as a PR comment.

Validation passed:
- targeted Studio serializer tests: 10/10
- `studio_catalog_storage_serializer_guard.sh`
- `test_stability_guards.sh`
- `architecture_guards.sh`

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

…径(actor-backed catalog stores)

PR #956 r1 reject 2 blockers:
- ConnectorCatalogStorageSerializer + RoleCatalogStorageSerializer 不在 production path(只 tests + guard)
- guard 只扫这 2 unused files,真路径 ActorBackedXxxStore + import parsers 没覆盖

修(plan B 删壳+真 guard):
- 删 unused serializer + 相应 tests
- guard 改覆盖 ActorBackedConnectorCatalogStore / ActorBackedRoleCatalogStore + StudioLocalCatalogImportReader + import parsers
- 验:加临时 JSON 入侵真路径 → guard fail;移除 → pass

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

loning commented May 24, 2026

📊 codex 进展 fix-pr956-r2 (⏳ 进行中; 已跑 10 min)

+    exit 1
+  fi
+done
+
 echo "studio_catalog_storage_serializer_guard: ok"

tokens used
82,291
Implemented Plan B.

Removed the unused serializer layer and serializer-only tests:
- [ConnectorCatalogStorageSerializer.cs](/Users/auric/aevatar-wt-iter57-cluster-072-studio-catalog/src/Aevatar.Studio.Infrastructure/Storage/ConnectorCatalogStorageSerializer.cs)
- [RoleCatalogStorageSerializer.cs](/Users/auric/aevatar-wt-iter57-cluster-072-studio-catalog/src/Aevatar.Studio.Infrastructure/Storage/RoleCatalogStorageSerializer.cs)
- old serializer test file

Updated [studio_catalog_storage_serializer_guard.sh](/Users/auric/aevatar-wt-iter57-cluster-072-studio-catalog/tools/ci/studio_catalog_storage_serializer_guard.sh) to cover the real production path: actor-backed catalog stores must stay actor/projection/proto-only, and JSON is only allowed in explicit local import parsers.

Added focused import parser coverage in [StudioCatalogImportParserTests.cs](/Users/auric/aevatar-wt-iter57-cluster-072-studio-catalog/test/Aevatar.Studio.Tests/StudioCatalogImportParserTests.cs).

Verification passed:
- `bash tools/ci/test_stability_guards.sh`
- `bash tools/ci/studio_catalog_storage_serializer_guard.sh`
- `dotnet test test/Aevatar.Studio.Tests/Aevatar.Studio.Tests.csproj --nologo --filter StudioCatalogImportParserTests`

No git commit/push/PR operation performed.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.04%. Comparing base (87e9f2d) to head (49489fa).

@@               Coverage Diff                @@
##           auto-refact-dev     #956   +/-   ##
================================================
  Coverage            83.04%   83.04%           
================================================
  Files                  987      987           
  Lines                63558    63558           
  Branches              8214     8214           
================================================
  Hits                 52780    52780           
  Misses                7246     7246           
  Partials              3532     3532           
Flag Coverage Δ
ci 83.04% <ø> (ø)

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

🚀 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 loning merged commit cbb9ef2 into auto-refact-dev May 24, 2026
12 checks passed
@loning loning deleted the refactor/iter57-cluster-072-studio-catalog-serializers branch May 24, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant