Accept lens-only Scattermind build orders
This commit is contained in:
@@ -374,7 +374,44 @@ try {
|
||||
assert.equal(structuredContext.ranked[0].id, 'copyable-bridge-artifact');
|
||||
assert.equal(structuredContext.ranked.find(item => item.id === 'auth-dashboard').lane.source, 'source-non-goal');
|
||||
|
||||
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, duplicateIds: duplicateIds.ranked.map(item => item.id), provenance: data.input.provenance, buildOrder: data.buildOrder }, null, 2));
|
||||
const lensOnlyResponse = await fetch(`${base}/api/rank-feedback`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
sourceName: 'Scattermind',
|
||||
artifactId: 'concept_map_lens_only',
|
||||
originalPrompt: 'Scattermind produced the current paid Concept Map shape: lenses with a Build Order paragraph, not arrays.',
|
||||
idea: 'Ranker should turn the Build Order lens into rank-ready candidates without asking Scattermind to rename fields first.',
|
||||
mode: 'mvp',
|
||||
conceptMap: {
|
||||
snapshotTitle: 'Lens-only Concept Map bridge',
|
||||
lenses: {
|
||||
risk: {
|
||||
title: 'What Can Mislead You',
|
||||
content: 'Avoid saved workspaces and auth dashboard before one manual proof. Do not build billing yet.',
|
||||
},
|
||||
channel: {
|
||||
title: 'Build Order',
|
||||
content: 'Build first: Manual build-order preview from one Concept Map - prove the bridge before adding product machinery. Test manually: Copyable decision brief - show it to 3 tired users and ask what they would do next. Defer: Visual polish pass after the rough artifact is understood. Probably noise: Saved workspace dashboard with auth, billing, and team collaboration.',
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
});
|
||||
assert.equal(lensOnlyResponse.status, 200);
|
||||
const lensOnly = await lensOnlyResponse.json();
|
||||
assert.equal(lensOnly.input.optionCount, 4);
|
||||
assert.equal(lensOnly.ranked[0].id, 'build-order-1');
|
||||
assert.equal(lensOnly.ranked[0].provenance.sourceSection, 'concept-map.lenses.channel');
|
||||
assert.equal(lensOnly.ranked.find(item => item.id === 'build-order-2').lane.id, 'test');
|
||||
assert.equal(lensOnly.ranked.find(item => item.id === 'build-order-3').lane.id, 'defer');
|
||||
assert.equal(lensOnly.ranked.find(item => item.id === 'build-order-4').lane.id, 'park');
|
||||
assert.ok(lensOnly.input.decisionContext.nonGoals.includes('Avoid saved workspaces and auth dashboard before one manual proof'));
|
||||
assert.ok(lensOnly.input.decisionContext.nonGoals.includes('Do not build billing yet'));
|
||||
assert.ok(lensOnly.ranked.find(item => item.id === 'build-order-4').metrics.nonGoalConflicts.length >= 1);
|
||||
assert.deepEqual(lensOnly.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, 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