-
Notifications
You must be signed in to change notification settings - Fork 8
Release v0.9.2: UI Redesign, Custom LLM Providers, Resumable Reviews & Setup Automation #18
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?
Changes from all commits
42186fb
5961832
cf25453
35d06d5
f89d03e
e642bb6
8556b82
d0c2ee9
fff9b05
80de33b
92507cc
fb1ac18
09ac6bf
dfc6372
2b2df7d
cc479e3
e996a54
ff77850
0293b36
5eb8c1a
04372bc
426bda0
1b58039
825e2f1
b49a816
aa7a7d5
720bc18
6d361b5
b5361fd
fa71068
5379dfc
5174d49
1aeaab2
bc0e435
300c1c7
db8e2b6
b4a98d0
16dda1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,52 +1,31 @@ | ||
| # ────────────────────────────────────────────────────────────────────────────── | ||
| # Codra Environment Configuration Example | ||
| # Copy this file to .dev.vars for local development: cp .dev.vars.example .dev.vars | ||
| # ────────────────────────────────────────────────────────────────────────────── | ||
| # Codra local development environment example | ||
| # Copy this file to .dev.vars for local development. | ||
| # Keep real secrets only in .dev.vars or your deployment secret store. | ||
|
|
||
| # --- GitHub App Authentication --- | ||
| # Create at: https://github.com/settings/apps | ||
| APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nREPLACE_WITH_YOUR_GITHUB_APP_PRIVATE_KEY_CONTENT\n-----END RSA PRIVATE KEY-----" | ||
| GITHUB_APP_ID="REPLACE_WITH_YOUR_APP_ID" | ||
| GITHUB_APP_SLUG="REPLACE_WITH_YOUR_APP_SLUG" | ||
| GITHUB_APP_WEBHOOK_SECRET="REPLACE_WITH_YOUR_WEBHOOK_SECRET" | ||
| # --- Integration tests --- | ||
| TEST_DATABASE_URL="postgresql://user:password@localhost:5432/codra" | ||
|
|
||
| # --- Dashboard OAuth (GitHub) --- | ||
| # Use the same GitHub App's Client ID/Secret or a separate OAuth App | ||
| # --- LLM provider config encryption --- | ||
| LLM_CONFIG_ENCRYPTION_KEY="REPLACE_WITH_A_LONG_RANDOM_ENCRYPTION_KEY" | ||
|
|
||
| # --- GitHub App and OAuth --- | ||
| GITHUB_APP_WEBHOOK_SECRET="REPLACE_WITH_YOUR_WEBHOOK_SECRET" | ||
| GITHUB_APP_ID="REPLACE_WITH_YOUR_APP_ID" | ||
| GITHUB_CLIENT_ID="REPLACE_WITH_YOUR_CLIENT_ID" | ||
| GITHUB_CLIENT_SECRET="REPLACE_WITH_YOUR_CLIENT_SECRET" | ||
| AUTH_CALLBACK_URL="http://localhost:8787/auth/github/callback" | ||
|
|
||
| # --- Authorization --- | ||
| # Comma-separated list of GitHub usernames allowed to access the dashboard | ||
| DASHBOARD_ALLOWED_USERS="username1,username2" | ||
|
|
||
| # --- AI Intelligence (Gemini) --- | ||
| # Generate at: https://aistudio.google.com/app/apikey | ||
| GEMINI_API_KEY="REPLACE_WITH_YOUR_GEMINI_API_KEY" | ||
|
|
||
| # --- Database Connections --- | ||
|
|
||
| # 1. Local Development (Used by 'wrangler dev' for the HYPERDRIVE binding) | ||
| # This usually points to a local Postgres instance or a dev branch in Neon. | ||
| CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE="postgresql://user:password@localhost:5432/codra_dev" | ||
|
|
||
| # 2. Migrations (Used by 'npm run migrate') | ||
| # This script runs via Node.js and needs a direct connection to the DB you want to migrate. | ||
| DATABASE_URL="postgresql://user:password@localhost:5432/codra_dev" | ||
|
|
||
| # 3. Integration Tests (Used by 'npm run test') | ||
| # MUST be a separate database to avoid data loss during test sweeps. | ||
| TEST_DATABASE_URL="postgresql://user:password@localhost:5432/codra_test" | ||
| APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nREPLACE_WITH_YOUR_GITHUB_APP_PRIVATE_KEY_CONTENT\n-----END RSA PRIVATE KEY-----" | ||
|
|
||
| # --- Cloudflare DLQ / Queue Management (Required) --- | ||
| # Required for DLQ inspection, replay, and purge via /api/dlq | ||
| # Create or identify the DLQ queue, then set CF_DLQ_ID to that queue's ID. | ||
| # Generate token at https://dash.cloudflare.com/profile/api-tokens (Queues:Edit permission) | ||
| CF_API_TOKEN="REPLACE_WITH_CLOUDFLARE_API_TOKEN" | ||
| # --- Cloudflare API --- | ||
| # Required permissions: Queues Edit for DLQ actions, Workers AI Read for | ||
| # Cloudflare model catalog discovery. | ||
| CF_ACCOUNT_ID="REPLACE_WITH_YOUR_CLOUDFLARE_ACCOUNT_ID" | ||
| CF_DLQ_ID="REPLACE_WITH_YOUR_DLQ_QUEUE_ID" | ||
| CF_API_TOKEN="REPLACE_WITH_CLOUDFLARE_API_TOKEN" | ||
|
|
||
| # --- Application Settings --- | ||
| # --- Application URLs and mode --- | ||
| APP_URL="http://localhost:8787" | ||
| BOT_USERNAME="codra-app-dev" | ||
| AUTH_CALLBACK_URL="http://localhost:8787/auth/github/callback" | ||
| ENVIRONMENT="development" | ||
|
|
||
| # --- Database connections --- | ||
| DATABASE_URL="postgresql://user:password@localhost:5432/codra_dev" | ||
| CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE="postgresql://user:password@localhost:5432/codra_dev" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Codra test environment example. | ||
| # Copy to .env.test for local tests. These values are fake and must not be | ||
| # reused for production, staging, or any real external service. | ||
|
|
||
| GITHUB_APP_SLUG="codra-test-app" | ||
| GITHUB_APP_WEBHOOK_SECRET="fake-webhook-secret" | ||
|
|
||
| GITHUB_CLIENT_ID="fake-dashboard-client-id" | ||
| GITHUB_CLIENT_SECRET="fake-dashboard-client-secret" | ||
| AUTH_CALLBACK_URL="https://codra.test/auth/github/callback" | ||
| DASHBOARD_ALLOWED_USERS="devarshishimpi" | ||
|
|
||
| APP_URL="https://codra.test" | ||
| BOT_USERNAME="codra-test-app" | ||
| LLM_CONFIG_ENCRYPTION_KEY="fake-local-llm-config-encryption-key" | ||
|
|
||
| # Required. Must point at a disposable Postgres database because tests reset and | ||
| # write data while running. | ||
| DATABASE_URL="postgresql://postgres:postgres@127.0.0.1:5432/codra_test" | ||
| TEST_DATABASE_URL="postgresql://postgres:postgres@127.0.0.1:5432/codra_test" |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,12 +1,14 @@ | ||||||||||
| name: Code Quality | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| workflow_dispatch: | ||||||||||
| push: | ||||||||||
| branches: | ||||||||||
| - main | ||||||||||
| pull_request: | ||||||||||
| branches: | ||||||||||
| - main | ||||||||||
| types: | ||||||||||
| - opened | ||||||||||
| - synchronize | ||||||||||
| - reopened | ||||||||||
| - ready_for_review | ||||||||||
|
|
||||||||||
| concurrency: | ||||||||||
| group: ${{ github.workflow }}-${{ github.ref }} | ||||||||||
|
|
@@ -16,6 +18,31 @@ jobs: | |||||||||
| verify: | ||||||||||
| name: Verify Stability | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Since the official Postgres Docker image does not include a built-in HEALTHCHECK instruction and the provided 'options' are invalid, GitHub Actions will consider the service 'started' as soon as the container is created. This creates a race condition where the 'verify' job steps may begin executing and attempt to connect to the database before the Postgres engine has finished initializing, leading to 'connection refused' errors. |
||||||||||
| services: | ||||||||||
| postgres: | ||||||||||
| image: postgres:16 | ||||||||||
| env: | ||||||||||
| POSTGRES_USER: postgres | ||||||||||
| POSTGRES_PASSWORD: postgres | ||||||||||
| POSTGRES_DB: codra_test | ||||||||||
| ports: | ||||||||||
| - 5432:5432 | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The 'options' field in GitHub Actions services passes arguments directly to the 'docker run' command. The flags '--health-cmd', '--health-interval', '--health-timeout', and '--health-retries' are not valid arguments for 'docker run'. These flags are used in Dockerfiles or Docker Compose files, but not via the 'docker run' CLI. This configuration will likely cause the Postgres service to fail to start or result in the flags being ignored.
Suggested change
|
||||||||||
| options: >- | ||||||||||
| --health-cmd pg_isready | ||||||||||
| --health-interval 10s | ||||||||||
| --health-timeout 5s | ||||||||||
| --health-retries 5 | ||||||||||
| env: | ||||||||||
| DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/codra_test | ||||||||||
| TEST_DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/codra_test | ||||||||||
| GITHUB_APP_SLUG: codra-test-app | ||||||||||
| GITHUB_APP_WEBHOOK_SECRET: fake-webhook-secret | ||||||||||
| GITHUB_CLIENT_ID: fake-dashboard-client-id | ||||||||||
| GITHUB_CLIENT_SECRET: fake-dashboard-client-secret | ||||||||||
| AUTH_CALLBACK_URL: https://codra.test/auth/github/callback | ||||||||||
| APP_URL: https://codra.test | ||||||||||
| DASHBOARD_ALLOWED_USERS: devarshishimpi | ||||||||||
| BOT_USERNAME: codra-test-app | ||||||||||
|
|
||||||||||
| steps: | ||||||||||
| - name: Checkout repository | ||||||||||
|
|
||||||||||
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.
Several variables previously marked as required or used for configuration have been removed from the example file: 'CF_DLQ_ID', 'BOT_USERNAME', and 'GITHUB_APP_SLUG'. Specifically, the comments on lines 19-20 still mention 'DLQ actions', but 'CF_DLQ_ID' (previously described as 'Required for DLQ inspection') is missing. If these are still needed by the application, their removal from the template will hinder local development setup.