Skip to content

Commit cd891db

Browse files
authored
Merge branch 'main' into bcpeinhardt/17992-fix-startup-logs-size-limit-bug
2 parents 29297d6 + 4ac6be6 commit cd891db

File tree

199 files changed

+11342
-1792
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+11342
-1792
lines changed

.claude/docs/DATABASE.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222

2323
### Helper Scripts
2424

25-
| Script | Purpose |
26-
|--------|---------|
27-
| `./coderd/database/migrations/create_migration.sh "migration name"` | Creates new migration files |
28-
| `./coderd/database/migrations/fix_migration_numbers.sh` | Renumbers migrations to avoid conflicts |
29-
| `./coderd/database/migrations/create_fixture.sh "fixture name"` | Creates test fixtures for migrations |
25+
| Script | Purpose |
26+
|---------------------------------------------------------------------|-----------------------------------------|
27+
| `./coderd/database/migrations/create_migration.sh "migration name"` | Creates new migration files |
28+
| `./coderd/database/migrations/fix_migration_numbers.sh` | Renumbers migrations to avoid conflicts |
29+
| `./coderd/database/migrations/create_fixture.sh "fixture name"` | Creates test fixtures for migrations |
3030

3131
### Database Query Organization
3232

@@ -214,6 +214,5 @@ make lint
214214
- [ ] Migration files exist (both up and down)
215215
- [ ] `make gen` run after query changes
216216
- [ ] Audit table updated for new fields
217-
- [ ] In-memory database implementations updated
218217
- [ ] Nullable fields use `sql.Null*` types
219218
- [ ] Authorization context appropriate for endpoint type

.claude/docs/OAUTH2.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ Before completing OAuth2 or authentication feature work:
151151
- [ ] Update RBAC permissions for new resources
152152
- [ ] Add audit logging support if applicable
153153
- [ ] Create database migrations with proper defaults
154-
- [ ] Update in-memory database implementations
155154
- [ ] Add comprehensive test coverage including edge cases
156155
- [ ] Verify linting compliance
157156
- [ ] Test both positive and negative scenarios

.claude/docs/TROUBLESHOOTING.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,33 @@ When facing multiple failing tests or complex integration issues:
116116

117117
### Useful Debug Commands
118118

119-
| Command | Purpose |
120-
|---------|---------|
121-
| `make lint` | Run all linters |
122-
| `make gen` | Generate mocks, database queries |
119+
| Command | Purpose |
120+
|----------------------------------------------|---------------------------------------|
121+
| `make lint` | Run all linters |
122+
| `make gen` | Generate mocks, database queries |
123123
| `go test -v ./path/to/package -run TestName` | Run specific test with verbose output |
124-
| `go test -race ./...` | Run tests with race detector |
124+
| `go test -race ./...` | Run tests with race detector |
125125

126126
### LSP Debugging
127127

128-
| Command | Purpose |
129-
|---------|---------|
130-
| `mcp__go-language-server__definition symbolName` | Find function definition |
131-
| `mcp__go-language-server__references symbolName` | Find all references |
132-
| `mcp__go-language-server__diagnostics filePath` | Check for compilation errors |
128+
#### Go LSP (Backend)
129+
130+
| Command | Purpose |
131+
|----------------------------------------------------|------------------------------|
132+
| `mcp__go-language-server__definition symbolName` | Find function definition |
133+
| `mcp__go-language-server__references symbolName` | Find all references |
134+
| `mcp__go-language-server__diagnostics filePath` | Check for compilation errors |
135+
| `mcp__go-language-server__hover filePath line col` | Get type information |
136+
137+
#### TypeScript LSP (Frontend)
138+
139+
| Command | Purpose |
140+
|----------------------------------------------------------------------------|------------------------------------|
141+
| `mcp__typescript-language-server__definition symbolName` | Find component/function definition |
142+
| `mcp__typescript-language-server__references symbolName` | Find all component/type usages |
143+
| `mcp__typescript-language-server__diagnostics filePath` | Check for TypeScript errors |
144+
| `mcp__typescript-language-server__hover filePath line col` | Get type information |
145+
| `mcp__typescript-language-server__rename_symbol filePath line col newName` | Rename across codebase |
133146

