Skip to content

Commit c46de7f

Browse files
feat(server): Java webhook runtime role; restarts no longer drop events (#1300)
1 parent 50aad0d commit c46de7f

133 files changed

Lines changed: 3335 additions & 4046 deletions

File tree

Some content is hidden

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

.claude/skills/fix-ci/SKILL.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ Before fixing anything, categorize every failure into this table.
7373
| 1 | Formatting | "Formatting failed", biome/prettier diff | `pnpm run format` |
7474
| 2 | Lint | Biome lint errors | `pnpm run check:fix` |
7575
| 3 | TypeScript | TS2xxx errors, type mismatch | Fix the type error in source |
76-
| 4 | Build failure | Compilation errors, missing exports | Fix imports/exports, verify with `pnpm run build:webhook-ingest` |
76+
| 4 | Build failure | Compilation errors, missing exports | Fix imports/exports, verify with `pnpm run build:webapp` |
7777
| 5 | Webapp tests | "FAIL" in webapp test output | Fix test or source, verify with `pnpm run test:webapp` |
7878
| 5 | App server tests | Maven test failures, assertion errors | Fix test or source, verify with `cd server && ./mvnw test -Dsurefire.includedGroups="unit" -Dmaven.test.skip=false -T 2C --batch-mode -q` |
79-
| 5 | Webhook tests | Vitest failures in webhook-ingest | Fix test or source, verify with `pnpm run test:webhook-ingest` |
8079
| 6 | OpenAPI sync | "OpenAPI out of sync" | `pnpm run generate:api` |
8180
| 6 | DB schema | "Schema drift detected" | `pnpm run db:draft-changelog` |
8281
| 6 | DB ERD | "ERD outdated" | `pnpm run db:generate-erd-docs` |
@@ -103,10 +102,6 @@ Then run tests for ALL components that had failures:
103102
# If webapp tests failed:
104103
pnpm run test:webapp
105104

106-
# If webhook-ingest tests failed:
107-
pnpm run test:webhook-ingest
108-
109-
110105
# If app-server tests failed:
111106
cd server && ./mvnw test -Dsurefire.includedGroups="unit" -Dmaven.test.skip=false -T 2C --batch-mode -q && cd ../..
112107
```

.claude/skills/land-pr/SKILL.md

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ git diff --name-only HEAD
3636
Map paths to components (mirrors CI's dorny/paths-filter config):
3737
- `webapp/**` → webapp changed
3838
- `server/**` OR `scripts/db-utils.sh` → app-server changed
39-
- `webhook-ingest/**` → webhook changed
40-
- `package.json` OR `package-lock.json` OR `.node-version` → webapp + webhook changed
39+
- `package.json` OR `package-lock.json` OR `.node-version` → webapp changed
4140
- `docs/**` → docs-only (skip all validation if nothing else changed)
4241

4342
## 3. Format
@@ -73,26 +72,10 @@ pnpm run db:draft-changelog
7372
pnpm run db:generate-erd-docs
7473
```
7574

76-
## 6. Build Affected TS Services
77-
78-
If webhook changed:
79-
80-
```bash
81-
pnpm run build:webhook-ingest
82-
```
83-
84-
Build failures catch path alias and import issues that typecheck alone misses.
85-
86-
## 7. Unit Tests for Affected Components
75+
## 6. Unit Tests for Affected Components
8776

8877
Run ONLY tests for changed components. Order: fastest first.
8978

90-
If webhook changed:
91-
92-
```bash
93-
pnpm run test:webhook-ingest
94-
```
95-
9679
If webapp changed:
9780

9881
```bash
@@ -107,7 +90,7 @@ cd server && ./mvnw test -Dsurefire.includedGroups="unit" -Dmaven.test.skip=fals
10790

10891
ALL tests must pass before proceeding.
10992

110-
## 8. OpenAPI Sync Check
93+
## 7. OpenAPI Sync Check
11194

11295
If app-server changed:
11396

@@ -118,7 +101,7 @@ git diff --quiet || echo "WARNING: OpenAPI specs were out of sync - staging chan
118101

119102
Stage any drift that was caught.
120103

121-
## 9. Final Validation Pass
104+
## 8. Final Validation Pass
122105

123106
Regeneration can produce unformatted code. Run one final pass:
124107

@@ -129,7 +112,7 @@ pnpm run check
129112

130113
Both must pass.
131114

132-
## 10. Create Branch (if on main)
115+
## 9. Create Branch (if on main)
133116

134117
```bash
135118
git branch --show-current
@@ -143,7 +126,7 @@ git checkout -b <type>/<description>
143126

144127
Types: `feat`, `fix`, `docs`, `refactor`, `test`, `ci`, `chore`
145128

146-
## 11. Commit
129+
## 10. Commit
147130

148131
```bash
149132
git add -A
@@ -156,19 +139,19 @@ git commit -m "<type>(<scope>): <description>"
156139
- Infra (no release): `ci`, `config`, `deps`, `deps-dev`, `docker`, `scripts`, `security`, `db`, `no-release`
157140
- Feature: `gitprovider`, `leaderboard`, `mentor`, `notifications`, `profile`, `teams`, `workspace`
158141

159-
## 12. Push
142+
## 11. Push
160143

161144
```bash
162145
git push -u origin HEAD
163146
```
164147

165-
## 13. Check if PR Exists
148+
## 12. Check if PR Exists
166149

167150
```bash
168151
PAGER=cat gh pr view --json number,url 2>/dev/null && echo "PR exists - skip creation" || echo "No PR - create one"
169152
```
170153

171-
## 14. Create PR (if needed)
154+
## 13. Create PR (if needed)
172155

173156
Skip if step 13 showed "PR exists".
174157

@@ -184,7 +167,7 @@ PAGER=cat gh pr create --base main \
184167
<steps to verify, or 'CI covers this'>"
185168
```
186169

187-
## 15. Verify
170+
## 14. Verify
188171

189172
```bash
190173
PAGER=cat gh pr view --json url,title -q '"PR: \(.title)\nURL: \(.url)"'

.github/CODEOWNERS

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ renovate.json @ls1intum/hephaestus-maintainers
1212
# Application Server (Java/Spring)
1313
server/ @ls1intum/hephaestus-maintainers
1414

15-
# Webhook Ingest (TypeScript/Hono)
16-
webhook-ingest/ @ls1intum/hephaestus-maintainers
17-
1815
# Webapp (React/TypeScript)
1916
webapp/ @ls1intum/hephaestus-maintainers
2017

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ body:
4848
options:
4949
- Webapp (React UI)
5050
- Application Server (Java/Spring, includes Pi mentor agent)
51-
- Webhook Ingest
51+
- Webhook Server (inbound webhook receiver)
5252
- Don't know
5353
validations:
5454
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ TITLE FORMAT (required):
33
<type>(<scope>): <description>
44
55
Types: feat | fix | docs | refactor | test | ci | perf | revert
6-
Scopes (Service): webapp | server | ai | webhooks | docs
6+
Scopes (Service): webapp | server | ai | docs
77
Scopes (Infra - NO RELEASE): ci | config | deps | deps-dev | docker | scripts | security | db | no-release
88
Scopes (Feature): gitprovider | leaderboard | mentor | notifications | profile | teams | workspace
99

.github/labeler.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ application-server:
1313
- changed-files:
1414
- any-glob-to-any-file: server/**
1515

16-
webhook-ingest:
17-
- changed-files:
18-
- any-glob-to-any-file: "webhook-ingest/**"
19-
2016
ci:
2117
- changed-files:
2218
- any-glob-to-any-file:

.github/prompts/fix-ci.prompt.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
mode: agent
32
description: Diagnose and fix ALL failing CI checks on the current PR in a single pass
3+
subtask: true
44
---
55

66
# Fix CI
@@ -58,10 +58,9 @@ Before fixing anything, categorize every failure into this table.
5858
| 1 | Formatting | "Formatting failed", biome/prettier diff | `pnpm run format` |
5959
| 2 | Lint | Biome lint errors | `pnpm run check:fix` |
6060
| 3 | TypeScript | TS2xxx errors, type mismatch | Fix the type error in source |
61-
| 4 | Build failure | Compilation errors, missing exports | Fix imports/exports, verify with `pnpm run build:webhook-ingest` |
61+
| 4 | Build failure | Compilation errors, missing exports | Fix imports/exports, verify with `pnpm run build:webapp` |
6262
| 5 | Webapp tests | "FAIL" in webapp test output | Fix test or source, verify with `pnpm run test:webapp` |
6363
| 5 | App server tests | Maven test failures, assertion errors | Fix test or source, verify with `cd server && ./mvnw test -Dsurefire.includedGroups="unit" -Dmaven.test.skip=false -T 2C --batch-mode -q` |
64-
| 5 | Webhook tests | Vitest failures in webhook-ingest | Fix test or source, verify with `pnpm run test:webhook-ingest` |
6564
| 6 | OpenAPI sync | "OpenAPI out of sync" | `pnpm run generate:api` |
6665
| 6 | DB schema | "Schema drift detected" | `pnpm run db:draft-changelog` |
6766
| 6 | DB ERD | "ERD outdated" | `pnpm run db:generate-erd-docs` |
@@ -88,9 +87,6 @@ Then run tests for ALL components that had failures:
8887
# If webapp tests failed:
8988
pnpm run test:webapp
9089

91-
# If webhook-ingest tests failed:
92-
pnpm run test:webhook-ingest
93-
9490
# If app-server tests failed:
9591
cd server && ./mvnw test -Dsurefire.includedGroups="unit" -Dmaven.test.skip=false -T 2C --batch-mode -q && cd ../..
9692
```

.github/prompts/land-pr.prompt.md

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
mode: agent
32
description: Validate, branch, commit, and create PR following Hephaestus conventions
3+
subtask: true
44
---
55

66
# Land PR
@@ -21,9 +21,8 @@ git diff --name-only HEAD
2121

2222
Map paths to components (mirrors CI's dorny/paths-filter config):
2323
- `webapp/**` → webapp changed
24-
- `server/**` OR `scripts/db-utils.sh` → app-server changed
25-
- `webhook-ingest/**` → webhook changed
26-
- `package.json` OR `package-lock.json` OR `.node-version` → webapp + webhook changed
24+
- `server/**` OR `scripts/db-utils.sh` → app-server changed (includes webhook receiver since ADR 0008)
25+
- `package.json` OR `package-lock.json` OR `.node-version` → webapp changed
2726
- `docs/**` → docs-only (skip all validation if nothing else changed)
2827

2928
## 3. Format
@@ -59,26 +58,10 @@ pnpm run db:draft-changelog
5958
pnpm run db:generate-erd-docs
6059
```
6160

62-
## 6. Build Affected TS Services
63-
64-
If webhook changed:
65-
66-
```bash
67-
pnpm run build:webhook-ingest
68-
```
69-
70-
Build failures catch path alias and import issues that typecheck alone misses.
71-
72-
## 7. Unit Tests for Affected Components
61+
## 6. Unit Tests for Affected Components
7362

7463
Run ONLY tests for changed components. Order: fastest first.
7564

76-
If webhook changed:
77-
78-
```bash
79-
pnpm run test:webhook-ingest
80-
```
81-
8265
If webapp changed:
8366

8467
```bash
@@ -93,7 +76,7 @@ cd server && ./mvnw test -Dsurefire.includedGroups="unit" -Dmaven.test.skip=fals
9376

9477
ALL tests must pass before proceeding.
9578

96-
## 8. OpenAPI Sync Check
79+
## 7. OpenAPI Sync Check
9780

9881
If app-server changed:
9982

@@ -104,7 +87,7 @@ git diff --quiet || echo "WARNING: OpenAPI specs were out of sync - staging chan
10487

10588
Stage any drift that was caught.
10689

107-
## 9. Final Validation Pass
90+
## 8. Final Validation Pass
10891

10992
Regeneration can produce unformatted code. Run one final pass:
11093

@@ -115,7 +98,7 @@ pnpm run check
11598

11699
Both must pass.
117100

118-
## 10. Create Branch (if on main)
101+
## 9. Create Branch (if on main)
119102

120103
```bash
121104
git branch --show-current
@@ -129,7 +112,7 @@ git checkout -b <type>/<description>
129112

130113
Types: `feat`, `fix`, `docs`, `refactor`, `test`, `ci`, `chore`
131114

132-
## 11. Commit
115+
## 10. Commit
133116

134117
```bash
135118
git add -A
@@ -138,23 +121,23 @@ git commit -m "<type>(<scope>): <description>"
138121

139122
**Scopes:**
140123

141-
- Service: `webapp`, `server`, `ai`, `webhooks`, `docs`
124+
- Service: `webapp`, `server`, `docs`
142125
- Infra (no release): `ci`, `config`, `deps`, `deps-dev`, `docker`, `scripts`, `security`, `db`, `no-release`
143126
- Feature: `gitprovider`, `leaderboard`, `mentor`, `notifications`, `profile`, `teams`, `workspace`
144127

145-
## 12. Push
128+
## 11. Push
146129

147130
```bash
148131
git push -u origin HEAD
149132
```
150133

151-
## 13. Check if PR Exists
134+
## 12. Check if PR Exists
152135

153136
```bash
154137
PAGER=cat gh pr view --json number,url 2>/dev/null && echo "PR exists - skip creation" || echo "No PR - create one"
155138
```
156139

157-
## 14. Create PR (if needed)
140+
## 13. Create PR (if needed)
158141

159142
Skip if step 13 showed "PR exists".
160143

@@ -170,7 +153,7 @@ PAGER=cat gh pr create --base main \
170153
<steps to verify, or 'CI covers this'>"
171154
```
172155

173-
## 15. Verify
156+
## 14. Verify
174157

175158
```bash
176159
PAGER=cat gh pr view --json url,title -q '"PR: \(.title)\nURL: \(.url)"'

.github/workflows/ci-docker-build.yml

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ on:
2020
required: false
2121
type: string
2222
default: "true"
23-
webhook_ingest_changed:
24-
description: "Whether webhook-ingest files changed (or should build for other reasons)"
25-
required: false
26-
type: string
27-
default: "true"
2823
agent_images_changed:
2924
description: "Whether agent image files changed (or should build for other reasons)"
3025
required: false
@@ -76,29 +71,10 @@ jobs:
7671
org.opencontainers.image.licenses=MIT
7772
hephaestus.component=application-server
7873
79-
webhook-ingest-build:
80-
name: "Webhook"
81-
if: inputs.should_skip != 'true' && inputs.webhook_ingest_changed == 'true'
82-
uses: ./.github/workflows/reusable-docker-build.yml
83-
with:
84-
image-name: "ls1intum/hephaestus/webhook-ingest"
85-
docker-file: "./webhook-ingest/Dockerfile"
86-
# Context = repo root so the Dockerfile can COPY pnpm-lock.yaml,
87-
# pnpm-workspace.yaml, and the workspace package.json files needed for
88-
# `pnpm install --filter webhook-ingest...` to resolve the workspace graph.
89-
docker-context: "."
90-
registry: "ghcr.io"
91-
tags: |
92-
${{ github.ref_name }}
93-
${{ github.sha }}
94-
ci-${{ github.run_number }}
95-
${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || 'latest' }}
96-
labels: |
97-
org.opencontainers.image.title=Hephaestus Webhook Ingest
98-
org.opencontainers.image.description=Hono/TypeScript-based webhook processor for Hephaestus
99-
org.opencontainers.image.vendor=AET TUM
100-
org.opencontainers.image.licenses=MIT
101-
hephaestus.component=webhook-ingest
74+
# Note: the inbound webhook receiver lives in the application-server image
75+
# (gitprovider.webhook package) and is deployed as a separate container via
76+
# SPRING_PROFILES_ACTIVE=prod,webhook. No separate image build is required. See
77+
# docker/compose.core.yaml (webhook-server service) and ADR 0008.
10278

10379
agent-pi-build:
10480
name: "Agent: Pi"

0 commit comments

Comments
 (0)