tooling: capture structural action declaration in live harness

This commit is contained in:
2026-08-12 08:32:21 +01:00
parent fc06ff02e4
commit beef434a6f
2 changed files with 277 additions and 1 deletions
@@ -88,6 +88,14 @@ async function main() {
console.log(`\ndiagnostics.rejectedProposalSnapshot: ${JSON.stringify(updateResult.json.diagnostics.rejectedProposalSnapshot, null, 2)}`);
}
// ── Capture structuralActionRequired from rejected snapshot if present ──
const rejectedSnapshot = updateResult.json?.diagnostics?.rejectedProposalSnapshot ?? null;
if (rejectedSnapshot && "structuralActionRequired" in rejectedSnapshot) {
console.log(`structuralActionRequired (from rejected proposal snapshot): ${JSON.stringify(rejectedSnapshot.structuralActionRequired)}`);
} else {
console.log(`structuralActionRequired: UNAVAILABLE`);
}
reportCallAccounting();
console.log("\n*** UPDATE REJECTED — STOPPING (no retry). ***");
process.exitCode = 1;
@@ -120,6 +128,14 @@ async function main() {
console.log(`addedEdges: ${JSON.stringify(proposal.addedEdges ?? [])}`);
}
// ── Capture structuralActionRequired from accepted update ─
const sar = updateResult.json.structuralActionRequired;
if (sar === undefined || sar === null) {
console.log(`structuralActionRequired: null`);
} else {
console.log(`structuralActionRequired: ${JSON.stringify(sar)}`);
}
// ── Capture selectedQuestion node reference ────────────
const sq = updateResult.json.selectedQuestion ?? null;
if (sq && typeof sq === "object") {