fix: keep branch follower reuse status compact

This commit is contained in:
Codex
2026-07-03 20:49:57 +00:00
parent b0cb23b0e0
commit 197a883ca0
4 changed files with 22 additions and 25 deletions
+5
View File
@@ -393,6 +393,7 @@ function compactStatusGates(payload: Record<string, unknown> | null): Record<str
stageRef: stringOrNull(reuseConfig.stageRef),
sha256: stringOrNull(reuseConfig.sha256),
serviceCount: numberOrNull(reuseConfig.serviceCount),
serviceIds: arrayStrings(reuseConfig.serviceIds).slice(0, 16),
errors: Array.isArray(reuseConfig.errors) ? reuseConfig.errors.map(String).slice(0, 5) : [],
},
tekton: tekton === null ? null : {
@@ -439,6 +440,10 @@ function arrayRecords(value: unknown): Record<string, unknown>[] {
return Array.isArray(value) ? value.filter((item): item is Record<string, unknown> => typeof item === "object" && item !== null && !Array.isArray(item)) : [];
}
function arrayStrings(value: unknown): string[] {
return Array.isArray(value) ? value.map(String) : [];
}
function compactFollowerDecision(state: FollowerState): Record<string, unknown> {
return {
phase: state.phase,