Commit 7d45e59
test(e2e): nested object-type name-collision case (ENT-82) — bug-reproducing (#132)
* test(e2e): add nested object-type name-collision case (ENT-82)
Reproduces the nested object-type name-collision bug end-to-end: two
indices (orders_primary, orders_secondary) define object fields `subject`
and `audit` with DIFFERENT shapes. On the current connector the bare-name
NDC object types collide in a single global map (last-writer-wins,
nondeterministic Go map order), silently dropping the fields that exist
only in the fuller definition (subject.alternateAccountIdentifier,
subject.businessSystemCode, and the audit index:false leaves); queries
selecting those fields then fail GraphQL validation.
This case is intentionally FLAKY/RED on main -- it encodes the bug. It
becomes deterministically green once the always-fully-qualified fix (#123)
lands, at which point the pending goldens are regenerated (UPDATE_GOLDEN=1)
to capture the fixed schema + query results.
Verified locally: red (minimal shape wins) on the pre-fix connector; green
end-to-end on a connector built from #123 -- both indices return every
selected nested field and the DDN CLI keeps the two fully-qualified object
types (orders_primary.subject vs orders_secondary.subject) distinct.
Goldens are committed as {"__pending__": true} sentinels (comparison
skipped) until #123 regenerates them.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(e2e): capture nested_collision baseline goldens (pre-fix)
Fill the pending schema + query goldens with the current (pre-fix) connector
output. These are the bare-name, buggy baseline: both indices share a single
`subject`/`audit` object type, so the snapshot reflects whichever shape won
the nondeterministic collision this run (the fuller shape here). They are
flaky on main by design; #123 makes the schema deterministic (fully-qualified)
and these goldens are regenerated to match then.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 1f81dd8 commit 7d45e59
21 files changed
Lines changed: 1297 additions & 0 deletions
File tree
- e2e/cases/nested_collision
- data
- indices
- queries
- filter_primary_by_amount
- select_primary_nested
- select_secondary_nested
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments