fix(ql3): install alpha finalizer dependencies

This commit is contained in:
whyour
2026-08-28 20:47:48 +08:00
parent b80dc56398
commit 37abfa160d
7 changed files with 120 additions and 3 deletions
+8 -1
View File
@@ -559,6 +559,9 @@ function auditAlphaStageIndexWorkflow(root = DEFAULT_ROOT) {
`if: ${condition}`,
' - local-alpha-milestone\n',
' - cluster-alpha-milestone\n',
'pnpm/action-setup@v6',
'cache-dependency-path: pnpm-lock.yaml',
'pnpm install --frozen-lockfile --ignore-scripts',
`name: ql3-alpha-${'${{ github.sha }}'}-local-${'${{ inputs.local_alpha_variant }}'}-milestone`,
`name: ql3-alpha-${'${{ github.sha }}'}-cluster-milestone`,
'scripts/ql3-alpha-stage-index.cjs',
@@ -571,11 +574,15 @@ function auditAlphaStageIndexWorkflow(root = DEFAULT_ROOT) {
if (!stage || tokens.some((token) => !stage.includes(token))) {
findings.push('ALPHA_STAGE_INDEX_FINALIZER_CONTRACT_DRIFT');
}
const dependencyInstallIndex = stage.indexOf(
'pnpm install --frozen-lockfile --ignore-scripts',
);
const finalizeIndex = stage.indexOf('--mode=finalize');
const auditIndex = stage.indexOf('--mode=audit');
const uploadIndex = stage.indexOf('actions/upload-artifact@');
if (
finalizeIndex < 0 ||
dependencyInstallIndex < 0 ||
finalizeIndex <= dependencyInstallIndex ||
auditIndex <= finalizeIndex ||
uploadIndex <= auditIndex
) {
+8 -1
View File
@@ -494,6 +494,9 @@ function auditClusterAlphaMilestoneWorkflow(root = DEFAULT_ROOT) {
const milestone = jobBlock(workflow, 'cluster-alpha-milestone');
const tokens = [
'name: Finalize the Cluster Alpha integration milestone',
'pnpm/action-setup@v6',
'cache-dependency-path: pnpm-lock.yaml',
'pnpm install --frozen-lockfile --ignore-scripts',
'actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c',
'scripts/ql3-cluster-alpha-milestone.cjs',
'--mode=finalize',
@@ -517,11 +520,15 @@ function auditClusterAlphaMilestoneWorkflow(root = DEFAULT_ROOT) {
) {
findings.push('CLUSTER_MILESTONE_FINALIZER_CONTRACT_DRIFT');
}
const dependencyInstallIndex = milestone.indexOf(
'pnpm install --frozen-lockfile --ignore-scripts',
);
const finalizerIndex = milestone.indexOf('--mode=finalize');
const auditIndex = milestone.indexOf('--mode=audit');
const uploadIndex = milestone.indexOf('actions/upload-artifact@');
if (
finalizerIndex < 0 ||
dependencyInstallIndex < 0 ||
finalizerIndex <= dependencyInstallIndex ||
auditIndex <= finalizerIndex ||
uploadIndex <= auditIndex
) {
+8 -1
View File
@@ -527,6 +527,9 @@ function auditLocalAlphaMilestoneWorkflow(root = DEFAULT_ROOT) {
const milestoneTokens = [
' name: Finalize the Local Alpha milestone',
' needs:',
'pnpm/action-setup@v6',
'cache-dependency-path: pnpm-lock.yaml',
'pnpm install --frozen-lockfile --ignore-scripts',
'actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c',
`name: ql3-alpha-${'${{ github.sha }}'}-local-${'${{ inputs.local_alpha_variant }}'}-amd64`,
`name: ql3-alpha-${'${{ github.sha }}'}-local-${'${{ inputs.local_alpha_variant }}'}-arm64`,
@@ -547,11 +550,15 @@ function auditLocalAlphaMilestoneWorkflow(root = DEFAULT_ROOT) {
) {
findings.push('MILESTONE_FINALIZER_CONTRACT_DRIFT');
}
const dependencyInstallIndex = milestone.indexOf(
'pnpm install --frozen-lockfile --ignore-scripts',
);
const finalizerIndex = milestone.indexOf('--mode=finalize');
const auditIndex = milestone.indexOf('--mode=audit');
const uploadIndex = milestone.lastIndexOf('actions/upload-artifact@');
if (
finalizerIndex < 0 ||
dependencyInstallIndex < 0 ||
finalizerIndex <= dependencyInstallIndex ||
auditIndex <= finalizerIndex ||
uploadIndex <= auditIndex
) {