Repository navigation
test: add fixed DSL shape regression suite - #410
Merged
Merged
Conversation
Pino de Candia (pinodeca)
marked this pull request as ready for review
September 30, 2026 15:47
Add 154 fixed DSL cases with explicit per-path marker counts, a Python manifest runner, and a schema-qualified SQL fixture helper. Integrate the suite into the local E2E harness and CI, test the runner and assertions, and document corpus semantics and maintenance. Keep production code and extension schemas unchanged. Co-authored-by: Prashant Chinnam <5108573+crprashant@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pino de Candia (pinodeca)
force-pushed
the
test/generated-dsl-shape-matrix
branch
from
September 30, 2026 18:35
67c4695 to
94445e1
Compare
Pino de Candia (pinodeca)
deleted the
test/generated-dsl-shape-matrix
branch
September 30, 2026 19:13
This was referenced Sep 30, 2026
Pino de Candia (pinodeca)
added a commit
that referenced
this pull request
Oct 1, 2026
Extend the fixed corpus from #410 beyond marker counts to verify data flow, exact values, and causal ordering: Preserve all 154 topology cases and add 225 causal-order edges across 88 shapes, without imposing order on concurrent siblings. Add 24 semantic cases covering named results, variable substitution, typed JSON observations, failure diagnostics, branch/loop propagation, and signal-gated verification of the df.start() variable snapshot. Add seven metamorphic pairs with multiset equality and independent ground-truth checks to prevent symmetric false passes. Extend the shared trace fixture with event ordinals and JSONB observations. Validate and render all three families through the existing E2E harness, with fail-closed assertions, df.await_instance, and updated cleanup/docs. Expectations remain committed data; no runtime generator is introduced. Test-only changes; no production API, schema, or upgrade impact. Adapt causal edges and relation designs from @crprashant's #234. Co-authored-by: Prashant Chinnam <5108573+crprashant@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a fixed, 154-case regression corpus for nested durable SQL function shapes,
adapted from Prashant Chinnam (Prashant Chinnam (@crprashant))'s work in #234 and the testing proposal
in #232. This PR does not modify #234 or its author's fork.
The corpus covers depth-2 compositions of sequences, conditionals, loops, joins,
and races, plus explicit else-branch and break-loop cases. Each case stores its
complete DSL definition and expected per-path marker counts in
tests/e2e/shapes/manifest.json.Design
No shape generator is included or required.
wrappers for setup, submission, completion checks, assertions, and cleanup.
It does not enumerate shapes, calculate expectations, or rewrite the manifest.
public.df_gen_mark(shape_id, node_path)inserts atrace row and returns its per-marker execution ordinal. Calls execute when
the worker reaches the corresponding SQL node, not during graph construction.
--include-shapesadds the corpus to theE2E selection, retaining per-case filtering, repeated runs, and PASS/FAIL
reporting. SQL wrappers live in a private temporary directory removed on exit.
fixed_matrixjob validates the corpus and tests therunner without PostgreSQL. The existing PostgreSQL test job depends on that
check and executes the corpus alongside the handwritten E2E suite.
The helper and trace table are persistent fixtures in the test database, owned
by
df_e2e_user, not extension objects. Each wrapper sets them up beforesubmission. The helper uses invoker privileges, a fixed
pg_catalogsearch path,and a schema-qualified table reference; corpus calls and trace reads are also
schema-qualified.
The README provides self-contained documentation of marker paths, the corpus
construction algorithm, fixture behavior, and maintenance.
What the tests establish
Every instance must complete successfully. The runner then compares trace-table
row counts with the explicit expectation for each path, including zero counts,
and rejects unexpected or NULL paths.
These are observable SQL side effects, not counts inferred from extension
monitoring metadata. They detect missing, duplicate, or incorrectly selected
marker work. Counter markers provide loop termination independently of the
number of markers inside a loop body.
Scope and limitations
Test infrastructure only: no production Rust, extension SQL/API, extension
version, root dependency, or upgrade-script changes.
return-value correctness.
30-second delay; this is not a scheduling guarantee under load.
Do not run two copies against one database.
and expectations require review.
Run locally
Requires Python 3.9+ with no third-party Python packages.
python3 tests/e2e/shapes/runner.py --check python3 -m unittest discover -s tests/e2e/shapes -p 'test_*.py' ./scripts/test-e2e-local.sh --include-shapes gen-Use
gen-0076instead ofgen-to select one case. Omit the filter to includethe handwritten E2E suite.
Validation
duplicate keys/IDs, preserved definitions and expectations, all 552 marker
calls, fixture setup, deterministic wrappers, output errors, and read-only
manifest handling.
ordinals, shape/path isolation, shadow-table resistance, invoker mode, and
recorded integer activity output. They skip unless a live database is
explicitly configured.
gen-0076passes through--include-shapes.cleanup verified.
checkout, with no repository history available.
git diff --checkpass.The full handwritten E2E suite, full upgrade suite, and PG18 corpus were not
run locally for this change. Required CI and human review remain merge gates.
Upgrade & Migration
The B1 supported-schema contract is unchanged. No upgrade DDL or runtime schema
detection is needed.
These tests start fresh instances; they do not exercise crash recovery or old
persisted histories. Curated predecessor-compatible shapes in #409's N-1/B1/B2
upgrade lifecycle belong in a separate PR.
Attribution
Adapted from #234 by Prashant Chinnam (@crprashant). The commit credits:
Co-authored-by: Prashant Chinnam 5108573+crprashant@users.noreply.github.com
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com