Sprint 2 batch 1: graceful shutdown + CI/security workflows#121
Merged
Conversation
main.ts now wires app.enableShutdownHooks plus SIGTERM/SIGINT handlers so
in-flight tool invocations drain and Prisma/Redis disconnect cleanly when
the platform restarts the container. Tweaks keepAlive/headersTimeout to
the standard "behind-an-LB" values.
CI was previously workflow_dispatch-only and pointed at a non-existent
working-directory: anythingmcp (residue from a former monorepo layout).
Fixed: now runs on push and pull_request, drops the bogus working dir,
and adds backend+frontend lint and tsc --noEmit gates.
Both packages had eslint listed but no eslint.config.mjs, so the lint
script was crashing. Added minimal flat configs:
- backend: typescript-eslint recommended, with the noisier rules off
while we still have historic any usage to clean up.
- frontend: eslint-config-next 16 flat exports (core-web-vitals +
typescript), with set-state-in-effect / no-html-link-for-pages
downgraded to warnings (7 pre-existing call sites, separate sprint).
Two new workflows: CodeQL on push/PR/weekly, and Trivy with both a
filesystem scan (PR-blocking) and a Docker image scan (main only). Both
upload SARIF to the Security tab.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Foundation work from Sprint 2: shutdown hygiene + a working CI gate + security scanning, none of which the codebase had before.
Graceful shutdown
`main.ts` now calls `app.enableShutdownHooks()` and registers SIGTERM/SIGINT handlers so in-flight requests drain and Prisma / Redis disconnect cleanly when the platform restarts the container. `server.keepAliveTimeout` / `headersTimeout` set to the standard "behind a load balancer" values.
CI fixes
The existing workflow had `working-directory: anythingmcp` (residue from when this lived inside a larger monorepo) and only triggered on `workflow_dispatch` — so it had effectively never run on PR. Fixed:
ESLint configs
Both `packages/*/package.json` had `eslint` listed but no `eslint.config.mjs`, so `npm run lint` was crashing. Added flat configs:
Local: backend lint passes (0 errors, 11 warnings), frontend lint passes (0 errors, 23 warnings).
Security scanning
Test plan