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

@@ -1,30 +1,30 @@
-- CreateTable
CREATE TABLE "FileRequirement" (
"id" TEXT NOT NULL,
"roundId" TEXT NOT NULL,
"name" TEXT NOT NULL,
"description" TEXT,
"acceptedMimeTypes" TEXT[],
"maxSizeMB" INTEGER,
"isRequired" BOOLEAN NOT NULL DEFAULT true,
"sortOrder" INTEGER NOT NULL DEFAULT 0,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "FileRequirement_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE INDEX "FileRequirement_roundId_idx" ON "FileRequirement"("roundId");
-- AddForeignKey
ALTER TABLE "FileRequirement" ADD CONSTRAINT "FileRequirement_roundId_fkey" FOREIGN KEY ("roundId") REFERENCES "Round"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AlterTable: add requirementId to ProjectFile
ALTER TABLE "ProjectFile" ADD COLUMN "requirementId" TEXT;
-- CreateIndex
CREATE INDEX "ProjectFile_requirementId_idx" ON "ProjectFile"("requirementId");
-- AddForeignKey
ALTER TABLE "ProjectFile" ADD CONSTRAINT "ProjectFile_requirementId_fkey" FOREIGN KEY ("requirementId") REFERENCES "FileRequirement"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- CreateTable
CREATE TABLE "FileRequirement" (
"id" TEXT NOT NULL,
"roundId" TEXT NOT NULL,
"name" TEXT NOT NULL,
"description" TEXT,
"acceptedMimeTypes" TEXT[],
"maxSizeMB" INTEGER,
"isRequired" BOOLEAN NOT NULL DEFAULT true,
"sortOrder" INTEGER NOT NULL DEFAULT 0,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "FileRequirement_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE INDEX "FileRequirement_roundId_idx" ON "FileRequirement"("roundId");
-- AddForeignKey
ALTER TABLE "FileRequirement" ADD CONSTRAINT "FileRequirement_roundId_fkey" FOREIGN KEY ("roundId") REFERENCES "Round"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AlterTable: add requirementId to ProjectFile
ALTER TABLE "ProjectFile" ADD COLUMN "requirementId" TEXT;
-- CreateIndex
CREATE INDEX "ProjectFile_requirementId_idx" ON "ProjectFile"("requirementId");
-- AddForeignKey
ALTER TABLE "ProjectFile" ADD CONSTRAINT "ProjectFile_requirementId_fkey" FOREIGN KEY ("requirementId") REFERENCES "FileRequirement"("id") ON DELETE SET NULL ON UPDATE CASCADE;