fix(rectification): keep one delivery and adopt with the birth date
Accept and GET now decide with the same birth snapshot as the answer, so an under-age probe cannot flip can_adopt. The exit skips a second write when this reply already delivered. The card stays without an adopt button when adoption is not allowed, and a refusal shows the Chinese sentence.
This commit is contained in:
@@ -167,7 +167,7 @@ for (const storedVersion of [PREVIOUS, CURRENT]) {
|
||||
requests.push(String(url));
|
||||
return Response.json(String(url).endsWith("/versions") ? golden.versions : block.response);
|
||||
});
|
||||
const opened = await dossierResponseWithIdentity(parseV9CaseDossier(raw)!, [], { status: "verified", requiresSkillAdoption: false } as never);
|
||||
const opened = await dossierResponseWithIdentity(parseV9CaseDossier(raw)!, [], { status: "verified", requiresSkillAdoption: false } as never, { birthDate: "1900-06-15" });
|
||||
assert.equal(opened.case.result_identity.can_recompare, storedVersion === PREVIOUS);
|
||||
assert.equal(opened.case.result_identity.read_only, storedVersion === PREVIOUS);
|
||||
const result = await scoreAndPersistCurrentEvidence({ accounting: accounting.client, userId: USER_ID, caseId: CASE_ID });
|
||||
@@ -205,7 +205,7 @@ for (const storedVersion of [PREVIOUS, CURRENT]) {
|
||||
assert.ok(String(url).endsWith("/versions") || String(url).endsWith("/score"));
|
||||
return Response.json(String(url).endsWith("/versions") ? golden.versions : golden.score);
|
||||
});
|
||||
const opened = await dossierResponseWithIdentity(parseV9CaseDossier(raw)!, [], { status: "verified", requiresSkillAdoption: false } as never);
|
||||
const opened = await dossierResponseWithIdentity(parseV9CaseDossier(raw)!, [], { status: "verified", requiresSkillAdoption: false } as never, { birthDate: "1900-06-15" });
|
||||
assert.equal(opened.case.result_identity.can_recompare, storedVersion === PREVIOUS);
|
||||
assert.equal(opened.case.result_identity.read_only, storedVersion === PREVIOUS);
|
||||
const result = await scoreAndPersistCurrentEvidence({ accounting: accounting.client, userId: USER_ID, caseId: CASE_ID, keepAnswers: true });
|
||||
@@ -242,7 +242,7 @@ test("stale history exposes explicit recompare and real tools replace old proven
|
||||
assert.equal(scans, 0, "opening history is not forced recomputation");
|
||||
await (tools["rectification-compare-candidates"] as unknown as { execute(input: unknown): Promise<unknown> }).execute({ caseId: CASE_ID });
|
||||
assert.equal(scans, 1);
|
||||
const refreshed = await dossierResponseWithIdentity(parseV9CaseDossier(raw)!, [], { status: "verified", requiresSkillAdoption: false } as never);
|
||||
const refreshed = await dossierResponseWithIdentity(parseV9CaseDossier(raw)!, [], { status: "verified", requiresSkillAdoption: false } as never, { birthDate: "1900-06-15" });
|
||||
assert.equal(refreshed.case.result_identity.read_only, false);
|
||||
assert.equal(refreshed.case.result_identity.algorithm_version, CURRENT);
|
||||
assert.equal(refreshed.case.result_identity.policy_version, golden.versions.decision_policy_version);
|
||||
@@ -306,7 +306,7 @@ for (const stage of ["minute", "block_scan"] as const) {
|
||||
assert.equal(result.persisted.confirmationAllowed, false);
|
||||
const response = await dossierResponseWithIdentity(parseV9CaseDossier(raw)!, [], {
|
||||
status: "verified", requiresSkillAdoption: false,
|
||||
} as never);
|
||||
} as never, { birthDate: "1900-06-15" });
|
||||
assert.match(response.case.result_notice ?? "", /按旧算法产出/);
|
||||
assert.equal(response.case.result_identity.algorithm_version, PREVIOUS);
|
||||
assert.equal(response.case.result_identity.can_recompare, false);
|
||||
|
||||
Reference in New Issue
Block a user