feat: duplicate detection (#154), eligibility criteria (#157), moderation queue (#159) - #170
Open
ZacLou wants to merge 1 commit into
Open
Conversation
Core-Foundry#157), moderation queue (Core-Foundry#159) - Core-Foundry#154: Levenshtein-based title similarity + org/description overlap detection Flags potential duplicates for admin review without blocking creation - Core-Foundry#157: Structured eligibility fields (location, applicant type, project stage, team size, custom requirements) with validation and display formatting - Core-Foundry#159: Admin moderation queue with enqueue/list/approve/reject/dismiss Auto-enqueues new tasks and duplicate flags for review - Integrated into createTask: duplicate detection + auto-moderation on creation - Added API routes: GET /api/moderation, GET/POST /api/moderation/:itemId - 30+ unit tests covering all three features
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements three Third Campaign bounty issues:
Issue #154: Duplicate Grant Detection
duplicate-detection.tswith Levenshtein distance-based title similarity comparisonDuplicateMatch[]with confidence scoresIssue #157: Grant Eligibility Criteria Fields
eligibility.tswithEligibilityCriteriainterface (locations, applicantType, projectStage, teamSize, customRequirements)validateEligibility()returns field-level errorsnormalizeEligibility()applies defaults and trimsformatEligibilityForDisplay()for UI renderingIssue #159: Admin Moderation Queue
moderation-queue.tswith in-memory Map store (matches existingtask-workflow.tspattern)createTask(): new tasks auto-enqueued for review + duplicate detection runs against all existing tasksIntegration
task-workflow.tsmodified:createTask()now callsdetectDuplicates()and enqueues moderation itemsresetTaskWorkflowStore()now also resets moderation storeGET /api/moderation,GET/POST /api/moderation/[itemId]Tests
Closes #154
Closes #157
Closes #159