Context
PR #4106 added hosted-property → federated-index sync. Authorizations are fully reconciled (rows we own with source='aao_hosted' are deleted when the manifest drops them). Properties cannot be — the discovered_properties table has no source column, so we can't safely distinguish hosted-written rows from crawler-written rows.
What's needed
Add a source column to discovered_properties:
ALTER TABLE discovered_properties
ADD COLUMN source TEXT NOT NULL DEFAULT 'crawler'
CHECK (source IN ('crawler', 'aao_hosted'));
Backfill: existing rows get 'crawler' (the default). Update the hosted-property sync to write 'aao_hosted' and reconcile on re-sync (delete rows for (publisher_domain, source='aao_hosted') not in the new manifest).
Why it matters
Today, a publisher who removes a property from their AAO-hosted manifest sees the property persist on the publisher page until manually cleared. Small but visible inconsistency. Tracked as a known limitation in the merged changeset; this issue is the cleanup.
Related
Context
PR #4106 added hosted-property → federated-index sync. Authorizations are fully reconciled (rows we own with
source='aao_hosted'are deleted when the manifest drops them). Properties cannot be — thediscovered_propertiestable has no source column, so we can't safely distinguish hosted-written rows from crawler-written rows.What's needed
Add a
sourcecolumn todiscovered_properties:Backfill: existing rows get
'crawler'(the default). Update the hosted-property sync to write'aao_hosted'and reconcile on re-sync (delete rows for(publisher_domain, source='aao_hosted')not in the new manifest).Why it matters
Today, a publisher who removes a property from their AAO-hosted manifest sees the property persist on the publisher page until manually cleared. Small but visible inconsistency. Tracked as a known limitation in the merged changeset; this issue is the cleanup.
Related
services/hosted-property-sync.ts