fix: retain PSL in compact catalogs
Some checks failed
Standalone registry checks / check (push) Has been cancelled

This commit is contained in:
Nic Weyand 2026-09-22 09:09:41 -04:00
commit 3c89a540d9
Signed by: nicweyand
SSH key fingerprint: SHA256:2te+ycJIQON/Wo/dH6+ZkFSQ4HnHWpetV2azx9E65dQ
7 changed files with 16 additions and 5 deletions

View file

@ -616,7 +616,8 @@ pub(crate) fn compact_runtime(db: &Connection) -> anyhow::Result<()> {
INSERT OR IGNORE INTO runtime_facts SELECT fact FROM names;
INSERT OR IGNORE INTO runtime_facts SELECT fact FROM popularity;
INSERT OR IGNORE INTO runtime_facts SELECT fact FROM rejected;
INSERT OR IGNORE INTO runtime_facts SELECT item.value FROM edges,json_each(edges.facts) item;",
INSERT OR IGNORE INTO runtime_facts SELECT item.value FROM edges,json_each(edges.facts) item;
INSERT OR IGNORE INTO runtime_facts SELECT id FROM facts WHERE predicate='psl';",
)?;
db.execute(
"DELETE FROM facts WHERE NOT EXISTS(SELECT 1 FROM runtime_facts r WHERE r.id=facts.id)",

View file

@ -267,6 +267,9 @@ fn compact_generation_keeps_runtime_results_and_authenticates_cold_history() ->
serde_json::to_value(full.lookup("Facebook", 20)?.candidates)?,
serde_json::to_value(compact.lookup("Facebook", 20)?.candidates)?
);
let compact_queue =
argand_site_registry::queue::review_queue(&compact, common::timestamp()?, 100, 1_000)?;
assert!(!compact_queue.items.is_empty());
assert!(
std::fs::metadata(compact_path.join("registry.sqlite"))?.len()
< std::fs::metadata(root.path().join("full/registry.sqlite"))?.len()