Wire catalog policy, v2 manifests, stage access, activation metadata fixes, and coordinator instance advance around frozen workflow snapshots. Co-authored-by: Cursor <cursoragent@cursor.com>
47 lines
1.2 KiB
Go
47 lines
1.2 KiB
Go
package workflow
|
|
|
|
import "fmt"
|
|
|
|
// ExecutorRegistry 执行器注册表(schema v2 发布校验与运行时解析)。
|
|
var ExecutorRegistry = map[string]struct{}{
|
|
"bizdev.stage.v1": {},
|
|
"squad.system_reqs.v1": {},
|
|
"squad.test_manager.v1": {},
|
|
"bizdev.intake.v1": {},
|
|
"bizdev.research.v1": {},
|
|
"bizdev.feasibility.v1": {},
|
|
"bizdev.feasibility_dev.v1": {},
|
|
"bizdev.user_requirements.v1": {},
|
|
"bizdev.prelim_design.v1": {},
|
|
"bizdev.cdo_quote.v1": {},
|
|
}
|
|
|
|
// QualityGateRegistry 确定性质量门禁注册表。
|
|
var QualityGateRegistry = map[string]struct{}{
|
|
"quality.system_reqs.v2": {},
|
|
"quality.test_manager.v2": {},
|
|
"quality.generic.v1": {},
|
|
}
|
|
|
|
// ValidateExecutorKey 校验执行器已注册。
|
|
func ValidateExecutorKey(key string) error {
|
|
if key == "" {
|
|
return fmt.Errorf("executor_key required")
|
|
}
|
|
if _, ok := ExecutorRegistry[key]; !ok {
|
|
return fmt.Errorf("unknown executor_key %q", key)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// ValidateQualityGateKey 校验质量门禁已注册。
|
|
func ValidateQualityGateKey(key string) error {
|
|
if key == "" {
|
|
return nil
|
|
}
|
|
if _, ok := QualityGateRegistry[key]; !ok {
|
|
return fmt.Errorf("unknown quality_gate_key %q", key)
|
|
}
|
|
return nil
|
|
}
|