Harden Scattermind stored row paste handoff

This commit is contained in:
OpenClaw Bot
2026-05-27 16:45:56 +02:00
parent 2459d253e1
commit 8bea868fb2
4 changed files with 46 additions and 3 deletions
+35
View File
@@ -255,6 +255,41 @@ try {
assert.equal(nestedConcept.ranked.find(item => item.id === 'lesson-library').lane.id, 'park');
assert.deepEqual(nestedConcept.handoff.warnings, []);
const storedRowPayload = {
referenceCode: 'CM-STORED-77',
working_name: 'Saved paid Concept Map row',
ideaText: 'I sell practical maker workshops and need the first continuation move.',
context: 'Solo operator. Manual proof first. Avoid account dashboards before buyer evidence.',
fullReadingJson: JSON.stringify({
opening_reflection: 'A maker wants the next build step, not another planning surface.',
lenses: {
channel: 'Continue first: Concierge build-order preview from one workshop idea. Evidence next: Ask 3 makers whether the preview changes what they would build this week. Hold for later: Polished saved workspace after proof. Set aside: Account dashboard and team voting before evidence.',
},
threads_to_hold: ['Start by manually turning one workshop concept into a build order preview', 'Validate with three makers before adding persistence'],
}),
};
const storedRowPasteResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
idea: `Saved Scattermind row pasted from Appwrite:\n\n\`\`\`json\n${JSON.stringify(storedRowPayload)}\n\`\`\``,
mode: 'mvp',
}),
});
assert.equal(storedRowPasteResponse.status, 200);
const storedRowPaste = await storedRowPasteResponse.json();
assert.equal(storedRowPaste.input.embeddedPayloadSource, 'idea');
assert.equal(storedRowPaste.input.provenance.artifactId, 'CM-STORED-77');
assert.equal(storedRowPaste.input.provenance.snapshotTitle, 'Saved paid Concept Map row');
assert.match(storedRowPaste.input.provenance.originalPrompt, /maker workshops/);
assert.equal(storedRowPaste.ranked[0].id, storedRowPaste.buildOrder.doFirst[0]);
assert.match(storedRowPaste.brief.quickGlance.topPick, /Concierge build-order preview/i);
assert.match(storedRowPaste.brief.quickGlance.sourceTrace.sourceSection, /concept-map\.lenses\.channel/);
assert.equal(storedRowPaste.handoff.source.hasOriginalPrompt, true);
assert.equal(storedRowPaste.handoff.readiness.status, 'ready');
assert.match(storedRowPaste.handoff.copyableText, /CM-STORED-77/);
assert.equal(storedRowPaste.ranked.find(item => /Account dashboard/i.test(item.title)).lane.id, 'park');
const snapshotOnlyResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },