Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Use `bun run check:affected` for in-session feedback; it is not the pre-push gat
| `bun run verify` | Complete local CI mirror for checks that need no live service, image build, or hosted credential |
| `bun run test:webapp` | Vitest |
| `bun run test:agents` | Agent runtime and precompute specs, on Bun |
| `cd server && ./mvnw test` | Server unit tests — see `server/AGENTS.md` for all four tiers |
| `bun run test:server:unit` | Server unit tests — see `server/AGENTS.md` for all four tiers |

Naming: `format` applies, `format:check` verifies read-only for CI, `lint` lints, `check` is the
comprehensive local quality gate. A `:webapp`, `:server` or `:agents` suffix scopes any of them; `:java`
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"check:webapp:fix": "bun run --filter webapp check:fix",
"typecheck:webapp": "bun run --filter webapp typecheck",
"test:webapp": "bun run --filter webapp test",
"test:server:unit": "cd server && ./mvnw -pl application -am test -Dsurefire.includedGroups=unit -DskipCoverage=false --batch-mode",
"test:server:architecture": "cd server && ./mvnw -pl application -am test -Parchitecture-tests --batch-mode",
"test:server:verification": "cd server && ./mvnw -pl application -am test -Parchitecture-tests -Dsurefire.includedGroups=unit,architecture -DskipCoverage=false --batch-mode",
"test:server:integration": "cd server && ./mvnw -pl application -am test -Dsurefire.includedGroups=integration -Dparallel=none --batch-mode",
"test:server:unit": "cd server && ./mvnw -pl application -am package -Dsurefire.includedGroups=unit -DskipCoverage=false --batch-mode",
"test:server:architecture": "cd server && ./mvnw -pl application -am package -Parchitecture-tests --batch-mode",
"test:server:verification": "cd server && ./mvnw -pl application -am package -Parchitecture-tests -Dsurefire.includedGroups=unit,architecture -DskipCoverage=false --batch-mode",
"test:server:integration": "cd server && ./mvnw -pl application -am package -Dsurefire.includedGroups=integration -Dparallel=none --batch-mode",
"test:server:mutation": "bun scripts/run-security-mutations.ts",
"summarize:test-results": "bun scripts/summarize-test-results.ts",
"build:webapp": "bun run --filter webapp build",
Expand Down
24 changes: 12 additions & 12 deletions server/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ the Postgres container. For plain terminals: `bun run dev:server` and `bun run d
Each of these can leave you with the wrong result.

- **Use the reactor.** `server/generated-clients` owns every GraphQL and Outline generator and
`server/application` consumes its JAR. From `server/`, `./mvnw test` runs the default unit suite;
use it after a fresh checkout or generated-client input change. For the repeated application-edit
loop, use `./mvnw -f application/pom.xml test` (and `-Dtest=ClassName` to focus a test) so Maven does
not restore the generated module and invalidate application incremental compilation.
`server/application` consumes its JAR. From the repository root, use
`bun run test:server:unit` after a fresh checkout or generated-client input change. For the repeated
application-edit loop, use `./mvnw -f application/pom.xml test` from `server/` (and
`-Dtest=ClassName` to focus a test) so Maven does not restore the generated module and invalidate
application incremental compilation.
- **`-Dgroups=architecture` silently runs the unit suite instead.** `pom.xml` sets Surefire's `<groups>`
to `${surefire.includedGroups}`, and a POM element beats the `-Dgroups` user property — so the flag is
discarded and the default (`unit`) runs. The tag is selected by profile, never by `-Dgroups`:
`./mvnw test -Parchitecture-tests`. CI is unaffected; it passes `-Dsurefire.includedGroups`,
which is the property the POM actually reads.
discarded and the default (`unit`) runs. Use `bun run test:server:architecture`; CI passes the
`${surefire.includedGroups}` property that the POM reads.
- **`clean` does not guarantee a cold build.** It removes workspace outputs, but Maven Build Cache can
restore them. The repository enables the cache for `generated-clients`; Maven logs `Found cached
build` on a hit. Pass `-Dmaven.build.cache.enabled=false` when measuring a cold build. Schema,
Expand Down Expand Up @@ -80,16 +80,16 @@ excluded. Every new package needs a `package-info.java` containing
`NullAway` suppressions. Use `@Nullable` only for genuine absence and place it on the precise type:
`List<@Nullable String>` permits null elements; `String @Nullable []` permits a null array reference.
Fix violations at the contract or implementation boundary. In tests, refine a nullable result once
before using it rather than adding duplicate assertions. Run `./mvnw test` after changing a
nullness contract.
before using it rather than adding duplicate assertions. Run `bun run test:server:unit` after changing
a nullness contract.

## Test tiers

| Tag | Runs | Command |
|---|---|---|
| `unit` | no Spring context | `./mvnw test` |
| `architecture` | ArchUnit + Modulith verification | `./mvnw test -Parchitecture-tests` |
| `integration` | unit tests, then full context + Testcontainers | `./mvnw verify` |
| `unit` | no Spring context | `bun run test:server:unit` |
| `architecture` | ArchUnit + Modulith verification | `bun run test:server:architecture` |
| `integration` | full context + Testcontainers | `bun run test:server:integration` |
| `live` | real GitHub API | `./mvnw test -Plive-tests` |

Live tests need GitHub App credentials in `application-live-local.yml` (gitignored); the Maven profile
Expand Down
Loading