• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 39956826359
94%

Build:
DEFAULT BRANCH: main
Ran 23 Oct 2026 12:57PM UTC
Jobs 12
Files 184
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Oct 2026 12:53PM UTC coverage: 92.212% (+0.2%) from 91.985%
39956826359

push

github

web-flow
fix(typegen): disambiguate embeds of opposite-direction keys and junction tables, alias embeds named like columns (#2020)

Fixes
[SDK-2359](https://linear.app/supabase/issue/SDK-2359/fixtypegen-generated-embeds-are-ambiguous-for-opposite-direction).

## Problem

Some foreign key shapes produced embeds that PostgREST could not serve:

1. **Keys in opposite directions.** With `profile.team -> team` and
`team.owner_id -> profile`, the generator only added a `!fkey` hint when
two keys pointed the same way. `Profile.teamByTeam` and
`Profile.teamViaOwnerId` both sent `select=team(*)`, which PostgREST
rejects with `PGRST201`.
2. **Embed keys named like a column.** With `badge.profile -> profile`,
`selectOnly([Badge.profile, Badge.profileByProfile.select()])` sent
`select=profile,profile(*)`. The response then carries a duplicate
`profile` key, so reading the column fails.
3. **A key next to a junction table** (found in review, and the case the
ticket names as the most common). With `badge.team -> team` and a
`team_badge` junction whose primary key covers its keys to both tables,
PostgREST sees a many-to-one and a many-to-many relationship, so the
unhinted `team(*)` is ambiguous too.

All three were reproduced against the local stack before the fix.

## Fix

- The generator counts the relationships PostgREST sees between each
pair of tables once per run. That covers foreign keys in either
direction, plus many-to-many relationships through a junction table
whose primary key covers a key to each table. A unique constraint is not
enough, which was verified on the stack. A relation carries the hint
whenever its pair has more than one relationship.
- An embed is aliased to its member name in snake case when it is hinted
(as before) or when its plain key is also the name of a column or
computed field of the table. Aliases are still kept apart from every
other key of the table.

Generated member names do not change. Embeds of the affected shapes now
resolve and come... (continued)

41 of 41 new or added lines in 1 file covered. (100.0%)

126 existing lines in 7 files now uncovered.

11449 of 12416 relevant lines covered (92.21%)

5.62 hits per line

Coverage Regressions

Lines Coverage ∆ File
70
92.66
0.0% packages/supabase_typegen/lib/src/dart_generator.dart
16
85.88
0.08% packages/supabase/lib/src/supabase_stream_builder.dart
16
91.15
0.0% packages/supabase_auth/lib/src/auth_client.dart
14
61.9
0.37% packages/postgrest/lib/src/types.dart
4
96.44
-0.84% packages/supabase_storage/lib/src/types.dart
4
92.59
1.48% packages/supabase_auth/lib/src/types/auth_exception.dart
2
66.67
-33.33% packages/supabase_realtime/lib/src/realtime_exception.dart
Jobs
ID Job ID Ran Files Coverage
2 supabase_storage - 39956826359.2 23 Oct 2026 12:59PM UTC 10
96.51
GitHub Action Run
3 supabase_test - 39956826359.3 23 Oct 2026 12:57PM UTC 9
92.31
GitHub Action Run
4 supabase_functions - 39956826359.4 23 Oct 2026 12:57PM UTC 4
93.44
GitHub Action Run
5 supabase_realtime - 39956826359.5 23 Oct 2026 12:59PM UTC 14
91.04
GitHub Action Run
6 supabase - 39956826359.6 23 Oct 2026 12:59PM UTC 20
93.84
GitHub Action Run
7 supabase_flutter - 39956826359.7 23 Oct 2026 12:57PM UTC 16
80.52
GitHub Action Run
8 yet_another_json_isolate - 39956826359.8 23 Oct 2026 12:57PM UTC 1
98.68
GitHub Action Run
9 supabase_auth - 39956826359.9 23 Oct 2026 01:00PM UTC 34
93.47
GitHub Action Run
10 postgrest - 39956826359.10 23 Oct 2026 01:00PM UTC 28
92.5
GitHub Action Run
11 iceberg - 39956826359.11 23 Oct 2026 12:57PM UTC 6
77.18
GitHub Action Run
12 supabase_common - 39956826359.12 23 Oct 2026 12:57PM UTC 36
94.12
GitHub Action Run
9 supabase_typegen - 39956578220.9 23 Oct 2026 12:54PM UTC 6
94.38
GitHub Action Run
Source Files on build 39956826359
  • Tree
  • List 184
  • Changed 10
  • Source Changed 10
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39956826359
  • 587a2535 on github
  • Prev Build on main (#39956578220)
  • Next Build on main (#39958731293)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc