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
feat(core): extract HTTP router and add output-safety primitives
Foundation layer for the repo-config and isolated-workflow-runner work that
follows in this stack. No behaviour change to dispatch or the pipeline.
- Extract the fetch handler out of `src/app.ts` into `src/http-router.ts`,
so route wiring is testable without booting the server process.
- Add `src/utils/bot-identity.ts` and `src/utils/github-actor.ts` to give the
bot a single identity/actor resolution point instead of scattered literals.
- Add `src/utils/exact-credential-redaction.ts` and widen the redaction paths
in `src/utils/log-redaction.ts`.
- Add `src/mcp/servers/inline-comment-dedup.ts` so repeated inline review
comments collapse instead of stacking on re-runs.
- Add `src/db/postgres-error.ts` to classify Postgres failures at one place.
- Extend the LLM output scanner and sanitizer coverage.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KUPpJPtxAaHWrBsjytRGyM
|`.github/workflows/secrets-scan.yml`|`push: branches-ignore: [gh-pages]` + `workflow_dispatch`| Standalone gitleaks scan, decoupled so every push (incl. chore/docs) is gated |
87
87
|`.github/workflows/release-please.yml`|`push: [main, beta]`| release-please maintains a Release PR per branch; merging it cuts the release then calls `docker-build.yml`, and on a stable `main` release dispatches `github-app-released` to `chrisleekr/helm-charts` to open the chart-sync PR |
88
-
|`.github/workflows/docker-build.yml`|`workflow_call` + `workflow_dispatch`| Reusable image builder: matrix split-and-merge (amd64 on `ubuntu-24.04`, arm64 on `ubuntu-24.04-arm`), Trivy scan |
88
+
|`.github/workflows/docker-build.yml`|`workflow_call` + `workflow_dispatch`| Reusable image builder: matrix split-and-merge (amd64 on `ubuntu-24.04`, arm64 on `ubuntu-24.04-arm`), Trivy scan. Tags each variant `<version>-<variant>` plus a mutable `latest-<variant>` on prod releases |
89
+
|`.gitlab-ci.yml`| every branch (gates) + `main` (images) | GitLab CI: the same quality gates on every branch, then `latest-orchestrator` / `latest-daemon` to the GitLab container registry on `main`|
Copy file name to clipboardExpand all lines: docs/build/extending.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Two extension points in this codebase: workflow handlers and MCP servers. Both f
4
4
5
5
## Adding a workflow
6
6
7
-
A workflow is a verb the bot performs on a target (issue or PR). Six are registered today; adding a seventh is appending one entry to `src/workflows/registry.ts` plus a handler file.
7
+
A workflow is a verb the bot performs on a target (issue or PR). Seven are registered today; adding an eighth is appending one entry to `src/workflows/registry.ts` plus a handler file.
@@ -70,7 +71,7 @@ If the workflow should be reachable via mentions, extend the system prompt in `s
70
71
71
72
### Step 4: document and test
72
73
73
-
- Add `docs/use/workflows/<name>.md` matching the template used by the six built-ins.
74
+
- Add `docs/use/workflows/<name>.md` matching the template used by the seven built-ins.
74
75
- Add `test/workflows/handlers/<name>.test.ts` covering the happy path and one failure mode. Integration via `test/workflows/dispatcher.test.ts` is automatic: if the registry entry is valid, dispatch works.
75
76
- The `check:docs-sync` script in CI fails any PR that touches `src/workflows/**` without updating the workflow docs tree.
76
77
@@ -201,4 +202,4 @@ If your extension reacts to a GitHub event the bot does not yet handle (e.g. `pu
201
202
2.**Add a webhook handler** in `src/webhook/events/<event>.ts` that parses the payload and dispatches via `dispatchByLabel` (label path) or `dispatchByIntent` (comment path). Webhook handlers must return within 10 s, fire `processRequest` with fire-and-forget semantics.
202
203
3.**Register the event handler** in `src/app.ts` alongside the existing `app.webhooks.on(...)` calls.
203
204
204
-
Webhook handlers do **not** run business logic, they parse the event, build a `BotContext`, and dispatch. All bot work happens in workflow handlers, called from the daemon.
205
+
Webhook handlers do **not** run business logic, they parse the event, build a `BotContext`, and dispatch. Structured workflow handlers execute in one-attempt runner Pods. Legacy direct and scoped jobs execute on shared daemons.
Copy file name to clipboardExpand all lines: docs/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ hide:
5
5
6
6
# GitHub App
7
7
8
-
A GitHub App that responds to `@chrisleekr-bot` mentions on pull requests and issues, powered by the Claude Agent SDK. Every webhook is acknowledged in under ten seconds and handed to the daemon fleet over WebSocket; when triage flags the job as heavy or the queue backs up, the orchestrator spawns an ephemeral daemon Pod on Kubernetes so the same image scales on demand.
8
+
A GitHub App that responds to `@chrisleekr-bot` mentions on pull requests and issues, powered by the Claude Agent SDK. Every webhook is acknowledged in under ten seconds. Structured workflows run in one-attempt Kubernetes Pods; legacy direct and scoped jobs use the shared daemon fleet, which can add ephemeral Pods for heavy work or queue overflow.
| Webhook secret | Output of `openssl rand -hex 32`. Save as `GITHUB_WEBHOOK_SECRET`. |
32
32
33
-
The path `/api/github` is set by `pathPrefix`in `createNodeMiddleware` (`src/app.ts`). Don't change the path unless you also change the source.
33
+
The path `/api/github/webhooks` is the `WEBHOOK_PATH` constant in `src/http-router.ts`, passed as the `path` option to `createWebMiddleware` in `src/app.ts`. The router matches it explicitly before delegating, so changing it means changing both. Don't change the path unless you also change the source.
34
34
35
35
For local dev, set the Webhook URL to a [smee.io](https://smee.io) channel and relay it to your local server:
0 commit comments