Is BayesCausal production-ready at 1.0.0?
Yes. 125 tests pass under Vitest 4 with 97% coverage; TypeScript 6 maximum strict mode is clean; Biome 2.5
lint is clean; publint and @arethetypeswrong/cli are clean across all twenty
subpaths. The suite and the distribution smoke test are run on the Node 20, 22, and 24 matrix. Every
published release carries SLSA provenance produced by GitHub Actions.
How is this different from a log search or an alert rule?
A log search or an alert rule tells you a symptom fired; it does not tell you why. BayesCausal models the
causal graph between components and symptoms, so when you observe the symptoms of an incident as evidence it
returns a ranked list of probable root causes with calibrated posterior probabilities and the most probable
explanation. On the serving template that reaches 78% top-1 accuracy with a Brier score of 0.0409.
Does the do-operator handle counterfactuals?
The do-operator is interventional: it answers P(Y | do(X)), which separates seeing from doing,
so a confounded observational effect of 0.380 becomes an interventional 0.200 once the back-door is cut.
Counterfactual queries are on the roadmap. The causal graph is declared by you, not discovered from data, and
the docs are explicit about both points.
What is the difference between exact and approximate inference?
Exact inference by variable elimination and junction-tree belief propagation returns the exact posterior the
graph implies. The approximate engines, loopy belief propagation, likelihood weighting, and Gibbs sampling,
scale to larger graphs and each reports convergence and a credible interval, so you can check the diagnosis
as often as you like and know how settled the estimate is. The docs are explicit about which guarantee each
one gives.
Does this work in Cloudflare Workers, Vercel Edge, Bun, or Deno?
Yes. The core is node-free; the audit seal uses the Web Crypto API, not node:crypto. Import
@takk/bayescausal on any runtime with Web Crypto, and wire the observability adapter to
OpenTelemetry, a raw collector, or a non-human-entity loop. Only @takk/bayescausal/node requires
the Node standard library.
How does BayesCausal handle my data?
BayesCausal records the node identifiers and states you choose, the conditional probability tables, the
observed symptoms, and timestamps. It never sees your raw logs or payloads and makes no outbound network
calls of its own. With the file store, only that network state reaches disk; no secrets are involved at any
point.
What happens before any incident is labeled (cold start)?
A node starts from its prior, the uniform Dirichlet by default, so the table reflects only what you declared
until data accrues. To start from a better belief, pass an EXPERT_PRIOR or a
perNodePrior override, then let online learning fold each labeled incident into the tables with a
conjugate update.
Where does the state live?
In-process memory by default, with portable JSON snapshots via snapshot() and
load(). For durability across restarts, use createFileStore from
@takk/bayescausal/node. For an edge runtime, snapshot to your own KV store between invocations.
Is the audit trail a digital signature?
No, and the docs are explicit about it. The seal is a SHA-256 hash-chain root that proves a log was not
altered after sealing. It is an integrity seal, not a signature: it does not prove who produced the log.
Signed and timestamped seals for stronger third-party evidence are on the roadmap.
What kinds of nodes can the graph hold?
Each node is a discrete variable with a fixed set of categorical states and a conditional probability table
over its parents. Mark a node as a cause or a symptom and name its fault states, and a continuous signal is
bucketed into states you define. Continuous and hybrid distributions are on the roadmap.
How do I verify a published version's provenance?
Every release is published with npm publish --provenance. Check the attestations with
npm view @takk/bayescausal@<version> --json | jq .dist.attestations. The attestation
links the tarball you installed to the GitHub Actions workflow that built it from a specific source commit.
Can I plug in my own store backend?
Yes. Snapshot the network to portable JSON with snapshot() and restore it with
load(), persisting that JSON wherever you like, SQLite, Postgres, Redis, or a KV store. The
createFileStore file store is the zero-dependency reference for Node.
What is the policy on breaking changes?
Strict SemVer 2.0.0, starting from 1.0.0. The binding stability surface is documented in SPEC.md section
5. Major bumps require a deprecation cycle; security fixes follow the disclosure flow in SECURITY.md.