134147
## Common Error Messages
135148

@@ -197,6 +210,8 @@ When facing multiple failing tests or complex integration issues:
197210

198211
- Check existing similar implementations in codebase
199212
- Use LSP tools to understand code relationships
213+
- For Go code: Use `mcp__go-language-server__*` commands
214+
- For TypeScript/React code: Use `mcp__typescript-language-server__*` commands
200215
- Read related test files for expected behavior
201216

202217
### External Resources

.claude/docs/WORKFLOWS.md

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,11 @@
127127

128128
## Code Navigation and Investigation
129129

130-
### Using Go LSP Tools (STRONGLY RECOMMENDED)
130+
### Using LSP Tools (STRONGLY RECOMMENDED)
131131

132-
**IMPORTANT**: Always use Go LSP tools for code navigation and understanding. These tools provide accurate, real-time analysis of the codebase and should be your first choice for code investigation.
132+
**IMPORTANT**: Always use LSP tools for code navigation and understanding. These tools provide accurate, real-time analysis of the codebase and should be your first choice for code investigation.
133+
134+
#### Go LSP Tools (for backend code)
133135

134136
1. **Find function definitions** (USE THIS FREQUENTLY):
135137
- `mcp__go-language-server__definition symbolName`
@@ -145,14 +147,49 @@
145147
- `mcp__go-language-server__hover filePath line column`
146148
- Get type information and documentation at specific positions
147149

150+
#### TypeScript LSP Tools (for frontend code in site/)
151+
152+
1. **Find component/function definitions** (USE THIS FREQUENTLY):
153+
- `mcp__typescript-language-server__definition symbolName`
154+
- Example: `mcp__typescript-language-server__definition LoginPage`
155+
- Quickly navigate to React components, hooks, and utility functions
156+
157+
2. **Find symbol references** (ESSENTIAL FOR UNDERSTANDING IMPACT):
158+
- `mcp__typescript-language-server__references symbolName`
159+
- Locate all usages of components, types, or functions
160+
- Critical for refactoring React components and understanding prop usage
161+
162+
3. **Get type information**:
163+
- `mcp__typescript-language-server__hover filePath line column`
164+
- Get TypeScript type information and JSDoc documentation
165+
166+
4. **Rename symbols safely**:
167+
- `mcp__typescript-language-server__rename_symbol filePath line column newName`
168+
- Rename components, props, or functions across the entire codebase
169+
170+
5. **Check for TypeScript errors**:
171+
- `mcp__typescript-language-server__diagnostics filePath`
172+
- Get compilation errors and warnings for a specific file
173+
148174
### Investigation Strategy (LSP-First Approach)
149175

176+
#### Backend Investigation (Go)
177+
150178
1. **Start with route registration** in `coderd/coderd.go` to understand API endpoints
151-
2. **Use LSP `definition` lookup** to trace from route handlers to actual implementations
152-
3. **Use LSP `references`** to understand how functions are called throughout the codebase
179+
2. **Use Go LSP `definition` lookup** to trace from route handlers to actual implementations
180+
3. **Use Go LSP `references`** to understand how functions are called throughout the codebase
153181
4. **Follow the middleware chain** using LSP tools to understand request processing flow
154182
5. **Check test files** for expected behavior and error patterns
155183

184+
#### Frontend Investigation (TypeScript/React)
185+
186+
1. **Start with route definitions** in `site/src/App.tsx` or router configuration
187+
2. **Use TypeScript LSP `definition`** to navigate to React components and hooks
188+
3. **Use TypeScript LSP `references`** to find all component usages and prop drilling
189+
4. **Follow the component hierarchy** using LSP tools to understand data flow
190+
5. **Check for TypeScript errors** with `diagnostics` before making changes
191+
6. **Examine test files** (`.test.tsx`) for component behavior and expected props
192+
156193
## Troubleshooting Development Issues
157194

158195
### Common Issues

.coderabbit.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
3+
# CodeRabbit Configuration
4+
# This configuration disables automatic reviews entirely
5+
6+
language: "en-US"
7+
early_access: false
8+
9+
reviews:
10+
# Disable automatic reviews for new PRs, but allow incremental reviews
11+
auto_review:
12+
enabled: false # Disable automatic review of new/updated PRs
13+
drafts: false # Don't review draft PRs automatically
14+
15+
# Other review settings (only apply if manually requested)
16+
profile: "chill"
17+
request_changes_workflow: false
18+
high_level_summary: true
19+
poem: false
20+
review_status: true
21+
collapse_walkthrough: true
22+
23+
chat:
24+
auto_reply: true # Allow automatic chat replies
25+
26+
# Note: With auto_review.enabled: false, CodeRabbit will only perform initial
27+
# reviews when manually requested, but incremental reviews and chat replies remain enabled
28+

.github/.linkspector.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ ignorePatterns:
2525
- pattern: "docs.github.com"
2626
- pattern: "claude.ai"
2727
- pattern: "splunk.com"
28+
- pattern: "stackoverflow.com/questions"
2829
aliveStatusCodes:
2930
- 200

.github/workflows/ci.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
tailnet-integration: ${{ steps.filter.outputs.tailnet-integration }}
3535
steps:
3636
- name: Harden Runner
37-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
37+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
3838
with:
3939
egress-policy: audit
4040

@@ -154,7 +154,7 @@ jobs:
154154
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
155155
steps:
156156
- name: Harden Runner
157-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
157+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
158158
with:
159159
egress-policy: audit
160160

@@ -226,7 +226,7 @@ jobs:
226226
if: ${{ !cancelled() }}
227227
steps:
228228
- name: Harden Runner
229-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
229+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
230230
with:
231231
egress-policy: audit
232232

@@ -281,7 +281,7 @@ jobs:
281281
timeout-minutes: 7
282282
steps:
283283
- name: Harden Runner
284-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
284+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
285285
with:
286286
egress-policy: audit
287287

@@ -330,7 +330,7 @@ jobs:
330330
- windows-2022
331331
steps:
332332
- name: Harden Runner
333-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
333+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
334334
with:
335335
egress-policy: audit
336336

@@ -527,7 +527,7 @@ jobs:
527527
timeout-minutes: 25
528528
steps:
529529
- name: Harden Runner
530-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
530+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
531531
with:
532532
egress-policy: audit
533533

@@ -575,7 +575,7 @@ jobs:
575575
timeout-minutes: 25
576576
steps:
577577
- name: Harden Runner
578-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
578+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
579579
with:
580580
egress-policy: audit
581581

@@ -634,7 +634,7 @@ jobs:
634634
timeout-minutes: 20
635635
steps:
636636
- name: Harden Runner
637-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
637+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
638638
with:
639639
egress-policy: audit
640640

@@ -660,7 +660,7 @@ jobs:
660660
timeout-minutes: 20
661661
steps:
662662
- name: Harden Runner
663-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
663+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
664664
with:
665665
egress-policy: audit
666666

@@ -692,7 +692,7 @@ jobs:
692692
name: ${{ matrix.variant.name }}
693693
steps:
694694
- name: Harden Runner
695-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
695+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
696696
with:
697697
egress-policy: audit
698698

@@ -763,7 +763,7 @@ jobs:
763763
if: needs.changes.outputs.site == 'true' || needs.changes.outputs.ci == 'true'
764764
steps:
765765
- name: Harden Runner
766-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
766+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
767767
with:
768768
egress-policy: audit
769769

@@ -843,7 +843,7 @@ jobs:
843843

844844
steps:
845845
- name: Harden Runner
846-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
846+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
847847
with:
848848
egress-policy: audit
849849

