From 4e7149d2d5cde3def156c86ee036b8f076698982 Mon Sep 17 00:00:00 2001 From: iamtoruk Date: Mon, 24 Aug 2026 07:45:35 -0700 Subject: [PATCH] test(sync): the unproven-provenance fixture now asserts ai.project omission MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The #1126 test pinned basename presence; under #1128's fail-closed provenance the same fixture (no trusted provider-recorded cwd) correctly omits the field entirely — stronger privacy, same zero-paths guarantee. The positive basename-on-the-wire case is covered by sync-project-provenance. --- tests/sync-attribution-cli.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/sync-attribution-cli.test.ts b/tests/sync-attribution-cli.test.ts index 79bd99e0..cb41b175 100644 --- a/tests/sync-attribution-cli.test.ts +++ b/tests/sync-attribution-cli.test.ts @@ -172,7 +172,10 @@ describe('sync push --attribution (CLI level)', () => { .flatMap((rs: any) => rs.scopeSpans.flatMap((ss: any) => ss.spans)) .flatMap((s: any) => s.attributes.filter((a: any) => a.key === 'ai.project') .map((a: any) => a.value.stringValue))) - expect(projects.length).toBeGreaterThanOrEqual(2) // usage + attribution spans - expect(new Set(projects)).toEqual(new Set([basename(repoDir)])) + // Under fail-closed provenance (#1128) this fixture carries no trusted + // provider-recorded cwd, so ai.project is OMITTED entirely — stronger than + // the #1126 basename this test originally asserted. The positive case + // (trusted cwd -> basename on the wire) lives in sync-project-provenance. + expect(projects).toEqual([]) }) })