Skip to content

[archtest] 实现 CELLTLS-CROSSBIND-WIRING / -MATERIAL-RESOLVE funnel(ADR 声明未落地的 Medium 守卫) #2489

Description

@ghbvf

现状

ADR docs/architecture/202606171200-2263-adr-cross-cell-transport-mtls.md 的威胁矩阵(行 166)与 AI-robust 档位表(行 192/194)声明了两个 Medium archtest 守卫,但二者在 tools/archtest/ 中从未实现:

  • CELLTLS-CROSSBIND-WIRING-FUNNEL-01(行 194:「internal listener 必有 cross-bind middleware」wiring 层 AST scan)
  • CELLTLS-MATERIAL-RESOLVE-FUNNEL-01(行 192:「celltls.Resolve 是唯一 minter」caller-funnel)

证据:grep -rln "CELLTLS-CROSSBIND-WIRING\|CELLTLS-MATERIAL-RESOLVE" tools/archtest/ → 零命中;仅 CELLTLS-MATERIAL-FUNNEL-01(守 tlsutil.NewClientIdentity/NewServerMTLSConfig callsite)真实存在。

三维根因:

影响范围:直接=ADR 三处声明与代码现状漂移;间接=未来 AI co-author 若改 bootstrap auto-append 或在 wiring 层直调 PeerCellCrossBindMiddleware/NewClientIdentity 绕过,无机器守卫拦截;同类 Grep=PeerCellCrossBindMiddleware 生产仅 1 处调用(auth_plan_apply.go:143),NewClientIdentity 仅 celltls.Resolve 调用。

修复方向

  • 最小:把 ADR 三处「archtest 守卫」声明降级为「bootstrap auto-append + unit test enforce(archtest 待建,本 issue)」,使文档诚实——已由 PR refactor(auth): #2297 split mTLS allow-set 成员制解除一进程一 cell #2481 对行 166 部分完成。
  • 彻底(本 issue 目标):实现两个 archtest(参照既有 tools/archtest/celltls_material_funnel.go + RED fixture + anti-vacuity):
    • CELLTLS-CROSSBIND-WIRING-FUNNEL-01:扫描 listener auth chain 含 AuthMTLS+AuthServiceToken 时必经 PeerCellCrossBindMiddleware auto-append;allowlist auth_plan_apply.go,wiring 层(cmd/cellmodules/examples)直调即红。需确认 integration test 直调的豁免边界。
    • CELLTLS-MATERIAL-RESOLVE-FUNNEL-01:caller-funnel,tlsutil.NewClientIdentity 在 wiring 层只由 cellmodules/celltls 调用(与 EVENT-TRANSPORT-KIND-MINTER-FUNNEL-01 同族)。
  • 重构:评估能否把 cross-bind wiring 收口为 codegen 派生(Hard),而非运行期 auto-append + archtest(Medium)。

Files

  • docs/architecture/202606171200-2263-adr-cross-cell-transport-mtls.md:166
  • docs/architecture/202606171200-2263-adr-cross-cell-transport-mtls.md:192
  • docs/architecture/202606171200-2263-adr-cross-cell-transport-mtls.md:194
  • tools/archtest/celltls_material_funnel.go (参照范本)
  • framework/runtime/bootstrap/auth_plan_apply.go:143 (cross-bind auto-append wiring)
  • framework/runtime/auth/peer_cell_crossbind.go (PeerCellCrossBindMiddleware)

Source

PR #2481 finding F1(review path:架构+测试 / 安全+产品 / 运维+DX 三 reviewer 一致 P1)。Discovered via /ship #2297。pre-existing #2263 治理债,非 #2297 引入。

Activity

  1. added
    area-tooling元数据治理/archtest + codegen/工具链
    backlogBacklog item — automation trigger 入 project
    cx-2Cx2 改动量:同包 ≤5 文件
    on Jun 19, 2026
  2. added a commit that references this issue on Jun 19, 2026
  3. moved this from Backlog to Ready in gocellon Jun 19, 2026
  4. added a commit that references this issue on Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-tooling元数据治理/archtest + codegen/工具链backlogBacklog item — automation trigger 入 projectcx-2Cx2 改动量:同包 ≤5 文件pri-p1Priority P1type-debt技术债

    Projects

    • Status
      Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions