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
+9 -5
View File
@@ -2140,16 +2140,20 @@ function summarizeRuntimeReuseConfigFromRecord(value: Record<string, unknown> |
stageRef: stringOrNull(value.stageRef),
sha256: stringOrNull(value.sha256),
serviceCount: numberOrNull(value.serviceCount),
services: arrayRecords(value.services).slice(0, 8).map((service) => ({
id: stringOrNull(service.id),
runtimeReuse: asOptionalRecord(service.runtimeReuse),
envReuse: asOptionalRecord(service.envReuse),
})),
serviceIds: compactReuseServiceIds(value),
errors: Array.isArray(value.errors) ? value.errors.map(String).slice(0, 5) : [],
valuesRedacted: true,
};
}
function compactReuseServiceIds(value: Record<string, unknown>): string[] {
if (Array.isArray(value.serviceIds)) return value.serviceIds.map(String).slice(0, 16);
return arrayRecords(value.services).flatMap((service) => {
const id = stringOrNull(service.id);
return id === null ? [] : [id];
}).slice(0, 16);
}
function compactSourceSyncPayload(value: Record<string, unknown> | null): Record<string, unknown> | null {
if (value === null) return null;
return {