mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-06-14 02:40:45 +08:00
feat: optimize default prompt structure for U-shaped attention + fix opfs/ranking flakes
- Restructure all 7 task templates: add assistant identity-ack and info-ack blocks, restore reference materials to system role, keep only format+rules as user tail - Fix writeJsonFile treating empty serializedText as valid (opfs-persistence flake) - Fix shared-ranking test: strip diagnostic lastSearchTimings from side-effect comparison - Update all related test assertions (prompt-builder-defaults, task-profile-migration, task-profile-storage, prompt-builder-mixed-transcript, p0-regressions, extractor-phase3-layered-context)
This commit is contained in:
@@ -155,7 +155,16 @@ try {
|
||||
},
|
||||
});
|
||||
|
||||
assert.equal(JSON.stringify(graph), graphBefore, "shared ranking should be side-effect-free");
|
||||
const stripDiagnosticTimings = (json) => {
|
||||
const obj = JSON.parse(json);
|
||||
if (obj?.vectorIndexState) delete obj.vectorIndexState.lastSearchTimings;
|
||||
return JSON.stringify(obj);
|
||||
};
|
||||
assert.equal(
|
||||
stripDiagnosticTimings(JSON.stringify(graph)),
|
||||
stripDiagnosticTimings(graphBefore),
|
||||
"shared ranking should be side-effect-free (ignoring diagnostic timings)",
|
||||
);
|
||||
assert.equal(first.scoredNodes[0]?.nodeId, confession.id);
|
||||
assert.equal(second.scoredNodes[0]?.nodeId, confession.id);
|
||||
assert.deepEqual(
|
||||
|
||||
Reference in New Issue
Block a user