Skip to content

test(orchestration): count the store statements a wide catalog listing issues - #1355

Closed
kvlonge wants to merge 4 commits into
mainfrom
test/catalog-statement-count
Closed

kvlonge wants to merge 4 commits into
mainfrom
test/catalog-statement-count

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Why

The wide catalog listing guard compares listing times for 1,000 and 3,000 nodes. A time ratio cannot see one store round trip per node, because that cost is linear: with one node per statement the ratio stayed near 3 and the guard passed. Batching needs a deterministic check.

Changes

  • Test builds count every store statement a task issues (query bumps a task-local counter; compiled only under cfg(test)).
  • The wide listing test lists once more inside a counting scope and asserts at most one statement per 100 nodes plus 8 fixed statements, at 1,000 and 3,000 nodes, on SQLite and PostgreSQL.
  • The time-ratio check stays and is renamed and reworded to guard super-linear growth only.

Verification

  • cargo test -p sqlbuild-orchestration --lib api::tests::test_catalog_reads passes on SQLite and PostgreSQL: 17 statements for 1,000 nodes and 37 for 3,000 (bounds 18 and 38).
  • With NODES_PER_STATEMENT = 1 the test fails with 1,008 statements for 1,000 nodes.
  • make check-ci and cargo clippy -p sqlbuild-orchestration --all-targets -D warnings pass locally.

DuckShop: not applicable; this is a store test guard with no project shape, data value or lifecycle sequence.

…g issues

A same-run time ratio cannot see one store round trip per node: that cost is
linear. Tests now count the statements each task issues, and the wide listing
must read builds 100 nodes per statement: 17 statements for 1,000 nodes and 37
for 3,000 on SQLite and PostgreSQL, 1,008 with one node per statement. The
ratio check stays and now guards super-linear growth only.
@kvlonge
kvlonge enabled auto-merge (squash) November 7, 2026 20:05

kvlonge commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Folded into the single combined sqlbuild PR (D625/D626), which the SQLBuild lane is assembling now and opens once #1377 lands. Branch kept.

@kvlonge kvlonge closed this Nov 8, 2026
auto-merge was automatically disabled November 8, 2026 21:16

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant