Keep hard-railed bridge items out of do-first

This commit is contained in:
OpenClaw Bot
2026-05-27 01:01:49 +02:00
parent b8c518f7cb
commit bf451fad3e
2 changed files with 63 additions and 23 deletions
+28
View File
@@ -125,6 +125,34 @@ try {
assert.equal(messyIdeaOnly.handoff.readiness.status, 'usable-with-warnings');
assert.ok(messyIdeaOnly.handoff.readiness.nextChecks.some(item => /source artifact id if this came from Scattermind/i.test(item)));
const hardRailResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
schema: 'prioritix-feature-set-v1',
sourceName: 'Scattermind',
artifactId: 'concept_map_hard_rails',
snapshotTitle: 'Continuation engine guardrail pass',
originalPrompt: 'Clarify the continuation engine without turning it into a dashboard.',
idea: 'Scattermind clarified that Ranker should defend build order after a Concept Map.',
context: 'Solo builder. Avoid dashboards, accounts, saved workspaces, billing, and collaboration before proof.',
mode: 'mvp',
featureSet: {
features: [
{ id: 'workspace-autopilot', title: 'Saved workspace autopilot', description: 'A dashboard with accounts, saved workspaces, billing, collaboration, and AI-generated roadmaps.', evidenceNeeded: 'Would teams pay for this later?', rankerHints: { value: 10, effort: 1, confidence: 10, urgency: 10, risk: 1 }, sourceSection: 'concept-map.parkingLot' },
{ id: 'manual-source-preview', title: 'Manual source-traced build order preview', description: 'Take one Concept Map and produce a defended do-first / validate-next / defer / park result with source quotes.', evidenceNeeded: 'Can one tired non-AI-native user explain why the first move wins?', rankerHints: { value: 8, effort: 3, confidence: 7, urgency: 7, risk: 3 }, sourceSection: 'concept-map.nextActions' },
{ id: 'copyable-brief', title: 'Copyable bridge brief', description: 'Let the user copy the defended order and provenance into notes.', evidenceNeeded: 'Does the copied brief preserve the reason and source trace?', recommendedLane: 'validate-next', sourceSection: 'concept-map.nextActions' },
],
},
}),
});
assert.equal(hardRailResponse.status, 200);
const hardRail = await hardRailResponse.json();
assert.equal(hardRail.ranked.find(item => item.id === 'workspace-autopilot').lane.source, 'source-non-goal');
assert.equal(hardRail.buildOrder.doFirst[0], 'manual-source-preview', 'first eligible bridge item should become Do first even when a hard-railed candidate scores loudly');
assert.equal(hardRail.brief.quickGlance.topPick, 'Manual source-traced build order preview');
assert.equal(hardRail.handoff.readiness.status, 'ready');
const hintedResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },