From 98ccb9366e4070b2ffa2d080186c2ce023e370a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9A=E7=AB=A0=E6=B5=A9?= Date: Mon, 2 Nov 2026 03:48:52 +0800 Subject: [PATCH] =?UTF-8?q?test(ds02):=20=E8=B4=9F=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E8=90=BD=E7=9B=98=E5=B9=B6=E4=BF=AE=E6=AD=A3=20gofmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为什么:CI 在 07a9caf 上 format 红(ds02_identity_test.go 未 gofmt),本地那次 make verify 跑在文件生成之前,不能算数;同时 /v1/encode 负控制只有断言、没有 落盘证据,复验时无法回看分类结果。 改了什么:gofmt 两个测试文件;负控制把实际出站条目与被判为 embedding 的差异 写进 raw(negative-control),正例仍只对发布段计数。 验证:make verify 16 项全绿;随后以新 SHA 重跑 DS02 隔离套件。 --- internal/releaseadapter/v071/ds02_identity_test.go | 2 +- internal/releaseadapter/v071/ds02_oracle_test.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/releaseadapter/v071/ds02_identity_test.go b/internal/releaseadapter/v071/ds02_identity_test.go index 2f09333..e6603d7 100644 --- a/internal/releaseadapter/v071/ds02_identity_test.go +++ b/internal/releaseadapter/v071/ds02_identity_test.go @@ -75,4 +75,4 @@ func TestDS02ProcessIdentity(t *testing.T) { t.Fatalf("%s mismatch: process has %q, runner expected %q", item.name, item.linked, item.expected) } } -} \ No newline at end of file +} diff --git a/internal/releaseadapter/v071/ds02_oracle_test.go b/internal/releaseadapter/v071/ds02_oracle_test.go index dc7905b..cadaf4d 100644 --- a/internal/releaseadapter/v071/ds02_oracle_test.go +++ b/internal/releaseadapter/v071/ds02_oracle_test.go @@ -1249,7 +1249,9 @@ func TestDS02FullShapeOracleIsolated(t *testing.T) { } response.Body.Close() negative := recorder.entriesFor("negative-control") - if len(ds02EgressDiffs(append(append([]ds02Egress{}, recorder.entriesFor("publish")...), negative...), inventory)) == 0 { + negativeDiffs := ds02EgressDiffs(append(append([]ds02Egress{}, recorder.entriesFor("publish")...), negative...), inventory) + r10Save(t, "negative-control", map[string]any{"entries": negative, "diffs_if_in_publish": negativeDiffs}) + if len(negativeDiffs) == 0 { t.Fatal("custom /v1/encode path was not classified as an embedding call") } if len(ds02EgressDiffs(recorder.entriesFor("publish"), inventory)) != 0 {