Skip to content

Commit 69be91c

Browse files
author
Viktor Sovietov
committed
Heal @asp stable/experimental drift in root README; workload generator proof now a two-way set equality
1 parent d91d23f commit 69be91c

3 files changed

Lines changed: 36 additions & 8 deletions

File tree

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55

66
A stratified, semiring-parameterized Datalog and its execution engine — the
77
symbolic core of a neuro-symbolic logic system. This repository is the CPU
8-
reference stack — frontend, IR, checker, interpreter, and the probabilistic
9-
(режим B) and answer-set layers — which is the stable surface. The GPU engine,
10-
knowledge compilation, and incremental provenance exist beside it as
11-
explicitly experimental surfaces (see the
8+
reference stack: frontend, IR, checker, interpreter, and the probabilistic
9+
(режим B) and answer-set layers. The **stable surface** is the deductive and
10+
probabilistic facade — Bool/Trop, `?prob`/`?grad`, `Prov`/`Prov_k`, `@terms`,
11+
loaders, the CLI and the `strata-k`/Python facades. The answer-set (`@asp`)
12+
island, the GPU engine, knowledge compilation, and incremental provenance
13+
exist beside it as **explicitly experimental** surfaces (see the
1214
[Stability section](docs/language.md#stability) and
1315
[ARCHITECTURE.md](ARCHITECTURE.md)).
1416

crates/strata-cli/tests/workloads.rs

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,18 @@ fn workloads_run_and_print_their_pinned_lines() {
6767

6868
/// The workloads README claims "committed data == the generator's output".
6969
/// This test makes that a checked fact, not a manual claim: each gen.py is
70-
/// copied to a temp dir, run there (it writes next to itself), and every file
71-
/// it produced must byte-equal the committed one.
70+
/// copied to a temp dir, run there (it writes next to itself), and the set of
71+
/// generated data files must match the committed data set **both ways** — every
72+
/// generated file byte-equals its committed twin, and no committed data file is
73+
/// left that the generator no longer produces (a stale file would otherwise
74+
/// survive silently). Non-data companions are excluded by an allowlist.
7275
#[test]
7376
fn committed_workload_data_equals_generator_output() {
77+
// Files that live in a workload dir but are not generator output.
78+
let is_companion = |name: &std::ffi::OsStr| {
79+
let n = name.to_string_lossy();
80+
n == "gen.py" || n == "README.md" || n.ends_with(".strata")
81+
};
7482
let python = "python3";
7583
if Command::new(python).arg("--version").output().is_err() {
7684
panic!("python3 is required to verify the workload generators");
@@ -90,9 +98,12 @@ fn committed_workload_data_equals_generator_output() {
9098
"gen.py for `{dir}` failed:\n{}",
9199
String::from_utf8_lossy(&out.stderr),
92100
);
101+
102+
// Generated data files (the temp dir also holds the copied gen.py).
103+
let mut generated_names: Vec<String> = Vec::new();
93104
for entry in fs::read_dir(&tmp).expect("read temp dir") {
94105
let name = entry.expect("entry").file_name();
95-
if name == "gen.py" {
106+
if is_companion(&name) {
96107
continue;
97108
}
98109
let generated = fs::read(tmp.join(&name)).expect("read generated");
@@ -104,6 +115,19 @@ fn committed_workload_data_equals_generator_output() {
104115
"committed {dir}/{name:?} differs from the generator's output — \
105116
regenerate or update gen.py",
106117
);
118+
generated_names.push(name.to_string_lossy().into_owned());
119+
}
120+
121+
// The other direction: no committed data file the generator dropped.
122+
for entry in fs::read_dir(&src_dir).expect("read workload dir") {
123+
let name = entry.expect("entry").file_name();
124+
if is_companion(&name) {
125+
continue;
126+
}
127+
assert!(
128+
generated_names.contains(&name.to_string_lossy().into_owned()),
129+
"committed {dir}/{name:?} is not produced by gen.py — a stale data file",
130+
);
107131
}
108132
let _ = fs::remove_dir_all(&tmp);
109133
}

examples/workloads/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ Data-driven, end-to-end programs — bigger than the syntax examples one level
77
up, small enough to read whole. Each directory holds a program, its TSV data,
88
and the deterministic `gen.py` that produced the data. "Committed data == the
99
script's output" is a **checked fact, not a claim**: CI re-runs each generator
10-
into a temp dir and byte-compares
10+
into a temp dir and compares the data sets **both ways** — every generated file
11+
byte-equals its committed twin, and no committed data file survives that the
12+
generator no longer produces
1113
(`committed_workload_data_equals_generator_output`).
1214

1315
Every number quoted below is **pinned in CI**

0 commit comments

Comments
 (0)