Accept paid Scattermind concept map shape

This commit is contained in:
OpenClaw Bot
2026-05-27 00:07:54 +02:00
parent b556c67a4c
commit 802657b638
3 changed files with 41 additions and 7 deletions
+29 -1
View File
@@ -417,6 +417,34 @@ try {
assert.ok(lensOnly.ranked.find(item => item.id === 'build-order-4').metrics.nonGoalConflicts.length >= 1);
assert.deepEqual(lensOnly.handoff.warnings, []);
const scattermindPaidShapeResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
reference_code: 'SM-PAID1',
working_name: 'Neighborhood Supper Club',
ideaText: 'I want to test a tiny paid supper club before building a food community app.',
context: 'Solo operator. Manual proof first. Avoid accounts and saved workspaces before anyone pays.',
mode: 'mvp',
lenses: {
audience: 'First buyers are local neighbors who already attend small food events and want a low-pressure dinner plan.',
risk: 'Avoid accounts and saved workspaces before anyone pays. Do not build subscriptions or an app dashboard yet.',
channel: 'Build first: One manual supper-club offer page - collect three real yes/no replies before building machinery. Test manually: Concierge invitation script - ask ten neighbors if they would pay for the first dinner. Defer: Pretty event calendar after the first paid table. Probably noise: Saved member workspace with accounts, billing, subscriptions, and team dashboard.',
},
}),
});
assert.equal(scattermindPaidShapeResponse.status, 200);
const scattermindPaidShape = await scattermindPaidShapeResponse.json();
assert.equal(scattermindPaidShape.input.provenance.artifactId, 'SM-PAID1');
assert.equal(scattermindPaidShape.input.provenance.snapshotTitle, 'Neighborhood Supper Club');
assert.match(scattermindPaidShape.input.provenance.originalPrompt, /supper club/);
assert.equal(scattermindPaidShape.input.optionCount, 4);
assert.equal(scattermindPaidShape.ranked[0].id, 'build-order-1');
assert.equal(scattermindPaidShape.ranked.find(item => item.id === 'build-order-4').lane.id, 'park');
assert.ok(scattermindPaidShape.input.decisionContext.nonGoals.includes('Avoid accounts and saved workspaces before anyone pays'));
assert.ok(scattermindPaidShape.ranked.find(item => item.id === 'build-order-4').metrics.nonGoalConflicts.length >= 1);
assert.deepEqual(scattermindPaidShape.handoff.warnings, []);
const mergedContextResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
@@ -457,7 +485,7 @@ try {
assert.equal(mergedContext.ranked.find(item => item.id === 'workspace-dashboard').lane.source, 'source-non-goal');
assert.deepEqual(mergedContext.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, mergedContextTop: mergedContext.ranked[0].id, duplicateIds: duplicateIds.ranked.map(item => item.id), provenance: data.input.provenance, buildOrder: data.buildOrder }, null, 2));
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, duplicateIds: duplicateIds.ranked.map(item => item.id), provenance: data.input.provenance, buildOrder: data.buildOrder }, null, 2));
} finally {
server.kill('SIGTERM');
}