Onboard repository to Copilot cloud agent#30
Draft
Copilot wants to merge 1 commit into
Draft
Conversation
Agent-Logs-Url: https://github.com/RadValentin/taste-mender/sessions/ec8df1a3-e55a-4eb1-8424-c329a67e4abc Co-authored-by: RadValentin <3300066+RadValentin@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
RadValentin
May 26, 2026 10:20
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial onboarding assets so the Copilot cloud agent can understand the repo structure/conventions and pre-warm a runnable dev/test environment (PostgreSQL + Python + Node) on first contact.
Changes:
- Add
.github/copilot-instructions.mdwith architecture notes, env vars, commands, and testing/endpoint conventions. - Add
.github/workflows/copilot-setup-steps.ymlto provision Postgres, install backend/frontend deps, enablepg_trgm, and run migrations.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/copilot-instructions.md | Adds a repo-specific reference for architecture, env vars, commands, and conventions for agent sessions. |
| .github/workflows/copilot-setup-steps.yml | Adds a GitHub Actions workflow to pre-install dependencies and prepare Postgres/migrations for quick agent test runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **Not committed to git.** Required for `/api/v1/recommend/` and `/api/v1/tracks/<mbid>/features/` endpoints. | ||
| - Loaded once as a singleton (`FeatureStore` in `recommend_api/services/recommender.py`) using `mmap_mode="r"` for efficiency. | ||
| - Contains: `feature_matrix`, `feature_matrix_raw` (debug only), `feature_names`, `mbids` (V16 UUID bytes), `years`, `genre_dortmund`, `genre_rosamerica`. | ||
| - If the file is missing at startup, the service logs a warning and raises `FileNotFoundError` on the first recommendation request (returns HTTP 503). |
|
|
||
| ### Database | ||
| - PostgreSQL 17 with the `pg_trgm` extension (required for `GinIndex`/`GistIndex` trigram search on track/artist/album names). | ||
| - Full-text search uses Django's `SearchVectorField` (populated during ingest and updated via `update search_vector` on track create). |
| DJANGO_DEBUG=True | ||
| ``` | ||
|
|
||
| CI uses a `postgres:17` service container. The `django` user must have `CREATEDB` permission for Django's test DB creation. |
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.
Adds the two files needed to make the Copilot cloud agent productive on first contact with this repo.
.github/copilot-instructions.mdComprehensive reference the agent reads before every session:
FeatureStoresingleton (features_and_index.npznot in git, mocked in tests), PostgreSQLpg_trgmrequirement, URL/serializer conventionsYOUTUBE_API_KEYis exempt duringmanage.py test)coverage run manage.py test, min 80%), frontend (npm run build/lint), migrationsAPITestCase+factory_boy, mock targets (rec.recommend,FeatureStore),reset_sequenceintearDownClass@extend_schema.npz, missingpg_trgmextension,FeatureStorereinitialization error, missingYOUTUBE_API_KEY.github/workflows/copilot-setup-steps.ymlPre-warms the agent's environment so it can run tests immediately without trial-and-error dependency discovery:
postgres:17service container with health checkrequirements-test.txt(pip-cached)CREATE EXTENSION IF NOT EXISTS pg_trgmviapsqlpython manage.py migratenpm ciinfrontend/(npm-cached)