chore: add private-safe controller startup diagnostics
Add fixed startup branch labels and numeric apply exit status without relaxing startup guards or exposing private values. Cover shared launch/ACK and wrapper branches plus failed apply cleanup. Diagnostics only; the ACK publication race remains unchanged. Co-authored-by: GPT-6 <gpt-6@openai.com>
This commit is contained in:
1 parent
de453ed2c8
commit
ade3b89137
6 files changed
+131
-7
No files matched your search
@@ -317,6 +317,7 @@ func resourceApplyMode(config string, d managedDeps) error {
|
||||
}
|
||||
|
||||
func resourceApplyCLI(config string, stdout, stderr io.Writer, d managedDeps) int {
|
||||
fmt.Fprintln(stderr, "controller-startup: resource_apply=entry")
|
||||
blocked := func() int {
|
||||
fmt.Fprintln(stderr, "BLOCKED: generic apply trust/health incomplete; deployment preserved or prepared for recovery")
|
||||
return 78
|
||||
|
||||
@@ -337,9 +337,12 @@ func TestResourceApplyHealthCollector(t *testing.T) {
|
||||
func TestResourceApplyUnauthorizedCLI(t *testing.T) {
|
||||
var out bytes.Buffer
|
||||
d := managedDeps{}
|
||||
if code := resourceApplyCLI("/private/config", &out, &out, d); code != 78 {
|
||||
if code := resourceApplyCLI("/private/SECRET_SENTINEL", &out, &out, d); code != 78 {
|
||||
t.Fatal(code)
|
||||
}
|
||||
if got, want := out.String(), "controller-startup: resource_apply=entry\nBLOCKED: generic apply trust/health incomplete; deployment preserved or prepared for recovery\n"; got != want {
|
||||
t.Fatalf("unexpected diagnostic: %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestResourceApplyFreshBeforeStaging(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user