Accept pasted Scattermind concept maps
This commit is contained in:
@@ -506,7 +506,34 @@ 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, 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));
|
||||
const embeddedJsonResponse = await fetch(`${base}/api/rank-feedback`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
idea: JSON.stringify({
|
||||
reference_code: 'SM-PASTE1',
|
||||
working_name: 'Raw pasted Concept Map',
|
||||
ideaText: 'The user pasted a raw Scattermind Concept Map JSON blob into the public Ranker form.',
|
||||
lenses: {
|
||||
risk: 'Avoid saved workspaces before one copyable result lands.',
|
||||
channel: 'Build first: Raw JSON handoff detection - turn the pasted Concept Map into a defended build order. Test manually: Copy the decision brief into notes and check whether the first move survives. Probably noise: Saved workspace with accounts and team dashboard.',
|
||||
},
|
||||
}),
|
||||
mode: 'mvp',
|
||||
context: '',
|
||||
}),
|
||||
});
|
||||
assert.equal(embeddedJsonResponse.status, 200);
|
||||
const embeddedJson = await embeddedJsonResponse.json();
|
||||
assert.equal(embeddedJson.input.embeddedPayloadSource, 'idea');
|
||||
assert.equal(embeddedJson.input.provenance.artifactId, 'SM-PASTE1');
|
||||
assert.equal(embeddedJson.input.optionCount, 3);
|
||||
assert.equal(embeddedJson.ranked[0].id, 'build-order-1');
|
||||
assert.equal(embeddedJson.ranked.find(item => item.id === 'build-order-3').lane.id, 'park');
|
||||
assert.ok(embeddedJson.input.decisionContext.nonGoals.includes('Avoid saved workspaces before one copyable result lands'));
|
||||
assert.deepEqual(embeddedJson.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, duplicateIds: duplicateIds.ranked.map(item => item.id), provenance: data.input.provenance, buildOrder: data.buildOrder }, null, 2));
|
||||
} finally {
|
||||
server.kill('SIGTERM');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user