Seed all CSV entries, fix category mapping, add duplicate detection in filtering
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled

- Remove isValidEntry filter from seed: all 214 CSV rows are now seeded
  (Ignore/Doublon/test entries included for AI screening to handle)
- Fix category mapping: normalize non-breaking spaces (U+00A0) that
  caused all categories to map to null
- Add built-in duplicate submission detection in stage-filtering that
  groups projects by submitter email and always flags (never auto-rejects)
  so admin must review
- AI screening runs for duplicates even if deterministic rules fail,
  with sibling project metadata attached for admin context
- Update Candidatures2026.csv with expanded team list
- Simplify routing to award assignment (migration + schema cleanup)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 13:54:29 +01:00
parent 382570cebd
commit 882b98be19
24 changed files with 8321 additions and 7743 deletions

View File

@@ -0,0 +1,33 @@
-- Simplify RoutingMode enum: remove POST_MAIN, rename PARALLEL → SHARED
-- Drop RoutingRule table entirely
-- 1. Update existing PARALLEL values to SHARED, POST_MAIN to SHARED
UPDATE "Track" SET "routingMode" = 'PARALLEL' WHERE "routingMode" = 'POST_MAIN';
-- 2. Rename enum values using the ALTER TYPE approach
-- First rename PARALLEL → SHARED
ALTER TYPE "RoutingMode" RENAME VALUE 'PARALLEL' TO 'SHARED';
-- 3. Remove POST_MAIN from the enum
-- PostgreSQL doesn't support DROP VALUE directly, so we recreate the enum
-- Since we already converted POST_MAIN values to PARALLEL (now SHARED), this is safe
-- We need to: create new enum, update column, drop old enum
-- Actually, since we already renamed PARALLEL to SHARED and converted POST_MAIN rows,
-- we need to remove POST_MAIN. PostgreSQL 13+ doesn't support removing enum values directly.
-- We'll use the column swap approach.
-- Step A: Remove the foreign key constraint temporarily and update the column
ALTER TABLE "Track" ALTER COLUMN "routingMode" TYPE TEXT;
-- Step B: Drop the old enum
DROP TYPE "RoutingMode";
-- Step C: Create new enum without POST_MAIN
CREATE TYPE "RoutingMode" AS ENUM ('SHARED', 'EXCLUSIVE');
-- Step D: Convert column back to enum
ALTER TABLE "Track" ALTER COLUMN "routingMode" TYPE "RoutingMode" USING "routingMode"::"RoutingMode";
-- 4. Drop RoutingRule table
DROP TABLE IF EXISTS "RoutingRule";