Support sectioned Concept Map rank imports
This commit is contained in:
@@ -171,6 +171,42 @@ try {
|
||||
assert.equal(nestedConcept.ranked.find(item => item.id === 'lesson-library').lane.id, 'park');
|
||||
assert.deepEqual(nestedConcept.handoff.warnings, []);
|
||||
|
||||
const sectionedConceptResponse = await fetch(`${base}/api/rank-feedback`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
sourceName: 'Scattermind',
|
||||
artifactId: 'concept_map_sectioned_lanes',
|
||||
originalPrompt: 'The Concept Map separates next actions, validation ideas, deferred items, and a parking lot.',
|
||||
idea: 'Ranker should combine a sectioned Concept Map into one defended build order without losing lane provenance.',
|
||||
mode: 'mvp',
|
||||
conceptMap: {
|
||||
nextActions: [
|
||||
{ id: 'one-source-preview', action: 'One-source build-order preview', why: 'Turn the Concept Map into a defended first move.', evidence: 'Can one tired user say what to do next?', rankerHints: { value: 9, effort: 2, confidence: 8, urgency: 8, risk: 2 } },
|
||||
],
|
||||
validateNext: [
|
||||
{ id: 'copyable-handoff', action: 'Copyable handoff brief', why: 'Let the user paste the build order into notes.', evidence: 'Does the copied brief preserve the action and reason?' },
|
||||
],
|
||||
deferred: [
|
||||
{ id: 'visual-polish-pass', action: 'Visual polish pass', why: 'Improve the result screen after the bridge proves useful.', evidence: 'Do users understand the rough brief first?' },
|
||||
],
|
||||
parkingLot: [
|
||||
{ id: 'saved-team-workspace', action: 'Saved team workspace', why: 'Accounts, auth dashboard, collaboration, and sync for every idea.', evidence: 'No proof yet' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
});
|
||||
assert.equal(sectionedConceptResponse.status, 200);
|
||||
const sectionedConcept = await sectionedConceptResponse.json();
|
||||
assert.equal(sectionedConcept.input.optionCount, 4);
|
||||
assert.equal(sectionedConcept.ranked[0].id, 'one-source-preview');
|
||||
assert.equal(sectionedConcept.ranked.find(item => item.id === 'copyable-handoff').lane.id, 'test', 'validateNext sections should default into Validate next');
|
||||
assert.equal(sectionedConcept.ranked.find(item => item.id === 'copyable-handoff').lane.source, 'hint');
|
||||
assert.equal(sectionedConcept.ranked.find(item => item.id === 'visual-polish-pass').lane.id, 'defer', 'deferred sections should not enter the active proof slice');
|
||||
assert.equal(sectionedConcept.ranked.find(item => item.id === 'saved-team-workspace').lane.id, 'park', 'parking lot sections should stay parked');
|
||||
assert.equal(sectionedConcept.handoff.itemTrace.find(item => item.id === 'saved-team-workspace').sourceSection, 'concept-map.parkingLot');
|
||||
assert.deepEqual(sectionedConcept.handoff.warnings, []);
|
||||
|
||||
const emptyWrapperResponse = await fetch(`${base}/api/rank-feedback`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
||||
Reference in New Issue
Block a user