-
Notifications
You must be signed in to change notification settings - Fork 725
feat: adding project-discovery-worker (CM-949) #3832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Introduces a new Temporal worker app (automatic_projects_discovery_worker) and adds initial database schema to support automatic project discovery/evaluation.
Changes:
- Added a new worker service with Temporal workflow/activity scaffolding plus a schedule that registers a cron-based Temporal Schedule.
- Added Docker and compose definitions to run the worker in the existing services stack.
- Added DB migrations for
projectCatalogandevaluatedProjectstables.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| services/apps/automatic_projects_discovery_worker/tsconfig.json | Adds TS config for the new worker package. |
| services/apps/automatic_projects_discovery_worker/src/workflows/discoverProjects.ts | Introduces a placeholder Temporal workflow that calls a logging activity. |
| services/apps/automatic_projects_discovery_worker/src/workflows.ts | Exports the worker’s workflows for registration. |
| services/apps/automatic_projects_discovery_worker/src/schedules/scheduleProjectsDiscovery.ts | Registers a Temporal Schedule to trigger the workflow on a cron. |
| services/apps/automatic_projects_discovery_worker/src/main.ts | Worker bootstrap: init, schedule registration, start. |
| services/apps/automatic_projects_discovery_worker/src/activities/activities.ts | Placeholder activity implementation (logs a run). |
| services/apps/automatic_projects_discovery_worker/src/activities.ts | Barrel export for activities registration. |
| services/apps/automatic_projects_discovery_worker/package.json | Adds the new worker package and scripts. |
| scripts/services/docker/Dockerfile.automatic_projects_discovery_worker | Adds container build/run definition for the worker. |
| scripts/services/automatic-projects-discovery-worker.yaml | Adds docker-compose definitions for running the worker (prod + dev). |
| scripts/builders/automatic-projects-discovery-worker.env | Adds builder configuration for publishing/building the worker image. |
| pnpm-lock.yaml | Adds lockfile entries for the new workspace package (but currently includes an extra incorrect importer). |
| backend/src/database/migrations/V1770653666__add-automatic_projects_discovery-tables.sql | Adds tables/indexes for project discovery catalog + evaluations. |
| backend/src/database/migrations/U1770653666__add-automatic_projects_discovery-tables.sql | Adds down migration to drop the tables/indexes. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| version: 3.3.3 | ||
|
|
||
| services/apps/automatic_project_discovery_worker: | ||
| dependencies: | ||
| '@crowd/archetype-standard': | ||
| specifier: workspace:* | ||
| version: link:../../archetypes/standard | ||
| '@crowd/archetype-worker': | ||
| specifier: workspace:* | ||
| version: link:../../archetypes/worker | ||
| '@crowd/common': | ||
| specifier: workspace:* | ||
| version: link:../../libs/common | ||
| '@crowd/common_services': | ||
| specifier: workspace:* | ||
| version: link:../../libs/common_services | ||
| '@crowd/data-access-layer': | ||
| specifier: workspace:* | ||
| version: link:../../libs/data-access-layer | ||
| '@crowd/logging': | ||
| specifier: workspace:* | ||
| version: link:../../libs/logging | ||
| '@crowd/redis': | ||
| specifier: workspace:* | ||
| version: link:../../libs/redis | ||
| '@crowd/temporal': | ||
| specifier: workspace:* | ||
| version: link:../../libs/temporal | ||
| '@crowd/types': | ||
| specifier: workspace:* | ||
| version: link:../../libs/types | ||
| '@temporalio/activity': | ||
| specifier: ~1.11.8 | ||
| version: 1.11.8 | ||
| '@temporalio/client': | ||
| specifier: ~1.11.8 | ||
| version: 1.11.8 | ||
| '@temporalio/workflow': | ||
| specifier: ~1.11.8 | ||
| version: 1.11.8 | ||
| tsx: | ||
| specifier: ^4.7.1 | ||
| version: 4.7.3 | ||
| typescript: | ||
| specifier: ^5.6.3 | ||
| version: 5.6.3 | ||
| devDependencies: | ||
| '@types/node': | ||
| specifier: ^20.8.2 | ||
| version: 20.12.7 | ||
| nodemon: | ||
| specifier: ^3.0.1 | ||
| version: 3.1.0 | ||
|
|
||
| services/apps/automatic_projects_discovery_worker: | ||
| dependencies: | ||
| '@crowd/archetype-standard': | ||
| specifier: workspace:* | ||
| version: link:../../archetypes/standard | ||
| '@crowd/archetype-worker': | ||
| specifier: workspace:* | ||
| version: link:../../archetypes/worker | ||
| '@crowd/common': | ||
| specifier: workspace:* | ||
| version: link:../../libs/common | ||
| '@crowd/common_services': |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm-lock.yaml contains two importers for this new app: services/apps/automatic_projects_discovery_worker (correct) and services/apps/automatic_project_discovery_worker (missing the s in projects). The latter path doesn’t exist in the repo and will leave the lockfile in an inconsistent state (pnpm will warn/error depending on settings). Please regenerate or edit the lockfile so only the correct importer remains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
| nodemon: | ||
| specifier: ^3.0.1 | ||
| version: 3.1.0 | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stale workspace importer in lockfile
Medium Severity
pnpm-lock.yaml adds an importer for services/apps/automatic_project_discovery_worker, but that workspace path is not present while the real app is services/apps/automatic_projects_discovery_worker. This leaves a stale duplicate importer in the lockfile, creating an inconsistent workspace definition that can destabilize pnpm install --frozen-lockfile behavior and dependency maintenance.


Summary
This PR introduces the basic structure for the new worker.
The implementation includes the foundational setup required to run the worker, without full business logic.
Included
Note
Medium Risk
Moderate risk due to new persistent schema (new tables/indexes) and always-on scheduled Temporal execution that could affect DB load and scheduling behavior, though current workflow logic is minimal.
Overview
Introduces a new
automatic_projects_discovery_workerservice that boots a Temporal worker and registers a cron-based schedule (CROWD_AUTOMATIC_PROJECTS_DISCOVERY_CRON, default daily 2am) to run a placeholderdiscoverProjectsworkflow.Adds database migrations to create/drop
projectCatalogandevaluatedProjectstables (with indexes and a FK cascade) for storing discovered project candidates and their evaluation/onboarding metadata, and includes new Docker/compose build artifacts pluspnpm-lock.yamlupdates for the new workspace app.Written by Cursor Bugbot for commit e34bf9e. This will update automatically on new commits. Configure here.