refactor: uv-based deps, no nexus auth, LLM retries, lock cleanup, health checks, e2e tests

This commit is contained in:
Marker689
2026-05-11 19:27:56 +03:00
parent 698f02c8af
commit 04abe44ab4
20 changed files with 1583 additions and 51 deletions

View File

@@ -16,7 +16,7 @@ GuardDog Nexus integrates [GuardDog](https://github.com/DataDog/guarddog) with [
```bash
cp .env.example .env
# edit .env to set NEXUS_PASSWORD, optionally LLM vars
# edit .env to set LLM vars if needed
make docker-up
# → guarddog-nexus :8080, Nexus :8081
```
@@ -94,7 +94,6 @@ All via environment variables, defined in `config.py`. Key ones:
| Variable | Default | Notes |
|----------|---------|-------|
| `NEXUS_URL` | `http://localhost:8081` | |
| `NEXUS_PASSWORD` | — | Required |
| `WEBHOOK_SECRET` | `""` | HMAC-SHA256 validation |
| `MAX_CONCURRENT_SCANS` | `4` | asyncio.Semaphore for guarddog processes |
| `LLM_ENABLED` | `0` | `1` to enable analysis |
@@ -223,10 +222,16 @@ curl -X POST http://localhost:8080/webhooks/nexus \
## Workflow
**After every change** — follow these steps in order:
## Workflow — MANDATORY after completing a feature or session
1. **Document** — update `AGENTS.md` if the change introduces a new concept, env var, endpoint, or workflow.
2. **Lint**`ruff check guarddog_nexus && ruff format guarddog_nexus`
3. **Test**`python3 -m pytest -v` (must pass 100%)
4. **Commit**use the existing commit prefix convention (`feat:`, `fix:`, `refactor:`, `docs:`, `ui:`).
5. **Rebuild**`docker compose up -d --build` to deploy changes.
**Before responding to the user, you MUST complete ALL of:**
1. **Lint**`ruff check guarddog_nexus tests` (must pass) + `ruff format guarddog_nexus tests`
2. **Test**`python3 -m pytest -v` (must pass 100%)
3. **Commit**`git add -A && git commit -m "prefix: description"` using the existing prefix convention (`feat:`, `fix:`, `refactor:`, `docs:`, `ui:`)
4. **Rebuild**`docker compose up -d --build`
5. **Document** — update `AGENTS.md` if the change introduces a new concept, env var, endpoint, or workflow
**If you skip any of these, the user will need to do them manually. Do NOT skip commit and rebuild.**
These steps must be executed sequentially — lint before test, test before commit, commit before rebuild.