Merge partial Scattermind rank imports
This commit is contained in:
@@ -271,6 +271,41 @@ try {
|
||||
assert.deepEqual(nonGoal.handoff.itemTrace.find(item => item.id === 'workspace-autopilot').nonGoalConflicts, workspace.metrics.nonGoalConflicts);
|
||||
assert.ok(!nonGoal.buildOrder.doFirst.includes('workspace-autopilot'));
|
||||
|
||||
const mixedWrapperResponse = await fetch(`${base}/api/rank-feedback`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
sourceName: 'Scattermind',
|
||||
artifactId: 'concept_map_mixed_wrappers',
|
||||
originalPrompt: 'The bridge export contains a normalized feature list plus Concept Map validation and parking sections.',
|
||||
idea: 'Ranker should not lose sectioned Concept Map context when a partial feature wrapper is also present.',
|
||||
mode: 'mvp',
|
||||
featureSet: {
|
||||
features: [
|
||||
{ id: 'manual-bridge-proof', title: 'Manual bridge proof', description: 'Turn one Concept Map into a defended build-order preview.', evidenceNeeded: 'Can one tired user act on the preview?', recommendedLane: 'do-first', rankerHints: { value: 9, effort: 2, confidence: 8, urgency: 8, risk: 2 } },
|
||||
],
|
||||
},
|
||||
conceptMap: {
|
||||
validateNext: [
|
||||
{ id: 'copyable-brief-test', action: 'Copyable brief test', why: 'Check whether the decision brief remains useful outside Ranker.', evidence: 'Can the user paste it into notes and still know the next move?' },
|
||||
],
|
||||
parkingLot: [
|
||||
{ id: 'account-dashboard', action: 'Account dashboard', why: 'Saved workspaces, auth, billing, and team sync.', evidence: 'No bridge proof yet' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
});
|
||||
assert.equal(mixedWrapperResponse.status, 200);
|
||||
const mixedWrapper = await mixedWrapperResponse.json();
|
||||
assert.equal(mixedWrapper.input.optionCount, 3);
|
||||
assert.equal(mixedWrapper.ranked[0].id, 'manual-bridge-proof');
|
||||
assert.equal(mixedWrapper.handoff.itemTrace.find(item => item.id === 'manual-bridge-proof').sourceSection, 'feature-set.features');
|
||||
assert.equal(mixedWrapper.ranked.find(item => item.id === 'copyable-brief-test').lane.id, 'test');
|
||||
assert.equal(mixedWrapper.handoff.itemTrace.find(item => item.id === 'copyable-brief-test').sourceSection, 'concept-map.validateNext');
|
||||
assert.equal(mixedWrapper.ranked.find(item => item.id === 'account-dashboard').lane.id, 'park');
|
||||
assert.equal(mixedWrapper.handoff.itemTrace.find(item => item.id === 'account-dashboard').sourceSection, 'concept-map.parkingLot');
|
||||
assert.deepEqual(mixedWrapper.handoff.warnings, []);
|
||||
|
||||
const duplicateIdResponse = await fetch(`${base}/api/rank-feedback`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
||||
Reference in New Issue
Block a user