|
| 1 | +// SPDX-License-Identifier: Apache-2.0 |
| 2 | +// |
| 3 | +// Licensed to the Apache Software Foundation (ASF) under one |
| 4 | +// or more contributor license agreements. See the NOTICE file |
| 5 | +// distributed with this work for additional information |
| 6 | +// regarding copyright ownership. The ASF licenses this file |
| 7 | +// to you under the Apache License, Version 2.0 (the |
| 8 | +// "License"); you may not use this file except in compliance |
| 9 | +// with the License. You may obtain a copy of the License at |
| 10 | +// |
| 11 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +// |
| 13 | +// Unless required by applicable law or agreed to in writing, |
| 14 | +// software distributed under the License is distributed on an |
| 15 | +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | +// KIND, either express or implied. See the License for the |
| 17 | +// specific language governing permissions and limitations |
| 18 | +// under the License. |
| 19 | + |
| 20 | +// Companion ambient declaration lives in types.d.ts for Claude Code mod plugin |
| 21 | +// validation. Any property added to VerifyRcState or VerifyRcStep must be |
| 22 | +// kept in sync across both files. |
| 23 | + |
| 24 | +export type VerifyStepId = |
| 25 | + | 'preflight' |
| 26 | + | 'inventory' |
| 27 | + | 'signatures' |
| 28 | + | 'checksums' |
| 29 | + | 'rat-license-headers' |
| 30 | + | 'notice-license' |
| 31 | + | 'binary-exclusion' |
| 32 | + | 'jvm-artefacts' |
| 33 | + | 'nexus-staging' |
| 34 | + | 'source-tree-integrity' |
| 35 | + | 'version-consistency' |
| 36 | + | 'reproducibility' |
| 37 | + | 'verdict'; |
| 38 | + |
| 39 | +export type StepStatus = 'pending' | 'running' | 'passed' | 'failed' | 'warning' | 'skipped'; |
| 40 | + |
| 41 | +export type OverallVerifyStatus = 'running' | 'passed' | 'passed-with-warnings' | 'failed'; |
| 42 | + |
| 43 | +export interface VerifyRcStep { |
| 44 | + id: VerifyStepId; |
| 45 | + label: string; |
| 46 | + status: StepStatus; |
| 47 | + detail?: string | null; |
| 48 | + durationMs?: number | null; |
| 49 | +} |
| 50 | + |
| 51 | +export interface VerifyRcState { |
| 52 | + rcTag: string; |
| 53 | + version: string; |
| 54 | + stagingUrl?: string | null; |
| 55 | + postTo?: string | null; |
| 56 | + overallStatus: OverallVerifyStatus; |
| 57 | + currentStepId?: VerifyStepId | null; |
| 58 | + steps: VerifyRcStep[]; |
| 59 | + startedAt: number; |
| 60 | + completedAt?: number | null; |
| 61 | +} |
| 62 | + |
| 63 | +/** |
| 64 | + * Returns the canonical 13 verification steps in exact SKILL.md execution order, |
| 65 | + * all initialized in 'pending' status. |
| 66 | + */ |
| 67 | +export function createDefaultVerifySteps(): VerifyRcStep[] { |
| 68 | + return [ |
| 69 | + { id: 'preflight', label: 'Pre-flight check & config resolution', status: 'pending' }, |
| 70 | + { id: 'inventory', label: 'Staged artefacts inventory', status: 'pending' }, |
| 71 | + { id: 'signatures', label: 'GPG signatures (KEYS verification)', status: 'pending' }, |
| 72 | + { id: 'checksums', label: 'SHA512 & digest checksums', status: 'pending' }, |
| 73 | + { id: 'rat-license-headers', label: 'Apache RAT license headers', status: 'pending' }, |
| 74 | + { id: 'notice-license', label: 'NOTICE and LICENSE integrity', status: 'pending' }, |
| 75 | + { id: 'binary-exclusion', label: 'Prohibited binaries scan', status: 'pending' }, |
| 76 | + { id: 'jvm-artefacts', label: 'JVM artefact checks', status: 'pending' }, |
| 77 | + { id: 'nexus-staging', label: 'Nexus staging repository', status: 'pending' }, |
| 78 | + { id: 'source-tree-integrity', label: 'Source integrity & symlinks', status: 'pending' }, |
| 79 | + { id: 'version-consistency', label: 'Version manifest consistency', status: 'pending' }, |
| 80 | + { id: 'reproducibility', label: 'Reproducible build verification', status: 'pending' }, |
| 81 | + { id: 'verdict', label: 'Final verification verdict', status: 'pending' }, |
| 82 | + ]; |
| 83 | +} |
0 commit comments