Data and Knowledge Systems · Principal
Can the assistant say no consumers exist?
The question
Interview question
An assistant searches the code graph and says, “No service consumes `OrderRefunded`. You can remove it.” The search returned zero matches. Some clients are outside your repositories, one subscriber uses reflection, and one deployment has not published its index. What would it take to make a safe removal decision?
Take a few minutes to form your approach. Then open a worked answer and compare the decisions.
Reveal a worked answer
Zero matches is a property of a query over an observed dataset. “No consumers exist” is a claim about the whole world. To get from one to the other, the system needs a closed scope and a completeness argument: which repositories, deployment versions, schema versions, topics, customer integrations, and time window are included, and which ways of consuming the event are detectable. With an unindexed deployment and external clients, the current claim is false as a statement of knowledge even if it later turns out nobody uses the event.
I would have the assistant answer something like: “No consumers found in the indexed first-party repositories at these commits. The production deployment, reflection-based subscriber, and external clients are not covered.” Show the coverage manifest and last successful ingest for each source. Report failures as unknown, not as zero. A precise index such as SCIP can make positive symbol references reliable for supported languages, but a dynamic registration path can evade a static reference graph. CodeQL's call-graph documentation discusses this kind of limit. A graph has to name what it did not observe.
For a removal decision, close the discovery paths one by one. Enumerate deployments and their exact artifacts, inspect topic and schema registry subscriptions, search code and configuration, review service ownership records, and contact owners of external contracts. Runtime telemetry can show actual use over a defined window, with event version and client identity where privacy permits. A quiet window is weak evidence for a monthly or dormant consumer. Add a deprecation period, warnings and owner acknowledgments, compatibility checks, and a rollback or bridge plan. The exact period should follow the consumer contract and traffic pattern, not an arbitrary seven-day dashboard.
The team asks to remove the event today because the graph is empty. The covered graph has no observed consumer. That does not establish a safe disablement. If there is an urgent security reason to stop publishing, use an incident process with a bounded change, notice to owners, monitoring for errors or missing downstream outputs, and a recovery path. That is an explicit risk decision. The assistant should not launder a coverage gap into approval.
Even a fully indexed internal graph does not close external consumers. A provider may expose the event through webhooks or an exported stream. If subscriber identities are not recorded or enforceable, negative proof may be impossible. Then the safe product language is a scoped observation and a deprecation process, not a universal “none.” This is also why a list of apparent consumers can help with investigation, while a zero-result claim needs a much stronger contract.
Continue reading
Related questions
Read beyond the question
Explore more data and knowledge systems
Follow another question in this area, or return to the full Interview Prep index.
Browse this area →