refactor(corecmd): retire zombie annotation paths and fix alias validation
Make enum and required-flag validation alias-aware via a shared flagNameProvided/EffectiveValue path so values passed through flag aliases are no longer skipped; drop the fully-migrated runtime risk/gate annotation bridge and the orphaned tool-metadata/title annotation writers, trimming the cli seam re-exports accordingly.
This commit is contained in:
1 parent
e135440b98
commit
ec7f4deaf4
12 files changed
+131
-239
No files matched your search
@@ -29,7 +29,7 @@ func TestCrossPlatformCoverageHasDeclaredOrAnnotatedConfirmationBranches(t *test
|
||||
}
|
||||
|
||||
gated := &cobra.Command{Use: "gated"}
|
||||
runtimeannotate.AnnotateRuntimeGate(gated, "devAppRequireWriteGuard")
|
||||
gated.Annotations = map[string]string{runtimeannotate.AnnotationRuntimeGate: "devAppRequireWriteGuard"}
|
||||
if !HasDeclaredOrAnnotatedConfirmation(gated) {
|
||||
t.Fatal("annotated gate must satisfy declare-OR-annotate")
|
||||
}
|
||||
@@ -44,7 +44,7 @@ func TestCrossPlatformCoverageHasDeclaredOrAnnotatedConfirmationBranches(t *test
|
||||
}
|
||||
|
||||
risky := &cobra.Command{Use: "risky"}
|
||||
runtimeannotate.AnnotateRuntimeRisk(risky, "read")
|
||||
risky.Annotations = map[string]string{runtimeannotate.AnnotationRisk: "read"}
|
||||
if !HasDeclaredOrAnnotatedConfirmation(risky) {
|
||||
t.Fatal("Contract Risk annotation must satisfy declare-OR-annotate")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user