Repository navigation
Conversation
📊 Performance Benchmark Results |
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019wbaSGrGjd8na5aA1v445y
📊 Performance Benchmark Results |
Closes #683 Claude-Session: https://claude.ai/code/session_01LrdwjeGh4wKqpMwbJxywej Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
|
This is now Already on main — drop on rebase
Still wanted — keep
So: rebase onto One thing to check when you do: run the new script once against the current local database and confirm it exits 0 with no removals on a clean regeneration — main's |
|
@thinkclay are we good to merge this? |
|
Picked this up while clearing the PR queue. The guard here is worth having, but the branch has gone stale in a way that makes merging it actively harmful, so I've salvaged it into #771 rather than rebasing. Why not a rebase:
The baseline is empty on
And What #771 keeps, unchanged: It also carries the Closing in favour of #771 — nothing in it is lost except the two files above, and those would regress |
…#771) * ci(types): guard types.ts generation, and finish migration 350's move Salvages the parts of #719 that are still true. That PR has been open since 2026-09-09, its issue (#707) closed on 09-10, and `main` has moved 28 commits past its base — so most of it is now either redundant or a regression, but the guard at its centre never landed and is still the only thing standing between this repo and a repeat of #707. **Taken** `scripts/generate-supabase-types.mjs` (blink-dev's, unchanged). `supabase gen types` reports what the database in front of it contains, so pointing it at a database behind the migrations silently deletes every object added since, straight over types.ts with no diff to review. The script refuses to run when the migration list and the applied set disagree, generates in memory, and refuses to write when a table, view, enum or function would disappear — `--allow-removals` for the deliberate case, like migration 344 dropping core.application_status. `supa:generate` and the supabase project.json target now point at it. Exercised rather than assumed: with no local stack it exits 1 with "Refusing to generate: could not read the migration list", and types.ts is untouched afterwards. The CI halves come too — api-tests.yml regenerates against a fresh `supabase start` and fails on a diff, and ci.yml adds `expo install --check` for the Expo SDK skew behind #683/#689. `feedback.router.ts` moves off `.schema('logs')`. That one is mine to own: migration 350 moved `user_feedback` to `core` with `ALTER TABLE ... SET SCHEMA` and I never swept for readers. These two lines are the last ones left on main — dormant, since `trpc` is not in deploy-functions.sh's deploy list any more, but wrong. **Not taken** `packages/supabase/types.ts` — redundant. main already carries content_reports, user_blocks, user_feedback, soft_skills_ratings and profile_import_data. `table-references-exist.test.ts` — this is the conflict, and taking it would go backwards. #719 restores four BASELINE_BROKEN entries that main has since resolved properly: soft_skills_ratings and profile_import_data exist as of migration 354 (#658), core.inquiries' routes were deleted (#476), and profile_completion_nudges' route was retired. The baseline is empty on main and fails on stale entries, so merging that file would fail the very test it edits. `package.json` was applied by hand for the same reason — #719's copy predates `lint:migrations` and would have deleted both the script and its call from `lint`. Only the `supa:generate` line is changed here. Co-Authored-By: blink-dev <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]> * ci(types): compare only the schemas this repo owns The staleness check failed on its first run, and it was the check that was wrong, not types.ts. Every difference was in `storage`: + versioning_status: string + archived_at: string | null + is_delete_marker: boolean + is_versioned: boolean Supabase introspects `storage`, `auth` and `realtime` from whichever postgres-meta image the CLI pulls — v0.98.0 on that runner — so those schemas move when the platform ships, not when a migration lands. Regenerating would not have fixed it, and it would have failed again on the next image bump. A check that fails for something nobody can act on is one people learn to skip. `scripts/types-owned-schemas.mjs` slices a generated file down to `public`, `core`, `community`, `onet` and `logs` — the schemas packages/supabase/migrations is responsible for — and the workflow compares those slices instead of the whole file. Probed in both directions rather than assumed: * adding a column to `core.jobs` in a copy → detected * adding a column to `storage` in a copy → ignored It also generates to /tmp now instead of redirecting over types.ts, so a failed run no longer leaves a modified working tree behind — the previous version would have, which is an unpleasant surprise for anyone running it locally. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: blink-dev <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
Closes #707