Document coding agents and give them a sandbox image
Agents work on this repository in the agent-envs sandbox: a container whose only way out is an egress proxy with an allowlist, which also adds the Gitea bot token. docs/contributing/agents.md covers setting it up for Politrack (1Password item, .env, commit identity), what it can reach and its limits; AGENTS.md tells agents how to recognise the sandbox and behave in it. backend/tests/Dockerfile.debian gains a `sandbox` target: the agent-envs agent image plus the backend's dependencies from Debian packages, the same list as the PyPI-free test image (still the default target). The sandbox runs `pytest` without PyPI, which the owner's PC can't reach. A new invariant in AGENTS.md keeps that list in step with pyproject.toml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
456f9816f4
commit
0e21730b9f
5 files changed
+117
-7
No files matched your search
@@ -26,10 +26,14 @@ docker build -t politrack-test -f backend/tests/Dockerfile.debian backend/tests
|
||||
docker run --rm -v "$PWD/backend:/app" politrack-test python3 -m pytest -q -p no:cacheprovider
|
||||
```
|
||||
|
||||
The same image can run adapters against the compose database: add `--network politics-tracking_default`
|
||||
and `-e POLITRACK_DATABASE_URL=postgresql://politrack:<password>@db:5432/politrack`, then
|
||||
The test image can also run adapters against the compose database: add
|
||||
`--network politics-tracking_default` and
|
||||
`-e POLITRACK_DATABASE_URL=postgresql://politrack:<password>@db:5432/politrack`, then
|
||||
`python3 -m politrack.cli run <adapter> --max-requests 20`.
|
||||
|
||||
The same package list builds the agent sandbox image (target `sandbox`, see
|
||||
[agents.md](agents.md#the-sandbox-image)), so keep it in step with `pyproject.toml`.
|
||||
|
||||
## Golden fixtures
|
||||
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user