Skip to content

ENG-2166 upsertConcepts overwrites too aggressively - #1334

Draft
maparent wants to merge 2 commits into
mainfrom
eng-2166-upsertConcepts-overwrites-too-aggressively
Draft

ENG-2166 upsertConcepts overwrites too aggressively#1334
maparent wants to merge 2 commits into
mainfrom
eng-2166-upsertConcepts-overwrites-too-aggressively

Conversation

@maparent

@maparent maparent commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

@linear-code

linear-code Bot commented Aug 23, 2026

Copy link
Copy Markdown

ENG-2166

@vercel

vercel Bot commented Aug 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
discourse-graph Ready Ready Preview Aug 23, 2026 1:09pm

Request Review

@maparent
maparent marked this pull request as draft August 23, 2026 13:06
@supabase

supabase Bot commented Aug 23, 2026

Copy link
Copy Markdown

Updates to Preview Branch (eng-2166-upsertConcepts-overwrites-too-aggressively) ↗︎

Deployments Status Updated
Database Sun, 23 Aug 2026 13:06:53 UTC
Services Sun, 23 Aug 2026 13:06:53 UTC
APIs Sun, 23 Aug 2026 13:06:53 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Sun, 23 Aug 2026 13:07:02 UTC
Migrations Sun, 23 Aug 2026 13:07:08 UTC
Seeding Sun, 23 Aug 2026 13:07:08 UTC
Edge Functions Sun, 23 Aug 2026 13:07:11 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@supabase

supabase Bot commented Aug 23, 2026

Copy link
Copy Markdown

Updates to Preview Branch (eng-2166-upsertConcepts-overwrites-too-aggressively) ↗︎

Deployments Status Updated
Database 🔄 Sun, 23 Aug 2026 13:06:05 GMT
Services 🔄 Sun, 23 Aug 2026 13:06:05 GMT
APIs 🔄 Sun, 23 Aug 2026 13:06:05 GMT

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations 🔄 Sun, 23 Aug 2026 13:06:05 GMT
Migrations 🔄 Sun, 23 Aug 2026 13:06:05 GMT
Seeding 🔄 Sun, 23 Aug 2026 13:06:05 GMT
Edge Functions 🔄 Sun, 23 Aug 2026 13:06:05 GMT

Preview Branch Database Settings ↗︎.
Learn more about Supabase Branching ↗︎.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 1 additional finding in Devin Review. (Configure)

Open in Devin Review

-- epistemic_status, literal_content and reference_content are deliberately left out of
-- the defaults: absent means "leave the stored value alone" on update, and only the
-- INSERT branch falls back to a default (see the ON CONFLICT clause below).
local_concept := jsonb_populate_record(NULL::public.concept_local_input, '{"is_schema":false}');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Schema change ships without a migration

The edits to upsert_concepts live only in the declarative schema file. The documented workflow applies changes to the database through generated files in supabase/migrations/, and none was added. The new behavior never reaches the database and the new feature scenarios, which run against a migrated live database, fail.

Prompt for agents
The declarative schema file packages/database/supabase/schemas/concept.sql was changed (upsert_concepts and _local_concept_to_db_concept) but no corresponding migration was committed under packages/database/supabase/migrations/. Per packages/database/README.md, schema edits must be turned into a migration via `pnpm run dbdiff:save <name>` and committed with `git add`, otherwise the local/CI/branch databases (which apply migrations, not the schema files) will not pick up the change and the new addConcepts.feature scenarios will fail. Generate and commit the migration file for this schema change.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant