Summary
A project_domain whose fqn_prefix matches zero nodes (or zero connected triples) currently returns drift_score: 0.0, status: "clean", empty census — indistinguishable from a genuinely healthy domain. A totally mis-targeted ontology therefore reports 100% green. Add a guard that marks such domains empty (not clean).
Reproduction (real, this session)
click ships its package under src/click/, so ingested FQNs are src.click.core, src.click.parser, … I wrote an ontology with fqn_prefix: "click.core" (the import name, not the ingest-relative FQN). Result:
EVERY domain → drift_score 0.0, status "clean", t_imports/t_calls all zeros, any_critical=false
The ontology measured nothing, yet the report was all-green. Fixing the prefix to src.click.* produced real censuses and warnings. The failure was silent — only a manual sqlite peek (select id from nodes where id like '%click.core%') revealed FQNs start with src..
This is the worst failure mode for a CI gate: it passes on an ontology that covers nothing.
Proposal
- When a domain's selector matches 0 nodes →
status: "empty" + a message (fqn_prefix matched 0 nodes; did you mean 'src.click.core'? with closest-prefix suggestions).
- When it matches nodes but 0 connected triples in every layer →
status: "no_signal" (distinct from clean), so single-symbol or alias-only matches don't masquerade as healthy.
- Make
any_critical (or a new any_empty) reflect these so CI can fail on a broken ontology.
Closest-prefix suggestion overlaps with the symbol-search idea in #173.
Why it matters
Without this, a wrong fqn_prefix (very easy with src/-layout repos, monorepos, or renamed packages) silently disables drift while showing green. Drift can only be trusted as a gate if "matched nothing" is loud.
Summary
A
project_domainwhosefqn_prefixmatches zero nodes (or zero connected triples) currently returnsdrift_score: 0.0,status: "clean", empty census — indistinguishable from a genuinely healthy domain. A totally mis-targeted ontology therefore reports 100% green. Add a guard that marks such domainsempty(notclean).Reproduction (real, this session)
clickships its package undersrc/click/, so ingested FQNs aresrc.click.core,src.click.parser, … I wrote an ontology withfqn_prefix: "click.core"(the import name, not the ingest-relative FQN). Result:The ontology measured nothing, yet the report was all-green. Fixing the prefix to
src.click.*produced real censuses and warnings. The failure was silent — only a manual sqlite peek (select id from nodes where id like '%click.core%') revealed FQNs start withsrc..This is the worst failure mode for a CI gate: it passes on an ontology that covers nothing.
Proposal
status: "empty"+ a message (fqn_prefix matched 0 nodes; did you mean 'src.click.core'?with closest-prefix suggestions).status: "no_signal"(distinct fromclean), so single-symbol or alias-only matches don't masquerade as healthy.any_critical(or a newany_empty) reflect these so CI can fail on a broken ontology.Closest-prefix suggestion overlaps with the symbol-search idea in #173.
Why it matters
Without this, a wrong
fqn_prefix(very easy withsrc/-layout repos, monorepos, or renamed packages) silently disables drift while showing green. Drift can only be trusted as a gate if "matched nothing" is loud.