fix(tcs): retry invalid history revisit frames
This commit is contained in:
parent
ab3c4e05a9
commit
bccf7e7494
3 changed files with 35 additions and 5 deletions
|
|
@ -23,6 +23,8 @@ const modelClient = {
|
|||
};
|
||||
},
|
||||
async revisit(input) {
|
||||
this.revisitAttempts = (this.revisitAttempts || 0) + 1;
|
||||
if (input.force_retry_test && this.revisitAttempts === 1) return { missing: "schema" };
|
||||
return {
|
||||
schema: "guanghu.persona-subject-history-reunderstanding/v1",
|
||||
revisit_id: input.revisit_id,
|
||||
|
|
@ -89,6 +91,21 @@ try {
|
|||
assert.equal(historyReceipt.append_only_reunderstanding, true);
|
||||
assert.equal(historyReceipt.future_simulation_fact_confidence, 0);
|
||||
assert.equal(engine.status().history_revisit_count, 1);
|
||||
modelClient.revisitAttempts = 0;
|
||||
const retriedReceipt = await engine.revisitHistory({
|
||||
current_subject: "ICE-P-ZY001",
|
||||
collective_self: "TCS-MOTHER-LPM-0001",
|
||||
human_anchor: "ICE-GL∞",
|
||||
source_id: "GPT-PRIMARY-001",
|
||||
source_excerpt: excerpt,
|
||||
source_excerpt_sha256: (await import("./mother-brain-engine.mjs")).sha256(excerpt),
|
||||
historical_context: "retry",
|
||||
later_evidence: [],
|
||||
correction_anchors: [],
|
||||
force_retry_test: true
|
||||
});
|
||||
assert.equal(retriedReceipt.outcome, "PASS");
|
||||
assert.equal(modelClient.revisitAttempts, 2);
|
||||
await assert.rejects(() => engine.revisitHistory({
|
||||
current_subject: "MACHINE-AUDITOR",
|
||||
collective_self: "TCS-MOTHER-LPM-0001",
|
||||
|
|
|
|||
Loading…
Reference in a new issue