fix(rectification): ingest first-turn events without dropping day precision or claiming a unique minute
Independent Staging Quality Gate / validate (push) Successful in 10m5s
Independent Staging Quality Gate / publish (push) Successful in 7m4s

SQL kinds now match the TypeScript ledger so batch ingest can confirm dated events. Confirm no longer burns the opening focus, recap uses server date labels, and the Agent sees indistinguishable width instead of a fake unique minute.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-19 07:44:23 +08:00
parent 2bf7472645
commit f708edf365
32 changed files with 2046 additions and 100 deletions
@@ -532,7 +532,7 @@ test("v9 evidence lifecycle: quote grounding, idempotency, confirm and revision
"1",
);
// Quotes not present in the source turn are rejected.
// Quotes not present in the source turn are rejected without aborting the RPC.
const ungrounded = await service.rpc("propose_agentic_rectification_evidence", {
p_user_id: userId,
p_case_id: caseId,
@@ -546,7 +546,10 @@ test("v9 evidence lifecycle: quote grounding, idempotency, confirm and revision
p_date_precision: "year",
p_summary: "2020年去了上海",
});
assert.match(rpcError(ungrounded.error), /agentic_rectification_quote_not_grounded/);
assert.equal(ungrounded.error, null, rpcError(ungrounded.error));
assert.equal((ungrounded.data as Record<string, unknown>).outcome, "rejected");
assert.equal((ungrounded.data as Record<string, unknown>).error_code, "quote_not_grounded");
assert.equal((ungrounded.data as Record<string, unknown>).evidence_id, null);
// Confirm transitions draft -> confirmed with a timestamp.
const confirmed = await service.rpc("confirm_agentic_rectification_evidence", {