Four Datasets

PARTIAL

noetl/catalog does not store rows in ehdb's d7_catalog dataset. It appends to four datasets of its own. At git 473b2d5 their names are constants in crates/catalog-store/src/datasets.rs:

ConstantDataset idForward keyWhat a forward read returns
c1c1_catalog_entitypathThe versions of that path
c2c2_catalog_relationfrom_pathEdges leaving that path
c3c3_catalog_attributepathAttributes on that path
c4c4_catalog_typenameThat resource type

The crate comment says four logs exist because the partition key differs: entity and attribute reads are by path, and "what references X" would be a full scan of a path-keyed log. The README states the same split as an invariant named AC3: adding a resource type adds rows, not a fifth dataset.

d7_catalog is already an ehdb dataset

The catalog comment says ehdb's d1–d10 names are taken, including d7_catalog, so this crate implements Dataset downstream and uses the c prefix. That comment matches the exports more closely than it matches ehdb's own header.

At ehdb v0.4.5 (commit 688924f, the tag in the catalog's Cargo.toml):

  • crates/ehdb-l0/src/registry.rs implements Dataset for d7_catalog. The file header calls it the playbook, tool and resource registry, one CatalogOp per register or deregister, folded by taking the last op for a path.
  • crates/ehdb-l0/src/lib.rs exports dataset ids D1 through D10.
  • The same lib.rs header still says "Still OUT (later work): the D3…D10 dataset impls".

The same registry.rs is present at ehdb v0.15.1, the tag Chapter 13 describes, and it still defines DATASET_D7_CATALOG. Chapter 13 does not describe that dataset. This outline did not audit the rest of v0.15.1's d1–d10 list, and it does not edit Chapter 13.

So at the pin the catalog builds against, ehdb already has a catalog dataset with a different shape (CatalogKind of playbook, tool or resource; content as a string; a deleted flag). noetl/catalog's four logs sit beside that dataset. They are not a documented replacement for it in either repository's README.

Reverse rows share the four logs

A second query dimension does not add a dataset. Each reverse index is another row kind in an existing log, keyed by a prefix the README and the constants both set to the control character U+0001:

DatasetConstantSynthetic key
c1TYPE_KEY_PREFIX\u{1}type/<kind>
c2EDGE_TO_KEY_PREFIX\u{1}to/<path>
c3REVERSE_KEY_PREFIX\u{1}attr/<name>
c4TYPE_REGISTRY_KEY\u{1}alltypes

c4's sentinel is one key for every declared type name, not one key per type. The comment on TYPE_REGISTRY_KEY says a type listing that only walked the six seeded names hid any type declared later, and that the sentinel keeps the Dataset count at four.

The catalog comment cites ehdb engine.rs:1489 for the rule that read_index_after matches index_key by exact string equality. At ehdb v0.4.5 that comparison is D::index_key(...) == index_value at engine.rs:1445 and :1454, not at line 1489. The behaviour the comment relies on is in the file. The line number is stale.

The README's account of an earlier fold, which this chapter did not re-run: a planted .last() under a shared synthetic key returned 1 of 49 objects using one attribute, 0 of 48 after one of them unset it, 1 of 53 playbooks, and 1 of 40 callers of one path. The handlers and the store comments repeat the 1-of-49 and 0-of-48 pair. The README's point is that the wrong answer was a short plausible list, including an empty one, rather than an error. The fold the README describes as the fix accumulates the set. This page does not present those four ratios as a production measurement.

Two tests, two counts, and a stale wiki

catalog-model's AC3 test counts impl Dataset lines under that crate's src/ and expects 0. The message in the test still says "P1 is model-only" and that a later phase will land four datasets (crates/catalog-model/tests/adding_a_resource_type_costs_no_schema.rs).

catalog-store's AC3 test counts the same pattern under the store crate and expects 4 (ac3_dataset_count_is_fixed.rs). Its header says the model test remains true and would now pass vacuously, because the impls moved.

docs/wiki/Home.md (refresh date 2026-10-06) still says the count is 0 until that later phase. The README on the same commit says AC3 asserts exactly four. The store test is the one that matches the README. The wiki matches the model test's wording, which only covers catalog-model.

Check your understanding