starter:gate: a fresh tarball every run and proof of which code made the site

pnpm's dlx cache is keyed by the spec, so the gate reused the previous run's plugin when the
tarball path stayed the same. Each run now packs to a new file name and calls dlx with
--config.dlx-cache-max-age=0. build:starter records the plugin commit in the bundle; ipal-kit
create records the bundle's sha256 and that commit in .ipal/starter.json; the gate checks both,
and the installed plugin, against the packed tarball.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 16:30:24 +01:00
co-authored by Claude Opus 5.5
parent aa88e4ea39
commit e7e756a0d7
8 changed files with 55 additions and 11 deletions
+2
View File
@@ -221,6 +221,8 @@ describe.runIf(existsSync(path.join(reference, 'starter.manifest.json')))('start
expect(files['AGENTS.md']).toMatch(/## Project decisions\n- Languages: pl, en/)
expect(files['src/seed/base.ts']).toContain("email: '[email protected]'")
expect(files['pnpm-lock.yaml']).not.toContain('@intecion/ipal-kit')
const traced = renderSite(bundle, answers(), { ...ctx, source: { bundleSha256: 'abc', commit: 'def' } })
expect(JSON.parse(traced['.ipal/starter.json'] ?? '')).toMatchObject({ ipalKit: '1.15.0', source: { bundleSha256: 'abc', commit: 'def' } })
const doctor = JSON.parse(files['ipal-doctor.json'] ?? '') as { rules: Record<string, unknown> }
expect(Object.keys(doctor.rules).sort()).toEqual(['audit:collections-present', 'csp', 'i18n-literals'])
expect((JSON.parse(files['package.json'] ?? '') as { packageManager?: string }).packageManager).toMatch(/^pnpm@\d/)