Accept Scattermind experiment sections

This commit is contained in:
OpenClaw Bot
2026-05-27 00:55:19 +02:00
parent 9dbcd7770b
commit 1f8739444c
3 changed files with 52 additions and 5 deletions
+38
View File
@@ -245,6 +245,44 @@ try {
assert.equal(sectionedConcept.handoff.itemTrace.find(item => item.id === 'saved-team-workspace').sourceSection, 'concept-map.parkingLot');
assert.deepEqual(sectionedConcept.handoff.warnings, []);
const experimentSectionResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
sourceName: 'Scattermind',
artifactId: 'concept_map_experiments',
originalPrompt: 'The Concept Map emitted experiments separately from next actions.',
idea: 'Ranker should merge validation experiments into the build order instead of dropping them.',
mode: 'mvp',
conceptMap: {
nextActions: [
{ id: 'manual-build-order', action: 'Manual build-order preview', why: 'Create one defended first move from the source artifact.', evidence: 'Can one tired user act on it?', suggestedLane: 'do-first', rankerHints: { value: 9, effort: 2, confidence: 8, urgency: 8, risk: 2 } },
],
experiments: [
{ id: 'five-user-comprehension', hypothesis: 'Five-user comprehension test', question: 'Can 3 of 5 non-AI-native users explain the first recommended move?', method: ['Show the copyable brief', 'Ask what they would do next'], sourceItemId: 'experiment-1', sourceTitle: 'Validation experiments' },
],
proofTests: [
{ id: 'copy-paste-proof', testName: 'Copy-paste proof test', learningGoal: 'Does the build-order brief survive being pasted into notes?', steps: ['Copy the brief', 'Read it the next morning'], sourceItemId: 'experiment-2', sourceTitle: 'Validation experiments' },
],
parkingLot: [
{ id: 'accounted-test-library', action: 'Saved experiment library', why: 'Auth dashboard for every validation test.', evidence: 'No bridge proof yet' },
],
},
}),
});
assert.equal(experimentSectionResponse.status, 200);
const experimentSection = await experimentSectionResponse.json();
assert.equal(experimentSection.input.optionCount, 4);
assert.equal(experimentSection.ranked[0].id, 'manual-build-order');
assert.equal(experimentSection.ranked.find(item => item.id === 'five-user-comprehension').lane.id, 'test');
assert.equal(experimentSection.ranked.find(item => item.id === 'five-user-comprehension').lane.source, 'hint');
assert.equal(experimentSection.ranked.find(item => item.id === 'five-user-comprehension').provenance.sourceSection, 'concept-map.experiments');
assert.equal(experimentSection.ranked.find(item => item.id === 'five-user-comprehension').factors.evidenceNeeded, 'Can 3 of 5 non-AI-native users explain the first recommended move?');
assert.equal(experimentSection.ranked.find(item => item.id === 'copy-paste-proof').lane.id, 'test');
assert.equal(experimentSection.ranked.find(item => item.id === 'copy-paste-proof').provenance.sourceSection, 'concept-map.experiments');
assert.equal(experimentSection.ranked.find(item => item.id === 'accounted-test-library').lane.id, 'park');
assert.deepEqual(experimentSection.handoff.warnings, []);
const emptyWrapperResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },