Problem
Adapter Protocol (nautilus/adapters/base.py:127-172) defines only connect / execute / close. No get_schema() method, no schema fingerprinting infrastructure, no drift quarantine policy.
Per design §4.6 (Weakness 6 v1 mitigation): if a source's schema changes (columns added, renamed, removed), routing rules / scope constraints / transformation rules that reference those columns break silently.
Design references
design-docs/05-ecosystem-roadmap.md:233-285 — full spec including source_schema CLIPS template + quarantine-drifted-source rule example
design-docs/05-ecosystem-roadmap.md:411-412 — v1 roadmap items: "Adapter get_schema() method and schema fingerprinting" + "Schema drift detection and source quarantine policy rules"
Code locations to modify
nautilus/adapters/base.py:127 — add get_schema() -> SourceSchema to Adapter Protocol
nautilus/core/models.py — add SourceSchema model (columns, types, hash)
- Each adapter — implement
get_schema() querying upstream system metadata
nautilus/core/broker.py — schedule periodic schema check (configurable interval, default hourly), assert source_schema fact into CLIPS
nautilus/rules/ — ship quarantine-drifted-source policy rule
nautilus.yaml schema — add schema_check_interval per source
Acceptance
- Each adapter exposes
get_schema() returning canonical column list + types.
- Schema hash stored as CLIPS fact; recomputed on configured interval.
- Hash change asserts
schema_drift fact; quarantine rule fires; source excluded from routing until operator ack.
- Admin UI / CLI surfaces quarantined sources (admin UI work is v2).
- Integration test: mutate test Postgres schema, assert source quarantined within one check cycle.
Priority
P1 — listed as v1 mitigation in design doc but Protocol surface entirely missing.
Problem
AdapterProtocol (nautilus/adapters/base.py:127-172) defines onlyconnect/execute/close. Noget_schema()method, no schema fingerprinting infrastructure, no drift quarantine policy.Per design §4.6 (Weakness 6 v1 mitigation): if a source's schema changes (columns added, renamed, removed), routing rules / scope constraints / transformation rules that reference those columns break silently.
Design references
design-docs/05-ecosystem-roadmap.md:233-285— full spec includingsource_schemaCLIPS template +quarantine-drifted-sourcerule exampledesign-docs/05-ecosystem-roadmap.md:411-412— v1 roadmap items: "Adapterget_schema()method and schema fingerprinting" + "Schema drift detection and source quarantine policy rules"Code locations to modify
nautilus/adapters/base.py:127— addget_schema() -> SourceSchematoAdapterProtocolnautilus/core/models.py— addSourceSchemamodel (columns, types, hash)get_schema()querying upstream system metadatanautilus/core/broker.py— schedule periodic schema check (configurable interval, default hourly), assertsource_schemafact into CLIPSnautilus/rules/— shipquarantine-drifted-sourcepolicy rulenautilus.yamlschema — addschema_check_intervalper sourceAcceptance
get_schema()returning canonical column list + types.schema_driftfact; quarantine rule fires; source excluded from routing until operator ack.Priority
P1 — listed as v1 mitigation in design doc but Protocol surface entirely missing.