187 Commits

Author SHA1 Message Date
ea5770aebe added explicit lookup_fields to entity types 2026-07-17 18:42:28 -04:00
c4bf6bde58 added limit 1 to arrays treated as a single value in schemas 2026-07-16 13:43:08 -04:00
b49b216b36 fix(queryer): restrict polymorphic bounds compiler to forward edges only
Resolves a query compilation bug in JSPG where reverse/incoming polymorphic
edges (where edge.forward == false, e.g. pet ➡️ cover_attachment) mistakenly
appended the destination type constraint to the parent query's WHERE clause
(e.g., producing `entity_1.type = 'attachment'` on a pet entity query,
causing it to match 0 rows and return null).

- Modifies `compile_polymorphic_bounds` in `compiler.rs` to only compile
  type checks when `edge.forward` is true. For reverse edges, the parent's
  type check does not belong on the parent table and is already implicitly
  restricted by parent ID joins.
- Updates the `fk_attachment_attachable_entity` relation in the queryer test
  fixture to correctly model a two-column polymorphic relation, ensuring
  this code path is exercised by the unit test suite.
2026-07-14 16:02:41 -04:00
6220a0964d fixed proxy references without null option not being treated as proxies 2026-07-09 18:47:12 -04:00
942520a36a added static property constraints using const and enums and fixed formatter ON rendering 2026-07-09 14:47:39 -04:00
b4882bcb27 generator checkpoint 2026-07-09 14:27:50 -04:00
3bb7eb312a generator checkpoint 2026-07-09 14:26:45 -04:00
c18a8c1561 remove icon from sidebar 2026-07-07 12:44:49 -04:00
edd0dd4763 jspg cleanup 2026-07-07 12:42:05 -04:00
abf1d12e43 test: mock matcher understands UNION existence reads; revive dead update-path mocks
parse_and_match_mocks matched mock.type against only the first FROM table —
always 'entity' for hierarchy existence reads — so every merger update-case
mock was silently inert and those cases snapshotted the create path. Now each
UNION arm is matched independently (a mock matching any arm returns once,
mirroring UNION dedup) and the type check accepts any FROM/JOIN table.

Regenerated the five revived cases (their snapshots now show real update /
no-op replace / archive semantics) and added the two previously untestable
probe-disagreement cases: same-row dedup (updates, no error) and id-vs-lookup
conflict (TOO_MANY_LOOKUP_ROWS).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 14:05:21 -04:00
d9b4f417f6 merger existence read: UNION the id and lk-lookup probes instead of OR-ing them across the hierarchy join — the OR is un-indexable and full-scans the subtype table on every child merge (one scan per relationship-edge write; surfaced by Castleberry onboarding); each UNION arm uses its own index (pk / lk_) and dedup preserves TOO_MANY_LOOKUP_ROWS semantics
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 20:52:29 -04:00
2895f06074 page.personal is an opaque filter template (the 'mine' predicate), not a punc name — same read, scope-derived filter
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 18:27:51 -04:00
5885552192 database: page carries 'personal' (the personal-scope sibling punc) and sidebar carries 'icon' — previously stripped by the whitelist
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 18:21:30 -04:00
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
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
99c69e27ab minor dict improvements and flow update 2026-07-02 23:43:23 -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
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
01368305de fixed missing schema ids in validation results 2026-06-18 20:31:35 -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
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
5af2399e3b fixed issue with filter generation where filters or conditions are used internally 2026-06-11 20:40:27 -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
03c60f5156 fix: remove trigger, origin and redundant type properties from notification payload 2026-06-11 12:19:25 -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
8c430d42e3 feat: propagate origin and trigger to cdc and changes 2026-06-05 18:48:46 -04:00
c71e99527d dynamic type variables now recursive 2026-06-03 10:50:15 -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
ccca9129b2 added uuid.condition to filters 2026-05-21 19:03:31 -04:00
b0fc6c12ef fixed queryer issue with nested families 2026-05-21 13:26:07 -04:00
56775c8c1b added traits and include features with docs 2026-05-20 19:10:29 -04:00
9cefc225fc fixed type and page action serialization 2026-05-18 19:46:29 -04:00
86d49273bc more ordering fixes 2026-05-14 18:13:59 -04:00
5b2feb5ea7 more ordering fixes 2026-05-14 17:35:31 -04:00
6d6745d95d removed all jsonb 2026-05-14 14:48:09 -04:00
d0294eec3f last ordering fixes 2026-05-14 13:57:50 -04:00
2a8b991269 fixed ordering of all things sql 2026-05-14 05:58:38 -04:00
ce9c9baac9 fixing ordering checkpoint 2026-05-14 03:26:03 -04:00
3034406706 fixing ordering checkpoint 2026-05-14 03:21:12 -04:00
1f9b407074 final fix to org id setting in merge 2026-05-13 19:28:03 -04:00
c129864c89 fixed another org id issue with merger 2026-05-13 16:31:06 -04:00
40e08cbf09 proper test for merge fix for organization_id setting 2026-05-13 15:38:42 -04:00
c7372891d8 fixed issue with organization_id auto-setting in merge 2026-05-13 15:20:55 -04:00