feat(object-gateway): 统一对象写网关与不可变治理日志
方案A:所有对象写入经 loopback 网关,持久计划/grant/intent/逐版本 receipt 与 attempt→grant delivery 落在治理 PG;scope 由 provider+endpoint+bucket 决定, 同一物理桶只允许一个写域。版本 append 不等于 CAS,未锚定计划在首笔业务写前拒绝。 本提交只含网关与其适配层接线、协议文档;生产独占、凭据切换与桶设置未改动。
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
v071 "knowledge-governance/internal/releaseadapter/v071"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestLegacyReleaseRuntimeRefusesBeforeCredentials(t *testing.T) {
|
||||
// Empty credential paths would fail differently if route assembly were reached.
|
||||
runtime, e := buildReleaseRuntime(context.Background(), releaseRuntimeConfig{})
|
||||
if runtime != nil || e == nil || e.Error() != v071.CheckLegacyObjectWrites().Error() {
|
||||
t.Fatal("legacy runtime did not fail at the no-write gate", e)
|
||||
}
|
||||
route, pools, e := buildReleaseRoute(context.Background(), "", releaseTargetSnapshotConfig{}, releaseRouteConfig{})
|
||||
if route != nil || len(pools) != 0 || e == nil || e.Error() != v071.CheckLegacyObjectWrites().Error() {
|
||||
t.Fatal("direct route bypassed the no-write gate", e)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user