@@ -1103,6 +1103,51 @@ test("validatePackageRuntimeCoverage requires bounded npm release workflow comma
11031103 assert . ok ( codes . includes ( "workflow_npm_publish_timeout_missing" ) ) ;
11041104} ) ;
11051105
1106+ test ( "validatePackageRuntimeCoverage rejects lightweight release tag workflow comments" , async ( t ) => {
1107+ const tempDir = await mkdtemp ( path . join ( tmpdir ( ) , "ray-package-runtime-release-tag-docs-" ) ) ;
1108+ t . after ( async ( ) => {
1109+ await rm ( tempDir , { recursive : true , force : true } ) ;
1110+ } ) ;
1111+ const workflowDir = path . join ( tempDir , ".github" , "workflows" ) ;
1112+ await mkdir ( workflowDir , { recursive : true } ) ;
1113+ await writeFile (
1114+ path . join ( workflowDir , "ray-core-release.yml" ) ,
1115+ [
1116+ 'name: "@razroo/ray-core Release to npm"' ,
1117+ '# TAG="core-v$(bun -e \'console.log(require("./packages/core/package.json").version)\')"' ,
1118+ '# git tag "$TAG" && git push origin "$TAG"' ,
1119+ "jobs:" ,
1120+ " publish:" ,
1121+ " if: github.repository == 'razroo/ray'" ,
1122+ " runs-on: ubuntu-latest" ,
1123+ " timeout-minutes: 60" ,
1124+ " permissions:" ,
1125+ " id-token: write" ,
1126+ " steps:" ,
1127+ " - run: timeout 120s git fetch --no-tags --prune origin main:refs/remotes/origin/main" ,
1128+ ' - run: git merge-base --is-ancestor "$SHA" refs/remotes/origin/main' ,
1129+ " - run: timeout 300s npm publish ./pkg.tgz --access public --provenance" ,
1130+ " env:" ,
1131+ " NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}" ,
1132+ "" ,
1133+ ] . join ( "\n" ) ,
1134+ ) ;
1135+
1136+ const summary = await validatePackageRuntimeCoverage ( {
1137+ cwd : tempDir ,
1138+ packageJsonPaths : [ ] ,
1139+ } ) ;
1140+ const diagnostics = summary . results . flatMap ( ( result ) => result . diagnostics ) ;
1141+
1142+ assert . equal ( summary . ok , false ) ;
1143+ assert . ok (
1144+ diagnostics . some (
1145+ ( diagnostic ) =>
1146+ diagnostic . code === "workflow_npm_release_lightweight_tag_doc" && diagnostic . line === 3 ,
1147+ ) ,
1148+ ) ;
1149+ } ) ;
1150+
11061151test ( "validatePackageRuntimeCoverage requires bounded quality release gate workflow commands" , async ( t ) => {
11071152 const tempDir = await mkdtemp ( path . join ( tmpdir ( ) , "ray-package-runtime-quality-timeouts-" ) ) ;
11081153 t . after ( async ( ) => {
0 commit comments