Commit Graph

401 Commits

Author SHA1 Message Date
03a871bc1a filter synthesis: named value types get their own synthesized, referenced filter
Supersedes the inline-structural approach (0d282cc): inlining erased the value
type's name, so identical nested shapes (weekly_hours at two paths) generated
duplicate leaf types downstream and Dart barrel exports collided. Now a named
non-table value type's filter is synthesized ONCE (like table-backed boundaries)
and property references point at it — mirroring how the entity side generates
one class per named type. Same filter-by-fields capability; laziness also
removes the structural-recursion hazard. A named type with no compilable
structure still gets no filter and is omitted rather than dangled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 20:04:16 -04:00
8aa15873b0 version: 1.0.166 1.0.166 2026-07-03 19:24:16 -04:00
0d282cc930 filter synthesis: compile named non-table value types structurally
A property typed as a named value type (a schema-only config object like
an operating-hours schedule) previously got a dangling {type}.filter
reference — no filter is ever synthesized for a non-table-backed schema,
so the whole parent filter failed downstream (PROXY_TYPE_RESOLUTION_FAILED;
the punc generator emitted an empty filter type).

Naming a value type is a reuse choice, not a semantics choice: it now
compiles structurally into the parent filter, exactly like an inline
object, recursively (including array items). Table-backed boundaries keep
the lazy {type}.filter reference. A named type with no compilable
structure is omitted instead of dangling.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 19:23:54 -04:00
581fc8e0c0 flow update 2026-07-03 01:33:00 -04:00
6f0bff8dc7 version: 1.0.165 1.0.165 2026-07-02 23:43:33 -04:00
99c69e27ab minor dict improvements and flow update 2026-07-02 23:43:23 -04:00
e490e0d844 version: 1.0.164 1.0.164 2026-06-23 20:17:35 -04:00
e026e82f65 test(jspg): rename items fixture to array and resolve unused HashMap warning
- Rename fixtures/items.json to fixtures/array.json to better reflect array testing constraints.
- Update reference paths in src/tests/fixtures.rs and across other fixture JSON files.
- Remove unused HashMap import in src/validator/rules/dict.rs to resolve the compiler warning.
2026-06-23 20:17:03 -04:00
a1fb9ef650 jspg checkpoint 2026-06-23 19:48:38 -04:00
9900b3fc43 version: 1.0.163 1.0.163 2026-06-23 17:48:11 -04:00
11d1f54bc8 Merge branch 'main' of gitea-ssh.thoughtpatterns.ai:cellular/jspg 2026-06-23 17:47:32 -04:00
b0377e076e drop error improvements across the board for localization 2026-06-23 17:47:19 -04:00
d77765cb61 jspg error refactoring checkpoint 2026-06-23 17:03:27 -04:00
10e388421d version: 1.0.162 1.0.162 2026-06-19 15:35:01 -04:00
7f666e0ece Revert "queryer: NULL-tolerant bound for optional single-family forward relations"
This reverts commit 94477b677d.
2026-06-19 15:34:24 -04:00
98a9719509 Revert "queryer: don't emit a parent type-bound for reified-relationship properties"
This reverts commit c97e5d75b3.
2026-06-19 15:34:23 -04:00
0509995589 version: 1.0.161 1.0.161 2026-06-19 11:08:52 -04:00
c97e5d75b3 queryer: don't emit a parent type-bound for reified-relationship properties
A SINGLE reified-relationship property (e.g. invoice.counterparty,
person.primary_contact — a property whose type is a relationship
subtype) is hydrated by a correlated subquery that joins the
relationship table and correlates source_id/target_id = parent.id; its
discriminators (the relationship subtype and the target's type CASE)
are constrained INSIDE that subquery.

For such a property the resolved edge is a REVERSE traversal
(forward = false) over a generic relationship FK
(fk_relationship_source_entity, destination = entity). compile_
polymorphic_bounds then took the `!edge.forward` branch with
poly_col = destination_columns[1] = "type" and
table_to_alias = "entity", which resolves to the PARENT's entity alias
— emitting a bound like `entity_1.type = 'counterparty'` into the
parent WHERE. No parent row has that type, so EVERY parent was dropped
(e.g. get_invoice returned null for an existing invoice whose
counterparty edge was absent).

Array reified traversals (contacts, occupancies) never hit this: an
array property has no bound_type_name. Only the single form did, and it
was previously unexercised.

Fix: in compile_polymorphic_bounds, skip the bound when the property's
resolved type is itself a relationship (type_def.relationship) — there
is no parent-row discriminator column to bound.

Test: new queryer case (person.primary_contact, type=contact) asserts
the parent WHERE has no spurious entity.type bound while the subquery
keeps its discriminator + source_id correlation. Full suite green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 11:03:13 -04:00
94477b677d queryer: NULL-tolerant bound for optional single-family forward relations
An OPTIONAL forward polymorphic relation declared via `family` (e.g.
order.counterparty / invoice.counterparty) had its auto-generated type
bound `{alias}.{disc} IN (variations)` emitted into the PARENT row's
WHERE. When the relation is absent (NULL discriminator) the parent row
was wrongly excluded — a counterparty-less order/invoice returned
nothing instead of the row with `counterparty: null`.

Fix: in `compile_polymorphic_bounds`, make the forward-FK bound
NULL-tolerant (`(… IN (…) OR …_type IS NULL)`), gated on
`!r#type.relationship`:
  - real entities get NULL-tolerance (the relation is an optional
    attribute; an absent one must not drop the row — the inner CASE
    already resolves it to NULL);
  - edge entities (`relationship == true`, e.g. `contact`) keep the
    bound EXACT, because there source_type/target_type *partition*
    typed sub-collections (phone_numbers vs email_addresses) and a NULL
    endpoint belongs to no partition.

Note: the `oneOf` path was already correct — it emits no parent bound
(resolves via CASE … ELSE NULL), so cross-family optional relations
already hydrate NULL-safely. Added a fixture case documenting that.

Tests (fixtures/queryer.json): case 15 (entity → NULL-tolerant),
cases 3/5/10 (contact edges → exact, unchanged), new case 16
(oneOf cross-family → no bound). Full suite green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 10:22:29 -04:00
fb25224d22 version: 1.0.160 1.0.160 2026-06-18 20:31:49 -04:00
01368305de fixed missing schema ids in validation results 2026-06-18 20:31:35 -04:00
9e362f2168 version: 1.0.159 1.0.159 2026-06-15 16:44:04 -04:00
9fffc7707f Merge branch 'main' of gitea-ssh.thoughtpatterns.ai:cellular/jspg 2026-06-15 16:42:13 -04:00
c5d652c6fd fixed merger ordering issue 2026-06-15 16:41:59 -04:00
d2cdd680ed insert fix checkpoint 2026-06-15 16:18:44 -04:00
6f1c0d7ee9 version: 1.0.158 1.0.158 2026-06-12 22:11:14 -04:00
25bbf2b564 merger: generate entity and changelog ids with uuid v7
Switch the two UUID generation sites in the merger from v4 to time-ordered
v7, and swap the uuid crate feature flag from v4 to v7 accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 22:11:09 -04:00
c8cc4cbde8 version: 1.0.157 1.0.157 2026-06-11 20:40:36 -04:00
5af2399e3b fixed issue with filter generation where filters or conditions are used internally 2026-06-11 20:40:27 -04:00
1d56bae9a5 version: 1.0.156 1.0.156 2026-06-11 17:37:43 -04:00
813e9ff3c2 more executor reverts 2026-06-11 17:37:34 -04:00
7e28eb2645 added kind to merge notifications, re-instated sql pattern matching 2026-06-11 17:26:07 -04:00
5133283795 checkpoint for re-enabling SQL pattern matching 2026-06-11 15:25:21 -04:00
d41209e7c1 version: 1.0.155 1.0.155 2026-06-11 12:19:31 -04:00
03c60f5156 fix: remove trigger, origin and redundant type properties from notification payload 2026-06-11 12:19:25 -04:00
1dfd53e53c version: 1.0.154 1.0.154 2026-06-05 19:12:10 -04:00
532bd8da43 fix: remove Spi subtransaction for GUC reads to avoid memory corruption under concurrent load 2026-06-05 19:12:07 -04:00
271828ebe9 version: 1.0.153 1.0.153 2026-06-05 18:56:31 -04:00
8c430d42e3 feat: propagate origin and trigger to cdc and changes 2026-06-05 18:48:46 -04:00
4cc5245336 version: 1.0.152 1.0.152 2026-06-03 10:50:28 -04:00
c71e99527d dynamic type variables now recursive 2026-06-03 10:50:15 -04:00
843891f67e version upped 2026-05-28 14:57:29 -04:00
8bb7085f76 cleaned out raits_debug_val 2026-05-28 14:56:17 -04:00
ea03584bbd re-applied fix for family in conditions 2026-05-28 14:54:57 -04:00
3736c9d8f0 version: 1.0.149 1.0.149 2026-05-21 19:04:00 -04:00
ccca9129b2 added uuid.condition to filters 2026-05-21 19:03:31 -04:00
333fc69735 version: 1.0.148 1.0.148 2026-05-21 13:26:18 -04:00
b0fc6c12ef fixed queryer issue with nested families 2026-05-21 13:26:07 -04:00
0d14162ef4 version: 1.0.147 1.0.147 2026-05-20 19:12:03 -04:00
b755bc6dbd version: 1.0.146 1.0.146 2026-05-20 19:10:39 -04:00