test: stop requiring retired archive entrypoints in Python contracts
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user