Search index without an asynchronous feed

errorderived-store-without-cdc-or-rebuild

A search index is derived data and needs an asynchronous feed from a stream, change data capture or an indexing worker. Without one it is written inline on the request path, and it can never be rebuilt after it drifts.

Severity
error
Selects
every node of kind search-index
Components in scope
32
What it checks

It looks at every node of kind search-index, and fires when:

  • — this does not hold:
  • — the node has at least one asynchronous incoming edge from a stream, change-data-capture or worker
Message
Search index '{{node.id}}' has no asynchronous feed from a stream, change data capture or worker. It cannot be rebuilt or kept in sync independently of the write path.

{{node.id}} style paths are filled in from the node, the edge or the design the finding is about.

Applies to · 32 components
Tripped by · 15

Reference designs whose broken twin names this rule in its header. The gate reads the same header, and fails when a rule no design trips.

Source
# yaml-language-server: $schema=../schema/rule.schema.json
# A search index is derived data. If nothing feeds it asynchronously (a stream, change data
# capture or an indexing worker) it is either written inline on the request path or never
# rebuilt after drift. Tripped by: designs/twitter-timeline.broken.yaml
schemaVersion: "1"
type: "rule"
id: "derived-store-without-cdc-or-rebuild"
severity: "error"
select:
  node:
    kind: "search-index"
when:
  not:
    hasEdge:
      direction: "in"
      mode: "async"
      peerKind: ["stream", "change-data-capture", "worker"]
message: "Search index '{{node.id}}' has no asynchronous feed from a stream, change data capture or worker. It cannot be rebuilt or kept in sync independently of the write path."

The same page as markdown, for an agent: /catalogue/rules/derived-store-without-cdc-or-rebuild.md