Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
📝 WalkthroughWalkthroughThis change removes all integration and cluster-level tests for the agent component, deletes the agent-specific test workflows from GitHub Actions, and updates Makefiles to dynamically set parallelism based on CPU cores. It eliminates the "agent" change detection filter and all references to the Changes
Sequence Diagram(s)No sequence diagram generated, as the changes are limited to test removals, workflow deletions, and Makefile updates. Estimated code review effort🎯 4 (Complex) | ⏱️ ~35 minutes Possibly related PRs
Suggested reviewers
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Thank you for following the naming conventions for pull request titles! 🙏 |
There was a problem hiding this comment.
Actionable comments posted: 4
♻️ Duplicate comments (1)
go/Makefile (1)
3-15: Same Bash-specific arithmetic issue as in agent Makefile
$(shell echo $$(($(GOMAXPROCS_VAL) > 1 ? $(GOMAXPROCS_VAL)/2 : 1)))depends on Bash’s ternary operator. Replace with a POSIX-portable construct to avoid failures on dash-based runners (e.g., Debian, Ubuntu).See earlier diff suggestion in apps/agent/Makefile.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (20)
.github/workflows/deploy.yaml(1 hunks).github/workflows/job_detect_changes.yaml(0 hunks).github/workflows/job_test_agent_local.yaml(0 hunks).github/workflows/pr.yaml(0 hunks).github/workflows/test_agent_local.yaml(0 hunks)apps/agent/Makefile(2 hunks)apps/agent/integration/cluster/docker/ratelimits_test.go(0 hunks)apps/agent/integration/identities/identities_ratelimits_accuracy_test.go(0 hunks)apps/agent/integration/identities/ratelimits_with_cost_load_test.go(0 hunks)apps/agent/integration/identities/token_ratelimits_test.go(0 hunks)apps/agent/integration/identities/update_identity_with_many_keys_test.go(0 hunks)apps/agent/integration/keys/ratelimits_test.go(0 hunks)apps/agent/integration/keys/update_ratelimits_test.go(0 hunks)apps/agent/pkg/cluster/cluster_test.go(0 hunks)apps/agent/pkg/membership/membership_test.go(0 hunks)apps/agent/pkg/ring/ring_test.go(0 hunks)apps/agent/services/ratelimit/ratelimit_mitigation_test.go(0 hunks)apps/agent/services/ratelimit/ratelimit_replication_test.go(0 hunks)apps/agent/services/ratelimit/ratelimit_test.go(0 hunks)go/Makefile(3 hunks)
💤 Files with no reviewable changes (17)
- .github/workflows/job_test_agent_local.yaml
- .github/workflows/pr.yaml
- apps/agent/services/ratelimit/ratelimit_mitigation_test.go
- apps/agent/integration/keys/update_ratelimits_test.go
- apps/agent/pkg/ring/ring_test.go
- apps/agent/integration/keys/ratelimits_test.go
- .github/workflows/job_detect_changes.yaml
- apps/agent/pkg/membership/membership_test.go
- apps/agent/integration/identities/update_identity_with_many_keys_test.go
- apps/agent/integration/cluster/docker/ratelimits_test.go
- apps/agent/services/ratelimit/ratelimit_test.go
- apps/agent/integration/identities/token_ratelimits_test.go
- apps/agent/pkg/cluster/cluster_test.go
- .github/workflows/test_agent_local.yaml
- apps/agent/integration/identities/identities_ratelimits_accuracy_test.go
- apps/agent/services/ratelimit/ratelimit_replication_test.go
- apps/agent/integration/identities/ratelimits_with_cost_load_test.go
🧰 Additional context used
🧠 Learnings (12)
📚 Learning: applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/makefile : use `make build` ...
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/Makefile : Use `make build` to test that the binary builds.
Applied to files:
apps/agent/Makefilego/Makefile
📚 Learning: applies to go/deploy/**/makefile : global makefile should be `makefile` at the repository root....
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/**/Makefile : Global makefile should be `Makefile` at the repository root.
Applied to files:
apps/agent/Makefilego/Makefile
📚 Learning: applies to go/deploy/deploy/*/makefile : service-level makefile should be `/makefile`....
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/deploy/*/Makefile : Service-level makefile should be `<service>/Makefile`.
Applied to files:
apps/agent/Makefilego/Makefile
📚 Learning: applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/*.go : when a service's `*.g...
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/*.go : When a service's `*.go` code changes significantly, increase the patch-level version number.
Applied to files:
apps/agent/Makefilego/Makefile
📚 Learning: applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/makefile : never use `go bui...
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/Makefile : Never use `go build` for any of the `assetmanagerd`, `billaged`, `builderd`, `metald` binaries.
Applied to files:
apps/agent/Makefilego/Makefile
📚 Learning: applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/makefile : use `make install...
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/Makefile : Use `make install` to build and install the binary with systemd unit from `$SERVICE/contrib/systemd`.
Applied to files:
apps/agent/Makefilego/Makefile
📚 Learning: applies to **/*_test.go : organize go integration tests with real dependencies...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*_test.go : Organize Go integration tests with real dependencies
Applied to files:
apps/agent/Makefilego/Makefile
📚 Learning: applies to **/*.go : use aidev-* comments for complex/important code in go services...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*.go : Use AIDEV-* comments for complex/important code in Go services
Applied to files:
apps/agent/Makefilego/Makefile
📚 Learning: applies to **/*_test.go : use table-driven tests in go...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*_test.go : Use table-driven tests in Go
Applied to files:
apps/agent/Makefilego/Makefile
📚 Learning: applies to **/*.go : follow comprehensive documentation guidelines for go code as described in go/go...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*.go : Follow comprehensive documentation guidelines for Go code as described in go/GO_DOCUMENTATION_GUIDELINES.md
Applied to files:
apps/agent/Makefilego/Makefile
📚 Learning: applies to **/*.go : prefer interfaces for testability in go code...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*.go : Prefer interfaces for testability in Go code
Applied to files:
apps/agent/Makefile
📚 Learning: applies to **/doc.go : use doc.go files for go package documentation...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/doc.go : Use doc.go files for Go package documentation
Applied to files:
apps/agent/Makefile
🪛 actionlint (1.7.7)
.github/workflows/deploy.yaml
15-15: could not read reusable workflow file for "./.github/workflows/job_test_agent_local.yaml": open /home/jailuser/git/.github/workflows/job_test_agent_local.yaml: no such file or directory
(workflow-call)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Test API / API Test Local
- GitHub Check: Test Go API Local / Test
- GitHub Check: Build / Build
- GitHub Check: Test Packages / Test
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
apps/agent/Makefile (1)
23-23:tparsehard-dependency may break fresh CI runnersThe
testtarget pipesgo testJSON intotparse, but the Makefile never installs it. Add an explicitgo install github.com/mfridman/tparse@lateststep (e.g., ininstall:) or gate the pipe withcommand -v tparse.go/Makefile (1)
31-31:--force-recreatein migration loop may litter exited containersEach
docker compose run --force-recreate --rm clickhouse_migratorcreates a new one-off container; if the migration keeps failing for the first N-1 attempts, you will spawn and then remove N containers. With--rmit’s generally fine, but double-check your CI logs/quota for noise. If you only need to restart the same container, considerdocker compose up --abort-on-container-exit.
|
:bugeyes: |
chronark
left a comment
There was a problem hiding this comment.
lgtm, that one rabbit comment says ci might be broken, we'll see
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (1)
go/Makefile (1)
47-52: Previous 15 min global timeout discussion – just noting duplication
The hard-coded-timeout=15mhas already been debated and accepted as “fine” for this repo (see prior thread). No further action.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/deploy.yaml(0 hunks)apps/agent/Makefile(2 hunks)go/Makefile(2 hunks)
💤 Files with no reviewable changes (1)
- .github/workflows/deploy.yaml
🧰 Additional context used
🧠 Learnings (21)
📚 Learning: applies to go/deploy/**/makefile : global makefile should be `makefile` at the repository root....
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/**/Makefile : Global makefile should be `Makefile` at the repository root.
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/*.go : when a service's `*.g...
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/*.go : When a service's `*.go` code changes significantly, increase the patch-level version number.
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/makefile : use `make build` ...
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/Makefile : Use `make build` to test that the binary builds.
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to go/deploy/deploy/*/makefile : service-level makefile should be `/makefile`....
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/deploy/*/Makefile : Service-level makefile should be `<service>/Makefile`.
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/makefile : never use `go bui...
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/Makefile : Never use `go build` for any of the `assetmanagerd`, `billaged`, `builderd`, `metald` binaries.
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to **/*_test.go : use table-driven tests in go...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*_test.go : Use table-driven tests in Go
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to **/*.go : follow comprehensive documentation guidelines for go code as described in go/go...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*.go : Follow comprehensive documentation guidelines for Go code as described in go/GO_DOCUMENTATION_GUIDELINES.md
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to **/*.go : use aidev-* comments for complex/important code in go services...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*.go : Use AIDEV-* comments for complex/important code in Go services
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to **/*_test.go : organize go integration tests with real dependencies...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*_test.go : Organize Go integration tests with real dependencies
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to go/deploy/**/*.{go,js,ts,tsx,py,sh,md,txt,json,yaml,yml,ini,env,conf,html,css,scss,xml,c,...
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/**/*.{go,js,ts,tsx,py,sh,md,txt,json,yaml,yml,ini,env,conf,html,css,scss,xml,c,h,cpp,java,rb,rs,php,pl,sql} : Use `AIDEV-NOTE:`, `AIDEV-TODO:`, `AIDEV-BUSINESS_RULE:`, or `AIDEV-QUESTION:` (all-caps prefix) as anchor comments aimed at AI and developers.
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to **/*.go : prefer interfaces for testability in go code...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*.go : Prefer interfaces for testability in Go code
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to go/deploy/**/*.{go,js,ts,tsx,py,sh,md,txt,json,yaml,yml,ini,env,conf,html,css,scss,xml,c,...
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/**/*.{go,js,ts,tsx,py,sh,md,txt,json,yaml,yml,ini,env,conf,html,css,scss,xml,c,h,cpp,java,rb,rs,php,pl,sql} : Make sure to add relevant anchor comments whenever a file or piece of code is too complex, very important, confusing, or could have a bug.
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to go/deploy/**/*.{go,js,ts,tsx,py,sh,md,txt,json,yaml,yml,ini,env,conf,html,css,scss,xml,c,...
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/**/*.{go,js,ts,tsx,py,sh,md,txt,json,yaml,yml,ini,env,conf,html,css,scss,xml,c,h,cpp,java,rb,rs,php,pl,sql} : Do not remove `AIDEV-*`s without explicit human instruction.
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to **/*_test.go : organize go tests by http status codes...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/*_test.go : Organize Go tests by HTTP status codes
Applied to files:
go/Makefile
📚 Learning: in the go/cmd/cli/commands/deploy/ cli codebase, ogzhanolguncu prefers to allow deployment to contin...
Learnt from: ogzhanolguncu
PR: unkeyed/unkey#3564
File: go/cmd/cli/commands/deploy/deploy.go:153-158
Timestamp: 2025-07-16T09:18:45.379Z
Learning: In the go/cmd/cli/commands/deploy/ CLI codebase, ogzhanolguncu prefers to allow deployment to continue even when Docker push fails (around lines 153-158 in deploy.go) because the team is working locally and needs this behavior for local development workflows where registry access might not be available.
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: in go/cmd/cli/commands/deploy/deploy.go, the debug_delay constant is temporary code that ogzhanolgun...
Learnt from: ogzhanolguncu
PR: unkeyed/unkey#3564
File: go/cmd/cli/commands/deploy/deploy.go:14-14
Timestamp: 2025-07-15T14:47:43.718Z
Learning: In go/cmd/cli/commands/deploy/deploy.go, the DEBUG_DELAY constant is temporary code that ogzhanolguncu plans to remove in a future PR, rather than making it configurable.
Applied to files:
go/Makefile
📚 Learning: applies to go/deploy/**/*.{go,js,ts,tsx,py,sh,md,txt,json,yaml,yml,ini,env,conf,html,css,scss,xml,c,...
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/**/*.{go,js,ts,tsx,py,sh,md,txt,json,yaml,yml,ini,env,conf,html,css,scss,xml,c,h,cpp,java,rb,rs,php,pl,sql} : Update relevant anchors when modifying associated code.
Applied to files:
go/Makefile
📚 Learning: in the go/cmd/cli/commands/deploy/ directory, ogzhanolguncu prefers to keep potentially temporary fe...
Learnt from: ogzhanolguncu
PR: unkeyed/unkey#3564
File: go/cmd/cli/commands/deploy/flags.go:17-20
Timestamp: 2025-07-15T14:45:18.920Z
Learning: In the go/cmd/cli/commands/deploy/ directory, ogzhanolguncu prefers to keep potentially temporary features (like UNKEY_DOCKER_REGISTRY environment variable) undocumented in help text if they might be deleted in the future, to avoid documentation churn.
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/makefile : use `make install...
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Applies to go/deploy/deploy/{assetmanagerd,billaged,builderd,metald}/**/Makefile : Use `make install` to build and install the binary with systemd unit from `$SERVICE/contrib/systemd`.
Applied to files:
go/Makefileapps/agent/Makefile
📚 Learning: never delete anything from this file....
Learnt from: CR
PR: unkeyed/unkey#0
File: go/deploy/CLAUDE.md:0-0
Timestamp: 2025-07-21T18:05:58.236Z
Learning: Never delete anything from this file.
Applied to files:
apps/agent/Makefile
📚 Learning: applies to **/doc.go : use doc.go files for go package documentation...
Learnt from: CR
PR: unkeyed/unkey#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T07:44:39.438Z
Learning: Applies to **/doc.go : Use doc.go files for Go package documentation
Applied to files:
apps/agent/Makefile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (javascript-typescript)
Graphite Automations"Post a GIF when PR approved" took an action on this PR • (08/07/25)1 gif was posted to this PR based on Andreas Thomas's automation. |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
deployment/04-seed-workspace.sql(3 hunks)deployment/docker-compose.yaml(3 hunks)
🧰 Additional context used
🧠 Learnings (9)
📚 Learning: 2025-07-22T09:02:12.495Z
Learnt from: chronark
PR: unkeyed/unkey#3638
File: deployment/docker-compose.yaml:81-94
Timestamp: 2025-07-22T09:02:12.495Z
Learning: The docker-compose.yaml file in deployment/ is specifically for development environments, not production. Kafka and other service configurations in this file should be optimized for development convenience rather than production security/hardening.
Applied to files:
deployment/docker-compose.yaml
📚 Learning: 2025-04-22T14:43:11.724Z
Learnt from: chronark
PR: unkeyed/unkey#3161
File: go/pkg/clickhouse/schema/databases/002_ratelimits/006_ratelimits_per_day_v1.sql:1-13
Timestamp: 2025-04-22T14:43:11.724Z
Learning: In the unkey project, the SQL files in clickhouse/schema/databases represent the current production schema and shouldn't be modified directly in PRs. Schema changes require dedicated migration scripts.
Applied to files:
deployment/04-seed-workspace.sql
📚 Learning: 2025-04-08T09:34:24.576Z
Learnt from: ogzhanolguncu
PR: unkeyed/unkey#2872
File: apps/dashboard/lib/trpc/routers/ratelimit/createNamespace.ts:36-39
Timestamp: 2025-04-08T09:34:24.576Z
Learning: When querying or updating namespaces in the Unkey dashboard, always scope the operations to the current workspace using `eq(table.workspaceId, ctx.workspace.id)` to prevent cross-workspace access.
Applied to files:
deployment/04-seed-workspace.sql
📚 Learning: 2024-10-04T20:44:38.489Z
Learnt from: chronark
PR: unkeyed/unkey#2180
File: apps/dashboard/lib/constants/workspace-navigations.tsx:56-118
Timestamp: 2024-10-04T20:44:38.489Z
Learning: When typing the `workspace` parameter in functions like `createWorkspaceNavigation`, prefer importing the `Workspace` type from the database module and picking the necessary keys (e.g., `features`) instead of redefining the interface.
Applied to files:
deployment/04-seed-workspace.sql
📚 Learning: 2025-07-07T13:22:10.989Z
Learnt from: chronark
PR: unkeyed/unkey#3426
File: deployment/init-databases.sql:0-0
Timestamp: 2025-07-07T13:22:10.989Z
Learning: The database initialization script in deployment/init-databases.sql is specifically for local development environments, not production. The permissive settings (wildcard host '%' and ALL PRIVILEGES) are intentionally used for local dev convenience.
Applied to files:
deployment/04-seed-workspace.sql
📚 Learning: 2025-04-08T09:34:24.576Z
Learnt from: ogzhanolguncu
PR: unkeyed/unkey#2872
File: apps/dashboard/lib/trpc/routers/ratelimit/createNamespace.ts:36-39
Timestamp: 2025-04-08T09:34:24.576Z
Learning: In the Unkey dashboard, when making database queries involving workspaces, use `ctx.workspace.id` directly instead of fetching the workspace separately for better performance and security.
Applied to files:
deployment/04-seed-workspace.sql
📚 Learning: 2025-04-22T14:40:51.459Z
Learnt from: chronark
PR: unkeyed/unkey#3161
File: go/pkg/clickhouse/schema/databases/001_verifications/002_raw_key_verifications_v1.sql:31-33
Timestamp: 2025-04-22T14:40:51.459Z
Learning: The ClickHouse table schemas in the codebase mirror the production environment and cannot be modified directly in PRs without careful migration planning.
Applied to files:
deployment/04-seed-workspace.sql
📚 Learning: 2025-07-25T19:09:43.284Z
Learnt from: mcstepp
PR: unkeyed/unkey#3662
File: apps/dashboard/lib/trpc/routers/deployment/list.ts:11-11
Timestamp: 2025-07-25T19:09:43.284Z
Learning: In apps/dashboard/lib/trpc/routers/deployment/list.ts, the listDeployments procedure intentionally queries the versions table rather than a deployments table. The user mcstepp indicated that renaming the table would require a database migration, which was deferred for the current PR focused on UI features.
Applied to files:
deployment/04-seed-workspace.sql
📚 Learning: 2025-07-17T14:24:20.403Z
Learnt from: Flo4604
PR: unkeyed/unkey#3631
File: go/pkg/db/bulk_keyring_insert.sql.go:23-25
Timestamp: 2025-07-17T14:24:20.403Z
Learning: In go/pkg/db/bulk_keyring_insert.sql.go and similar bulk insert generated files, hardcoded zero values for fields like size_approx and size_last_updated_at are intentional and reflect the original SQL query structure, not missing parameters.
Applied to files:
deployment/04-seed-workspace.sql
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Test API / API Test Local
- GitHub Check: Build / Build
- GitHub Check: Test Go API Local / Test
- GitHub Check: Test Packages / Test
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (4)
deployment/04-seed-workspace.sql (3)
8-11: Column-list whitespace cleanup looks good
Purely cosmetic change – no functional impact.
23-35:ON DUPLICATE KEYclause is effectively a no-op & may hide real errors
workspace_idis (very likely) the primary/unique key ofquota.
Updating it to the same literal value does nothing, so:
- If the row already exists, no fields are refreshed (e.g. retention limits).
- If schema ever adds an
updated_atcolumn, this script won’t touch it.- It can mask typos in the VALUES section because the statement will
“succeed” even when nothing was actually updated.Consider updating a meaningful column (e.g.
requests_per_month) or
dropping the clause entirely to let the insert fail loudly.-) ON DUPLICATE KEY UPDATE workspace_id = 'ws_local_root'; +) ON DUPLICATE KEY UPDATE + requests_per_month = VALUES(requests_per_month), + audit_logs_retention_days = VALUES(audit_logs_retention_days), + logs_retention_days = VALUES(logs_retention_days);If
quotareally should be immutable after bootstrap, useINSERT IGNORE
instead for clearer intent.
Would you confirm the actual primary-key definition and desired idempotency semantics?
63-64: Trailing newline – OK
Keeps POSIX tools happy; no action needed.deployment/docker-compose.yaml (1)
20-27: Health-check addition is 👍Fast-fails dependent services and documents readiness criteria.

What does this PR do?
Fixes # (issue)
If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists
Type of change
How should this be tested?
Checklist
Required
pnpm buildpnpm fmtconsole.logsgit pull origin mainAppreciated
Summary by CodeRabbit
Chores
Refactor