@@ -230,6 +230,46 @@ test('release tooling rewrites metadata and keeps latest.yml published', async (
230230 await runLocalVerification ( releaseDir ) ;
231231} ) ;
232232
233+ test ( 'release tooling ignores unpacked directories when enforcing metadata' , async ( t ) => {
234+ const workspace = await createTemporaryWorkspace ( t ) ;
235+ await writeFixtureInstaller ( workspace , '0.0.2' , {
236+ artifactDir : 'docforge-windows-x64' ,
237+ } ) ;
238+
239+ const unpackedDir = path . join (
240+ workspace ,
241+ 'release-artifacts' ,
242+ 'docforge-windows-x64' ,
243+ 'win-unpacked' ,
244+ ) ;
245+ await fs . mkdir ( unpackedDir , { recursive : true } ) ;
246+ const unpackedExecutable = path . join ( unpackedDir , 'DocForge.exe' ) ;
247+ await fs . writeFile ( unpackedExecutable , crypto . randomBytes ( 2048 ) ) ;
248+
249+ const changelogPath = path . join ( workspace , 'CHANGELOG.md' ) ;
250+ await fs . writeFile (
251+ changelogPath ,
252+ [ '## v0.0.2' , '' , '- Ignore unpacked executable fixtures.' ] . join ( '\n' ) ,
253+ 'utf8' ,
254+ ) ;
255+
256+ const notesPath = path . join ( workspace , 'release-notes.md' ) ;
257+ const manifestPath = path . join ( workspace , 'release-files.txt' ) ;
258+
259+ await runGenerateReleaseNotes ( {
260+ workspace,
261+ version : '0.0.2' ,
262+ tag : 'v0.0.2' ,
263+ changelogPath,
264+ outputPath : notesPath ,
265+ filesOutputPath : manifestPath ,
266+ } ) ;
267+
268+ const manifest = await fs . readFile ( manifestPath , 'utf8' ) ;
269+ const entries = readManifestEntries ( manifest ) ;
270+ assert ( entries . every ( ( line ) => ! line . includes ( 'DocForge.exe' ) ) ) ;
271+ } ) ;
272+
233273test ( 'local verification can repair mismatched metadata when requested' , async ( t ) => {
234274 const workspace = await createTemporaryWorkspace ( t ) ;
235275 const version = '0.0.2' ;
0 commit comments