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 e751ae6
Browse filesBrowse the repository at this point in the historyBrowse files
Staff review of the Python TPH lanes surfaced findings the conformance corpus structurally can't
catch. Fixes:
- (HIGH) ObjectManager.update no longer unconditionally raises on a TPH cross-subtype no-match — it
now mirrors TS WriteOpts.ifMissing: default "ignore" → None (REST route renders 404), opt-in
"throw" → raise. The persistence query-DSL runner passes if_missing="throw" so its `expect-error`
op is satisfied (parity with the TS runner's ifMissing:"throw"); routes/default get None→404. This
removes the divergence where a production cross-subtype PATCH would have 500'd instead of 404'd, and
makes the no-op-after-strip path consistent with the same not-found policy.
- (HIGH) entity-model now emits the TPH discriminator PIN on each concrete subtype
(`type: Literal["Bridge"] = "Bridge"`) — the type-layer parity with TS z.literal / C#. The base's
discriminated-UNION alias is intentionally deferred (documented): Python's runtime is dict-based, the
union isn't consumed by the generated routes/ObjectManager, and emitting it would force a
base↔subtype circular import for an unused artifact.
- (HIGH) new tests/codegen/test_tph_codegen.py golden-gates the TPH codegen output (plan detection,
subtype Literal pin, subtype-emits-no-router, base polymorphic+per-subtype routes with route
ordering, base allowlist union) — the codegen coverage the integration lane didn't provide.
- (MED) filter-allowlist for a TPH base now folds in subtype-only filterable columns, so per-subtype
(and polymorphic) routes can filter on a subtype column. Non-TPH output unchanged.
- (NIT) per-subtype route handler names use the URL segment (list_auths_bridge), matching the route.
Verified together: 33/33 (6 codegen drift + 4 api-contract + 23 persistence); full codegen + non-TPH
generated lanes regression 220 green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments