Accept dash-separated Scattermind lane labels

This commit is contained in:
OpenClaw Bot
2026-05-27 18:56:50 +02:00
parent 7ed035af82
commit b2744a791b
3 changed files with 42 additions and 8 deletions
+30
View File
@@ -230,6 +230,36 @@ try {
assert.equal(threadGuardrail.buildOrder.doFirst[0], 'build-order-2', 'thread-level guardrail should demote a labelled Build first dashboard and promote the first eligible manual move');
assert.match(threadGuardrail.brief.decisionReceipt.sourceAnchor, /concept-map\.lenses\.channel/);
const softDashLabelResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
sourceName: 'Scattermind',
artifactId: 'concept_map_soft_dash_labels',
originalPrompt: 'Scattermind used reader-friendly continuation labels with dashes instead of colon-prefixed lanes.',
context: 'Solo builder. Avoid account dashboards and saved workspaces before a manual proof.',
conceptMap: {
working_name: 'Reader-friendly continuation labels',
lenses: {
channel: {
title: 'Build Order Preview',
content: 'Continue first — Manual Concept Map preview with one defended first move. Evidence next Copy the handoff and ask one tired user what they would do. Hold for later - Polished export templates after proof. Set aside — Saved workspace dashboard with auth and collaboration.',
},
},
},
}),
});
assert.equal(softDashLabelResponse.status, 200);
const softDashLabel = await softDashLabelResponse.json();
assert.equal(softDashLabel.input.optionCount, 4);
assert.equal(softDashLabel.buildOrder.doFirst[0], 'build-order-1');
assert.equal(softDashLabel.ranked.find(item => item.id === 'build-order-1').title, 'Manual Concept Map preview with one defended first move');
assert.equal(softDashLabel.ranked.find(item => item.id === 'build-order-2').lane.id, 'test');
assert.equal(softDashLabel.ranked.find(item => item.id === 'build-order-3').lane.id, 'defer');
assert.equal(softDashLabel.ranked.find(item => item.id === 'build-order-4').lane.id, 'park');
assert.match(softDashLabel.handoff.itemTrace.find(item => item.id === 'build-order-1').sourceQuote, /Continue first/);
assert.deepEqual(softDashLabel.handoff.warnings, []);
const hintedResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },