You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contributor/ci-cd.mdx
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,7 @@ Coolify handles PR previews:
117
117
|`ci-docker-build.yml`| Called by cicd.yml | Docker image builds per component |
118
118
|`ci-security-scan.yml`| Called by cicd.yml | Dependency scanning (Trivy), secret detection |
119
119
|`ci-profile.yml`| Weekly, manual | Profiles server integration tests and Spring contexts |
120
+
|`ci-server-clean-reference.yml`| Weekly, manual | Records cold server phases and compares generated JARs |
120
121
|`verify-changesets.yml`| PRs | Fails shipped-code PRs that carry no changeset |
121
122
|`ci-compose-validate.yml`| PRs, push to main | Renders the reference and self-host compose stacks so an interpolation or merge break is a red check, not a stranger's bad first boot |
122
123
|`version-pr.yml`| Push to main | Maintains the accumulating Version PR (changesets) |
@@ -220,6 +221,11 @@ resource usage, JUnit results, and Spring context-cache metrics. It signals only
220
221
consecutive regressions against five earlier default-branch profiles. Branch dispatches produce
221
222
standalone diagnostic artifacts without changing or enforcing that baseline.
222
223
224
+
The weekly **Server Phase Reference** workflow records cache-disabled Maven generation, compilation,
225
+
test-compilation, and execution profiles and compares two clean generated-client JARs. GitHub Actions
226
+
step durations remain the source for toolchain setup and artifact-upload time; Maven Profiler covers
227
+
only work inside Maven.
228
+
223
229
`SpringTestContextArchitectureTest` separately enforces the reviewed Spring context keys. Run the
224
230
profile options locally with:
225
231
@@ -235,7 +241,7 @@ mkdir -p ci-metrics
235
241
236
242
Before pushing, run the same checks that CI runs:
237
243
238
-
### Quick Check (Recommended)
244
+
### Full Local Check (Recommended)
239
245
240
246
```bash
241
247
# Format and check all services
@@ -253,7 +259,7 @@ pnpm run test:webapp # Unit tests
253
259
254
260
# Application Server (Java) — includes the integration.core.webhook receiver
255
261
pnpm run format:java:check # Check formatting
256
-
cd server && ./mvnw test# Unit tests, including required reactor dependencies
262
+
cd server && ./mvnw test# Unit tests, including required reactor dependencies
257
263
258
264
# Agent runtime (Bun) — the Pi runner and the practice precompute scripts
Unit tests extend `BaseUnitTest`; Spring-backed tests extend `BaseIntegrationTest` or a
30
+
feature-specific subclass.
36
31
37
32
:::warning Naming matters
38
33
Use `*Test.java` for unit tests and `*IntegrationTest.java` for integration tests. Maven's surefire and failsafe plugins use these patterns.
39
34
:::
40
35
41
-
## Why testing?
42
-
43
-
Tests catch regressions before they hit production, document expected behaviour, and unlock safe refactors. Our setup keeps the feedback loop fast – unit tests finish in under a second, while the shared Testcontainers environment limits the cost of integration suites.
44
-
45
36
## Unit tests
46
37
47
38
- Extend `BaseUnitTest` for isolated component tests.
48
39
- Use Mockito (`@Mock`, `@InjectMocks`) for dependencies.
49
-
- Expect sub-second runtime – no Spring context is loaded.
50
-
51
-
```java
52
-
classUserServiceTestextendsBaseUnitTest {
53
-
@MockprivateUserRepository repository;
54
-
@InjectMocksprivateUserService service;
55
-
56
-
@Test
57
-
@DisplayName("Should validate email format")
58
-
voidshouldValidateEmailFormat() {
59
-
// Fast isolated test
60
-
}
61
-
}
62
-
```
40
+
- Keep unit tests independent of Spring contexts and Testcontainers.
63
41
64
42
## Integration tests
65
43
@@ -137,7 +115,7 @@ The `hephaestus.tenancy.enforcement: throw` setting in `application-test.yml` fa
137
115
138
116
## Webhook fixtures and tooling
139
117
140
-
Reusable webhook JSON lives in `src/test/resources/github`, named after the event it records. Load one with a `ClassPathResource`, or extract new samples with:
118
+
Reusable webhook JSON lives in `server/application/src/test/resources/github`, named after the event it records. Load one with a `ClassPathResource`, or extract new samples with:
141
119
142
120
```bash
143
121
pnpm run nats:extract-examples
@@ -182,7 +160,7 @@ Each annotation pins JUnit to `Execution(SAME_THREAD)` so two live tests in the
182
160
### Authoring a new live test
183
161
184
162
1. Pick the right meta-annotation. If the env var doesn't exist yet, add a new annotation alongside the existing four — don't reuse one with a misleading name.
185
-
2. Put the test under `src/test/java/.../live/`. The directory marker keeps live and non-live tests in different code-review buckets.
163
+
2. Put the test under `server/application/src/test/java/.../live/`. The directory marker keeps live and non-live tests in different code-review buckets.
186
164
3. Read credentials from `LiveLlmCredentials.fromEnv()` (or the GitHub helpers); never inline values. Secrets stay in env vars only.
187
165
4. Per-test wall-clock timeouts: 90s is reasonable for a single mentor turn; 5 minutes for a full practice run.
Copy file name to clipboardExpand all lines: docs/decisions/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,5 +70,6 @@ do, its home is the Admin Guide (`docs/admin/`) and the runbook links to it.
70
70
|[0029](0029-measurement-intervention-seam-and-channel-levels.md)| Measurement and intervention are separate turns; a channel names where feedback lands, and its level follows | Accepted |
71
71
|[0030](0030-agent-runtime-is-typescript-on-bun.md)| The agent runtime is TypeScript on Bun, with no Node in the sandbox | Accepted |
72
72
|[0031](0031-agent-image-follows-the-deployments-own-tag.md)| The agent image reference follows the deployment's own image tag | Accepted |
73
+
|[0032](0032-generated-clients-build-boundary.md)| Generated clients are a Maven build boundary | Accepted |
0 commit comments