CodeSnuffler on Forgejo
  • Python 61.8%
  • Vue 18.5%
  • TypeScript 17%
  • Go 1.1%
  • JavaScript 0.6%
  • Other 0.8%
Find a file
Jason Harris d99c478867 Tests: document the End-to-End lane workflow
This updates the development and test documentation around the lane catalog, aggregate Make targets, and interactive console. The command map now points users at make endtoend-console, checks-all, workflow-http-all, endtoend-all, live-provider-endtoend-all, release-validation-all, and direct npm scripts for focused Playwright runs.

The End-to-End README now describes the renamed CODESNUFFLER_ENDTOEND_* environment surface, live Bitbucket safety gates, the keep-PR script, target-mode labels, and provider-expansion notes. Standard adapter docs now refer to the underlying scripts directly where the old Make targets were removed.
2026-06-27 19:41:33 +12:00
app Tests: clear validation blockers for aggregate check lanes 2026-06-27 19:39:13 +12:00
auth-providers Docker: discover worktree config.toml for local Compose config mounts 2026-06-25 17:10:26 +12:00
container_common AI tools: persist auth image runtime state during setup 2026-06-24 13:32:22 +12:00
container_image_controller Runner: read workspace metadata from the controller-visible mount 2026-06-25 17:16:52 +12:00
docker Acceptance: fix managed local AI harness and simple auth failures 2026-06-22 17:45:02 +12:00
docs Tests: document the End-to-End lane workflow 2026-06-27 19:41:33 +12:00
frontend AI tools: show a successful setup state before returning from configuration 2026-06-25 17:10:26 +12:00
plugins Tests: document the End-to-End lane workflow 2026-06-27 19:41:33 +12:00
resources Auth: ship Cody login artwork as WebP assets 2026-06-20 08:50:30 +12:00
scripts Tests: document the End-to-End lane workflow 2026-06-27 19:41:33 +12:00
tests Tests: document the End-to-End lane workflow 2026-06-27 19:41:33 +12:00
.dockerignore Scripts: build local plugin source collections for Compose 2026-05-28 00:54:14 +02:00
.env.example allow developing different versions 2026-05-10 05:26:21 +02:00
.envrc Scripts: standardize operational script directories and command names 2026-06-17 20:59:12 +12:00
.gitignore Docker: discover worktree config.toml for local Compose config mounts 2026-06-25 17:10:26 +12:00
AGENTS.md Project layout: standardize agent docs and plugin adapter paths 2026-06-17 21:00:50 +12:00
CONTEXT.md Shell and AITool Runner: Document AI tool runnable image terminology 2026-06-22 08:10:18 +12:00
Makefile Tests: add lane catalog and aggregate validation targets 2026-06-27 19:39:38 +12:00
pyrightconfig.json Containers: rename shared container package to container_common 2026-06-22 10:47:03 +12:00
README.md Docker: discover worktree config.toml for local Compose config mounts 2026-06-25 17:10:26 +12:00
requirements-dev.txt Tests: add Textual console for lane catalog execution 2026-06-27 19:40:05 +12:00
requirements.txt Auth: add argon2-cffi runtime dependency 2026-06-18 13:43:26 +12:00

CodeSnuffler

CodeSnuffler is a self-hosted pull request review service for teams that want AI-assisted review to run under their own repository, credential, and runner policy.

It connects to Git providers, tracks repositories, installs repository webhooks, receives pull request events, prepares isolated checkout artifacts, runs configured AI reviews through managed runner workspaces, and publishes review updates back to the provider where the provider supports it.

Status: active alpha implementation. The current product is centered on local and self-hosted development.

What It Does

  • Tracks provider connections and repositories.
  • Reconciles provider webhooks for pull request events.
  • Records webhook deliveries and review state in SQLite.
  • Maintains reusable checkout caches and per-review clones.
  • Runs configured AI review execution through an isolated container image controller.
  • Supports plugin-declared AI tool configuration for bundled Codex, OpenCode, Claude Code, Gemini CLI, Pi, and future AI harness plugins.
  • Serves a FastAPI JSON API and the Vue application from one container.
  • Exposes review, checkout, repository, provider, webhook, AI tool, installation, and settings views in the frontend.

