Accept nested proof gate bridge fields

This commit is contained in:
OpenClaw Bot
2026-05-28 00:17:48 +02:00
parent f424b61730
commit 896198fe07
3 changed files with 57 additions and 7 deletions
+49
View File
@@ -2581,6 +2581,55 @@ try {
assert.equal(proofPlanAlias.handoff.readiness.status, 'ready');
assert.deepEqual(proofPlanAlias.handoff.warnings, []);
const proofGateAliasResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
sourceName: 'Scattermind',
referenceCode: 'SM-PROOF-GATE-1',
working_name: 'Nested proof gate export',
ideaText: 'Scattermind exported the build order with nested proof_gate objects instead of flattening every proof field onto the candidate.',
context: 'Solo builder. Manual proof first. Avoid account dashboards and saved workspaces until proof.',
mode: 'validation',
conceptMap: {
nextActions: [
{
id: 'nested-proof-gate-active',
title: 'Nested proof-gated active slice',
description: 'Show the active source-traced move with one proof gate.',
source_item_id: 'proof-gate-1',
source_title: 'Nested proof gate',
proof_gate: {
next_step: 'Run the source-traced proof script with one non-AI-native user.',
evidence_question: 'Can the user explain the active move without seeing a dashboard?',
success_criteria: 'The user names the first move and the thing not to build yet.',
stop_signal: 'The user asks for a workspace, account, or setup before understanding the first move.',
steps: ['Read the active slice aloud', 'Ask what they would do next'],
},
ranker_hints: { value: 9, effort: 2, confidence: 8, urgency: 8, risk: 2 },
},
{ id: 'nested-proof-gate-copy', title: 'Copy the proof-gated receipt', evidence_needed: 'Does the copied receipt preserve the source trace?', recommendedLane: 'validate-next', source_item_id: 'proof-gate-2', source_title: 'Nested proof gate' },
{ id: 'nested-proof-gate-dashboard', title: 'Saved proof dashboard with accounts', evidence_needed: 'Not before proof.', recommendedLane: 'park', source_item_id: 'proof-gate-3', source_title: 'Nested proof gate' },
],
},
}),
});
assert.equal(proofGateAliasResponse.status, 200);
const proofGateAlias = await proofGateAliasResponse.json();
const proofGateActive = proofGateAlias.ranked.find(item => item.id === 'nested-proof-gate-active');
assert.equal(proofGateAlias.ranked[0].id, 'nested-proof-gate-active');
assert.match(proofGateActive.nextStep, /source-traced proof script/);
assert.match(proofGateActive.evidenceQuestion, /without seeing a dashboard/);
assert.match(proofGateActive.successSignal, /thing not to build yet/);
assert.match(proofGateActive.killSignal, /workspace, account, or setup/);
assert.match(proofGateActive.description, /Proof steps: Read the active slice aloud; Ask what they would do next/);
assert.equal(proofGateAlias.brief.firstScreen.primaryAction, proofGateActive.nextStep);
assert.equal(proofGateAlias.brief.firstScreen.passSignal, proofGateActive.successSignal);
assert.equal(proofGateAlias.brief.firstScreen.stopSignal, proofGateActive.killSignal);
assert.equal(proofGateAlias.handoff.activeSlice.proof.successSignal, proofGateActive.successSignal);
assert.equal(proofGateAlias.handoff.readiness.status, 'ready');
assert.deepEqual(proofGateAlias.handoff.warnings, []);
console.log(JSON.stringify({ ok: true, top: data.ranked[0].id, hintedTop: hinted.ranked[0].id, actionTop: actions.ranked[0].id, nestedConceptTop: nestedConcept.ranked[0].id, nonGoalTop: nonGoal.ranked[0].id, structuredContextTop: structuredContext.ranked[0].id, lensOnlyTop: lensOnly.ranked[0].id, scattermindPaidShapeTop: scattermindPaidShape.ranked[0].id, mergedContextTop: mergedContext.ranked[0].id, embeddedJsonTop: embeddedJson.ranked[0].id, fencedJsonTop: fencedJson.ranked[0].id, embeddedSnapshotTop: embeddedSnapshot.ranked[0].id, sourceExcerptTop: sourceExcerpt.ranked[0].id, snakeCaseBridgeTop: snakeCaseBridge.ranked[0].id, nextStepsAliasTop: nextStepsAlias.ranked[0].id, summaryGuardrailTop: summaryGuardrail.ranked[0].id, bridgeEnvelopeTop: bridgeEnvelope.ranked[0].id, directEnvelopeSectionsTop: directEnvelopeSections.ranked[0].id, softDirectLaneAliasesTop: softDirectLaneAliases.ranked[0].id, threadsFallbackTop: threadsFallback.ranked[0].id, questionsFallbackTop: questionsFallback.ranked[0].id, freeSnapshotTop: freeSnapshot.ranked[0].id, storedScattermindRowTop: storedScattermindRow.ranked[0].id, candidateActionsAliasTop: candidateActionsAlias.ranked[0].id, rankReadyActionsEnvelopeTop: rankReadyActionsEnvelope.ranked[0].id, continuationEnvelopeTop: continuationEnvelope.ranked[0].id, buildOrderPreviewTop: buildOrderPreview.ranked[0].id, scattermindRoadmapLanguageTop: scattermindRoadmapLanguage.ranked[0].id, scattermindRoadmapLensOnlyTop: scattermindRoadmapLensOnly.ranked[0].id, stringifiedRankerInputTop: stringifiedRankerInput.ranked[0].id, scalarBuildOrderSectionsTop: scalarBuildOrderSections.ranked[0].id, snakeReaderFriendlyBuildOrderTop: snakeReaderFriendlyBuildOrder.ranked[0].id, readerFriendlyLensLabelTop: readerFriendlyLensLabel.ranked[0].id, gameRouteGuardrailTop: gameRouteGuardrail.ranked[0].id, rankedBuildOrderAliasTop: rankedBuildOrderAlias.ranked[0].id, proofPlanAliasTop: proofPlanAlias.ranked[0].id, duplicateIds: duplicateIds.ranked.map(item => item.id), readiness: data.handoff.readiness.status, provenance: data.input.provenance, buildOrder: data.buildOrder }, null, 2));
} finally {
server.kill('SIGTERM');