fix(cpg): the census overlay list is layer names, not characters

One flatten too many turned "base,controlflow,typerel,callgraph,dataflowOss" into "b,a,s,e,...", and
every real build then warned that its graph lacked the dataflow layer while carrying it. The compile test
now asserts the shape on a real graph.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG
This commit is contained in:
Marius Ciepluch
2026-09-11 10:49:10 +02:00
co-authored by Claude Fable 5.1
parent 60d13d7b6e
commit c955721f92
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -56,4 +56,12 @@ def test_each_query_compiles_and_answers(name: str, tmp_path: Path) -> None:
done = subprocess.run(command, capture_output=True, text=True, timeout=900, check=False, cwd=str(tmp_path))
assert done.returncode == 0, f"{name}.sc did not run: {(done.stderr or done.stdout or '')[-500:]}"
assert extract_payload(done.stdout or "") is not None, f"{name}.sc produced no parseable payload"
payload = extract_payload(done.stdout or "")
assert payload is not None, f"{name}.sc produced no parseable payload"
if name == "census":
# The overlay list is what the backend checks for the dataflow layer. It shipped once as a list of
# CHARACTERS (`b,a,s,e,...`) -- one `flatten` too many -- and every real build warned that its graph
# lacked `dataflowOss` while carrying it. `importCpg` applies the layer here, so it must be named.
overlays = str(payload.get("overlays", "")).split(",")
assert "dataflowOss" in overlays, f"census reports overlays {overlays!r}, which is not a list of layer names"
assert str(payload.get("maxHeapMB", "")).isdigit()