tooling: capture accepted answer meaning directly

This commit is contained in:
2026-08-12 12:00:18 +01:00
parent d2891730af
commit c4431997b1
2 changed files with 60 additions and 51 deletions
@@ -135,8 +135,11 @@ async function main() {
console.log(`stage: ${updateResult.json.stage ?? "unknown"}`);
console.log(`proposal/apply success: ${updateResult.json.proposal?.success ?? updateResult.json.applySuccess ?? null}`);
// ── Capture accepted answer meaning ─────────────────────
const am = updateResult.json.answerMeaning ?? null;
// ── Capture accepted structural mutation fields ────────
const proposal = updateResult.json.updatedProposal ?? updateResult.json.proposal ?? null;
// ── Capture answerMeaning and structuralActionRequired from proposal (production path) ─
const am = proposal?.answerMeaning ?? null;
if (am) {
console.log(`answerMeaning.userSupportedMeaning: ${JSON.stringify(am.userSupportedMeaning ?? null)}`);
console.log(`answerMeaning.possibleInference: ${JSON.stringify(am.possibleInference ?? null)}`);
@@ -144,8 +147,6 @@ async function main() {
console.log(`answerMeaning.resolutionGuidance: ${JSON.stringify(am.resolutionGuidance ?? null)}`);
}
// ── Capture accepted structural mutation fields ────────
const proposal = updateResult.json.updatedProposal ?? updateResult.json.proposal ?? null;
if (proposal) {
console.log(`updatedNodes: ${JSON.stringify(proposal.updatedNodes ?? [])}`);
console.log(`resolvedUnknownNodeIds: ${JSON.stringify(proposal.resolvedUnknownNodeIds ?? [])}`);
@@ -154,7 +155,7 @@ async function main() {
}
// ── Capture structuralActionRequired from accepted update ─
const sar = updateResult.json.structuralActionRequired;
const sar = proposal?.structuralActionRequired;
if (sar === undefined || sar === null) {
console.log(`structuralActionRequired: null`);
} else {