@@ -910,7 +910,7 @@ jobs:
910910
if: always()
911911
steps:
912912
- name: Harden Runner
913-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
913+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
914914
with:
915915
egress-policy: audit
916916

@@ -1038,7 +1038,7 @@ jobs:
10381038
IMAGE: ghcr.io/coder/coder-preview:${{ steps.build-docker.outputs.tag }}
10391039
steps:
10401040
- name: Harden Runner
1041-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
1041+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
10421042
with:
10431043
egress-policy: audit
10441044

@@ -1095,14 +1095,14 @@ jobs:
10951095
# Setup GCloud for signing Windows binaries.
10961096
- name: Authenticate to Google Cloud
10971097
id: gcloud_auth
1098-
uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193 # v2.1.10
1098+
uses: google-github-actions/auth@140bb5113ffb6b65a7e9b937a81fa96cf5064462 # v2.1.11
10991099
with:
11001100
workload_identity_provider: ${{ secrets.GCP_CODE_SIGNING_WORKLOAD_ID_PROVIDER }}
11011101
service_account: ${{ secrets.GCP_CODE_SIGNING_SERVICE_ACCOUNT }}
11021102
token_format: "access_token"
11031103

11041104
- name: Setup GCloud SDK
1105-
uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4
1105+
uses: google-github-actions/setup-gcloud@6a7c903a70c8625ed6700fa299f5ddb4ca6022e9 # v2.1.5
11061106

11071107
- name: Download dylibs
11081108
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
@@ -1386,7 +1386,7 @@ jobs:
13861386
id-token: write
13871387
steps:
13881388
- name: Harden Runner
1389-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
1389+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
13901390
with:
13911391
egress-policy: audit
13921392

@@ -1396,13 +1396,13 @@ jobs:
13961396
fetch-depth: 0
13971397

13981398
- name: Authenticate to Google Cloud
1399-
uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193 # v2.1.10
1399+
uses: google-github-actions/auth@140bb5113ffb6b65a7e9b937a81fa96cf5064462 # v2.1.11
14001400
with:
14011401
workload_identity_provider: projects/573722524737/locations/global/workloadIdentityPools/github/providers/github
14021402
service_account: coder-ci@coder-dogfood.iam.gserviceaccount.com
14031403

14041404
- name: Set up Google Cloud SDK
1405-
uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4
1405+
uses: google-github-actions/setup-gcloud@6a7c903a70c8625ed6700fa299f5ddb4ca6022e9 # v2.1.5
14061406

14071407
- name: Set up Flux CLI
14081408
uses: fluxcd/flux2/action@6bf37f6a560fd84982d67f853162e4b3c2235edb # v2.6.4
@@ -1411,7 +1411,7 @@ jobs:
14111411
version: "2.5.1"
14121412

14131413
- name: Get Cluster Credentials
1414-
uses: google-github-actions/get-gke-credentials@d0cee45012069b163a631894b98904a9e6723729 # v2.3.3
1414+
uses: google-github-actions/get-gke-credentials@8e574c49425fa7efed1e74650a449bfa6a23308a # v2.3.4
14151415
with:
14161416
cluster_name: dogfood-v2
14171417
location: us-central1-a
@@ -1450,7 +1450,7 @@ jobs:
14501450
if: github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
14511451
steps:
14521452
- name: Harden Runner
1453-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
1453+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
14541454
with:
14551455
egress-policy: audit
14561456

@@ -1485,7 +1485,7 @@ jobs:
14851485
if: needs.changes.outputs.db == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
14861486
steps:
14871487
- name: Harden Runner
1488-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
1488+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
14891489
with:
14901490
egress-policy: audit
14911491

.github/workflows/docker-base.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
if: github.repository_owner == 'coder'
3939
steps:
4040
- name: Harden Runner
41-
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
41+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
4242
with:
4343
egress-policy: audit
4444

0 commit comments

Comments
 (0)