feat: add branch follower debug step

This commit is contained in:
Codex
2026-07-03 17:56:08 +00:00
parent b98b131bb7
commit 917cba6659
8 changed files with 486 additions and 8 deletions
+14 -1
View File
@@ -93,6 +93,8 @@ function preserveExistingTiming(state, existing) {
ensureConfigMap();
const current = readConfigMap();
const beforeResourceVersion = stringOrNull(current?.metadata?.resourceVersion);
const beforeUpdatedAt = stringOrNull(current?.data?._updatedAt);
const currentText = current?.data?.[followerId];
const existing = typeof currentText === "string" && currentText.length > 0 ? JSON.parse(currentText) : null;
const incomingState = JSON.parse(stateJson);
@@ -105,4 +107,15 @@ const patch = {
},
};
kubectl(["patch", "configmap", configMap, "--type", "merge", "-p", JSON.stringify(patch)]);
process.stdout.write(JSON.stringify({ ok: true, followerId, preservedTiming: state !== incomingState, statusAuthority: "target-node-summary", parsedDownstreamCliOutput: false }));
const updated = readConfigMap();
process.stdout.write(JSON.stringify({
ok: true,
followerId,
preservedTiming: state !== incomingState,
beforeResourceVersion,
afterResourceVersion: stringOrNull(updated?.metadata?.resourceVersion),
beforeUpdatedAt,
afterUpdatedAt: stringOrNull(updated?.data?._updatedAt),
statusAuthority: "target-node-summary",
parsedDownstreamCliOutput: false,
}));