CodeSnuffler is not just a prompt wrapper. It keeps durable review records, checkout state, webhook state, provider capability evidence, runner artifacts, and AI review policy so review work can be inspected, restored, rerun, or published deliberately.

Architecture At A Glance

The default runtime is a Docker Compose application with two first-class services:

  • FastAPI serves the API and built Vue frontend.
  • RQ workers process review, comment, check, and patch jobs.
  • Valkey backs the queues and is bound inside the container.
  • SQLite stores durable application state.
  • A separate container image controller service builds Tool Container images and launches isolated AI tool execution through Docker.
  • Docker volumes and host-mounted config separate durable data, runner workspaces, and secret credentials.

FastAPI is exposed to the host on port 8000 by default. The local Compose stack also exposes the container image controller on its configured development port so build and runner diagnostics can be inspected while developing.

Quick Start

Prerequisites:

  • Docker Desktop or Docker Engine with Compose.
  • make.
  • jq for the endpoint check commands.

Run the app:

make up

Then open:

http://localhost:8000/

Check the service:

curl http://localhost:8000/healthz | jq
curl http://localhost:8000/readyz | jq
curl http://localhost:8000/api/instance | jq
curl http://localhost:8000/api/repositories | jq
curl http://localhost:8000/api/ai-tools/instances/codex/primary | jq

Run another worktree or version on a different host port:

make up 8001
make down 8001

For setup details, see Quick Start and Installation.

Documentation

Main Product Flow

  1. Configure a provider connection.
  2. Add credentials for provider API access.
  3. Import and track a repository.
  4. Set up or reconcile the repository webhook.
  5. Receive a pull request webhook event.
  6. Register or update a CodeSnuffler review.
  7. Prepare checkout cache, review clone, diff, and artifacts.
  8. Run configured AI review execution through an isolated runner.
  9. Inspect findings and review state in CodeSnuffler.
  10. Publish supported review updates back to the provider.

Configuration

Host-side CodeSnuffler config defaults to:

~/.config/codesnuffler

The app container mounts that directory at:

/config/codesnuffler

Basic installation settings live in:

~/.config/codesnuffler/config.toml

Durable AI harness auth profile files are kept under:

~/.config/codesnuffler/plugin-auth

Set CODESNUFFLER_CONFIG_HOST_DIR before running make up to use a different host-side config tree.

For local Docker stacks, the config directory is selected in this order:

  1. Explicit CODESNUFFLER_CONFIG_HOST_DIR
  2. .codesnuffler-instance.toml config_file
  3. Existing ./.config/config.toml in the worktree root
  4. Compose fallback to ~/.config/codesnuffler

The old CODESNUFFLER_CONFIG_DIR and CODESNUFFLER_CONFIG names are removed, not deprecated aliases.

Current Implementation Notes

  • SQLite is stored at /data/reviews.db.
  • Valkey append-only data is stored under /data/valkey.
  • Checkout caches live under /data/repos/bare.
  • Per-review clones live under /data/clones.
  • Review artifacts live under /data/artifacts/reviews.
  • Runner workspaces are disposable and live under /runner-workspaces.
  • AI harness instances are plugin instances addressed by { plugin_id, instance_id }.
  • AI harness auth profile state is host-backed under keyed directories: ~/.config/codesnuffler/plugin-auth/<plugin-id>/<instance-id>/<auth-storage-key>/....
  • Generic plugin secrets are host-backed under ~/.config/codesnuffler/secrets/plugins/<plugin-id>/<instance-id>/....
  • Non-secret AI harness runtime state lives under /plugin_data/<plugin-id>/<instance-id>/....
  • Tool-auth containers mount those keyed directories at each CLI's native auth paths during setup and probes.
  • Runner workspaces receive disposable copies of the native auth/config paths; durable plugin-auth roots are not mounted into review runner containers.

For the fuller storage model, see Storage And Restore.

Project Status

CodeSnuffler is in active alpha. It already supports provider configuration, repository tracking, webhook ingestion, review registration, checkout preparation, plugin-backed runner recipes, configured AI review execution, runner artifacts, review findings, provider comment paths where supported, scoped RBAC, automation API keys, and configurable plugin credentials.

Near-term work is focused on completing provider publication reliability, inline comment behavior, review policy inheritance, capability evidence, checkout and runner restore flows, and broader automated test coverage.

For detailed current state, see Project State.