- Node.js 22+
- pnpm 9+
- Redis (for work-queue tests)
- Docker (for container builds, and for the hadolint pre-commit hook)
- pre-commit (git hooks)
# Clone with submodules
git clone --recurse-submodules https://github.com/kagenti/serverless-harness.git
cd serverless-harness
# Build pi-fork type declarations
cd pi-fork && npm ci && npm run build && cd ..
# Install workspace dependencies
pnpm install
# Install the git hooks (formatting, shellcheck, secret scanning)
pre-commit install
# Run tests
pnpm -r test
# Typecheck
cd harness && pnpm exec tsc --noEmitpre-commit install is not optional in practice: the same hooks run in CI as the lint
job, so skipping it just moves the failure later. Run them over the whole tree at any time
with make lint, and format without linting with make fmt. Both drive the single Prettier
version pinned in the root package.json, so local and CI formatting cannot diverge.
serverless-harness/
├── harness/ # Core harness (@sh/harness)
├── packages/
│ ├── k8s-sandbox/ # K8s sandbox client (@sh/k8s-sandbox)
│ ├── knative-server/ # Knative HTTP server (@sh/knative-server)
│ ├── session-backend/ # Redis session backend (@sh/session-backend)
│ └── work-queue/ # Redis work queue (@sh/work-queue)
├── experiments/ # Performance experiments
├── deploy/knative/ # Deployment scripts and smoke tests
├── pi-fork/ # Submodule: Pi AI framework
└── Dockerfile # Container build
- Fork the repository
- Create a feature branch from
main - Make your changes with tests
- Ensure
pnpm -r testpasses - Ensure
tsc --noEmitpasses in all packages with tsconfigs - Ensure
make lintpasses (or commit with the hooks installed, which is equivalent) - Submit a pull request
All PRs must pass:
- Typecheck:
tsc --noEmitacross harness, k8s-sandbox, knative-server, experiments - Tests:
pnpm -r test(requires Redis for work-queue) - Lint:
make lint-- every pre-commit hook over all files (Prettier, shellcheck, hadolint, gitleaks, YAML and whitespace checks) - DCO: All commits must be signed off
Use conventional commit format:
feat:New featuresfix:Bug fixesdocs:Documentation changesci:CI/CD changeschore:Maintenance taskstest:Test additions or fixes
All commits must include DCO sign-off:
git commit -s -m "feat: Add new feature"This project follows the Kagenti Code of Conduct.