You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 423959e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(python): #368 — the ladder was blind to the dotted @references form
reference_candidates_for compared the WHOLE @references value, so a dotted
"Team.id" never matched the target entity "Team". TypeScript, C# and Java all
take the segment before the first "." (MetaReferenceIdentity.targetEntity /
ReferenceIdentity.getTargetEntity), and the dotted form is normative —
spec/metamodel/identity.json documents "Program.id".
The divergence ran in BOTH directions, confirmed by running both loaders on
identical models: Python refused a valid dotted model (zero candidates made a
declared @sourceRefField look unsatisfiable — "names no identity.reference
targeting Team. Candidates: .") and Python failed to refuse a genuinely
ambiguous dotted model that TypeScript correctly rejects (rule (e)'s
`len(candidates) <= 1` skips zero as well as one).
Python has no MetaReferenceIdentity subclass to hang the accessor on, so the
head-parse lives in relationship_references as reference_target_entity(). The
dot is searched after the last "::" so a package separator can never be
mistaken for the field separator.
derive_m2m_fields._ref_target_entity has the same blind spot (the new module
copied it) and is DELIBERATELY left alone — repairing it would change M:N
derivation behaviour, which is outside this fix. It now carries a comment
naming the gap and the one-line repair.
Nothing in the 328-fixture corpus used the dotted form, which is why this
divergence stayed green: fixtures/conformance/relationship-one-two-refs-dotted-references
is the sibling of relationship-one-two-refs-sourcerefield with dotted
@references, and all four ports run it (corpus 328 -> 329; counts updated in
docs/CONFORMANCE.md, AGENTS.md and site-payload.json). Verified it FAILS on the
pre-fix Python loader.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lfd8nat1WcSpXffd8YetiC
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ PyPI has had no product change since `0.25.0` — nothing is broken.
68
68
-**Kotlin** — `codegen-kotlin` (KotlinPoet on JVM): entity + Exposed table + Spring controller + payload + relations + filter allowlist + validator + stored-proc + output-parser generators. `integration-tests-kotlin` runs the persistence-conformance corpus through Exposed against Testcontainers Postgres.
69
69
70
70
**Cross-port conformance corpora** (every port runs the shared corpus):
71
-
- Metamodel: `fixtures/conformance/` (328 fixtures; 22 shared corpora in total — per-corpus counts + the corpus x port matrix live in `docs/CONFORMANCE.md`). TS / C# / Java / Python all green.
71
+
- Metamodel: `fixtures/conformance/` (329 fixtures; 22 shared corpora in total — per-corpus counts + the corpus x port matrix live in `docs/CONFORMANCE.md`). TS / C# / Java / Python all green.
- Persistence: `fixtures/persistence-conformance/`. **Query** scenarios run on every port (TS / C# / Java / Kotlin / Python), each provisioning its test DB by executing the committed, TS-produced `canonical/schema.postgres.sql` (Postgres only — Derby dropped for the cross-port query corpus, ADR-0015). The **migration** scenarios are exercised by **TS only** (TS owns schema migrations). **The corpus now gates WRITES, not just reads (SP-H):** an `op: roundtrip` scenario type INSERTs through each port's runtime/ORM write codec (NOT raw SQL), reads the row back, and asserts the wire-normalized value. The `AllTypes` entity (`roundtrip-all-types.yaml`) carries one field of **every** persistable `field.*` subtype — string/int/long/double/float/decimal/boolean/date/time/timestamp(+tz)/currency/enum/uuid/object — plus an **array-of-VO** `field.object @isArray @storage:jsonb` column (`labels`, written as 2-element / empty-`[]` / single-element arrays across the three rows) — so every subtype write+read (incl. the array-of-value-object jsonb codec) round-trips through every port against Testcontainers PG. (`field.byte`/`field.short`/`field.class` were cut as non-functional registration-only stubs — the matrix tracks only genuinely-supported subtypes; see `fixtures/registry-conformance/README.md` → "Per-subtype write-round-trip matrix".)
74
74
- API-contract: `fixtures/api-contract-conformance/`. TS / C# / Java / Kotlin / Python all green — each port runs **two lanes**: a hand-rolled reference server AND its **generated** API artifact booted over HTTP (the deployed controller/routes; TS+C# full-stack vs Testcontainers PG, Java/Kotlin/Python generated controller + in-memory repo behind the consumer seam). The generated fan-out found 10 real deployment bugs golden snapshots missed.
0 commit comments