Archive v0.7: scheduled catalog observer - #22
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Turn the v0.6
observeFirstPartyIdentityingestion primitive into a periodic first-party Catalog Observer that preserves vendor snapshots and continuously feeds the identity-drift engine.Collection model
Migration
0009_catalog_observer.sqladds:catalog_observer_sources: source registry, cadence, parser, credential reference and due time;catalog_collection_runs: durable attempt/status/diagnostic history;catalog_source_snapshots: append-only raw response snapshots linked tosource_records.Due work is claimed with
FOR UPDATE SKIP LOCKEDandnext_run_atis advanced before HTTP I/O, so multiple runner processes can coordinate without holding database locks across network requests.Observer
PgCatalogObserver:source_recordwhen calling v0.6observeFirstPartyIdentity;Docs are snapshot-only in v0.7: they create source/snapshot evidence but do not make parser-derived identity claims yet.
Runner scheduling
Queue-mode runner enables the observer by default and launches collection beside Run processing. The runner polls PostgreSQL every 60s for due sources; source rows own the longer collection cadence.
Optional runtime controls:
MODELAPSE_CATALOG_OBSERVER_ENABLEDMODELAPSE_CATALOG_OBSERVER_POLL_MSMODELAPSE_CATALOG_OBSERVER_TIMEOUT_MSMODELAPSE_CATALOG_OBSERVER_MAX_RESPONSE_BYTESA one-shot
catalog-admin collect-first-party-catalogcommand uses the same implementation for operator collection / diagnosis.v0.6 invariants retained
Coverage
Adds parser unit coverage and PostgreSQL integration coverage showing two scheduled model-list snapshots with changing provider snapshot IDs produce source-backed alias + execution-binding drift through the existing v0.6 engine while an unmapped remote ID remains evidence only.
Deployment and operator semantics are documented in
docs/catalog-observer.mdand the Coolify runner guide.