test: stop requiring retired archive entrypoints in Python contracts
Independent Staging Quality Gate / validate (push) Successful in 11m24s
Independent Staging Quality Gate / publish (push) Successful in 3m45s

Flip archive tokens to must-not-appear on the session row and session hook only. Keep writeChatSession POST/PATCH and assert delete still uses DELETE. Grep tests/ before deleting frontend symbols.
This commit is contained in:
jesse-ux
2026-09-21 19:20:45 +08:00
parent d3e0edfd1b
commit d2cec17995
6 changed files with 85 additions and 22 deletions
@@ -115,17 +115,15 @@ test("retire archive migration clears archived_at without bumping updated_at", {
);
assert.match(retireSql, /set archived_at = null/);
assert.doesNotMatch(retireSql, /updated_at\s*=/);
fixture.psqlAs("schema_owner", "schema-owner-test-password", `
update public.chat_sessions set archived_at = null where archived_at is not null;
`);
const apply = retireSql.match(/update public\.chat_sessions\s+set archived_at = null\s+where archived_at is not null;/);
assert.ok(apply?.[0], "retire migration must contain the unarchive update");
fixture.psqlAs("schema_owner", "schema-owner-test-password", apply[0]);
assert.equal(fixture.psql("select count(*) from public.chat_sessions where archived_at is not null"), "0");
const after = fixture.psql(
`select pinned::text || '|' || jsonb_array_length(messages)::text || '|' || updated_at::text from public.chat_sessions where id = '${archivedRectification}'`,
);
assert.equal(after, before);
fixture.psqlAs("schema_owner", "schema-owner-test-password", `
update public.chat_sessions set archived_at = null where archived_at is not null;
`);
fixture.psqlAs("schema_owner", "schema-owner-test-password", apply[0]);
assert.equal(fixture.psql("select count(*) from public.chat_sessions where archived_at is not null"), "0");
} finally {
fixture.stop();