From 730327e45fb266489376a071add7c423bd948082 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sun, 16 Aug 2026 14:20:54 -0700 Subject: [PATCH] fix(test): package.json version check accepts the decision-11 npm translation The bump wrote the npm-valid 3-digit manifest version for the first time this release; the old assertion demanded byte-equality with the 4-digit VERSION. Accept the translation plus the grandfathered pre-v1.67 mirror, matching gstack-version-bump's own drift contract. Co-Authored-By: Claude Fable 5 --- test/gen-skill-docs.test.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index 03ebe53bc..04f50c7e9 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -258,10 +258,16 @@ describe('gen-skill-docs', () => { expect(violations).toEqual([]); }); - test('package.json version matches VERSION file', () => { + test('package.json version matches VERSION file (npm-valid translation)', () => { + // Decision 11 (v1.67 wave): VERSION stays the 4-digit source of truth; + // package.json carries the npm-valid 3-digit translation (npm rejects a + // fourth component). The pre-v1.67 1:1 four-digit mirror is also accepted + // (grandfathered until the next write), matching gstack-version-bump's + // own drift contract. const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf-8')); const version = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8').trim(); - expect(pkg.version).toBe(version); + const npmTranslation = version.split('.').slice(0, 3).join('.'); + expect([npmTranslation, version]).toContain(pkg.version); }); test('generated files are fresh (match --dry-run)', () => {