Backlog t61. The agent integration tests (compliance-agent/tests, 87 tests in 30 binaries) were never in CI, because the MongoDB they need kept dying mid-run (three tries in #584).
Root cause (from this PR's first run, which kept the mongod log): Too many open files → WiredTiger fatal assertion → mongod aborts. Every test opens its own database, and WiredTiger keeps a file open per collection and index. Job containers start with a soft limit of 1024 open files. This also explains the lost mongo:7 service containers in #584.
Reproduced locally in rust:1.94-bookworm with --ulimit nofile=1024:524288: 19 of 87 failed and the log shows the same error. With the limit raised: 87 passed.
It was not memory: MongoDB 7 sizes its cache from the cgroup, and it peaks at ~0.5 GB under the job's 3 GB cap.
The jobagent-integration (PRs only):
mongod runs as a process in the job container: the official 7.0.45 Debian 12 build, checked against its sha256, with --wiredTigerCacheSizeGB 0.25 and --bind_ip 127.0.0.1;
ulimit -n 64000 (falls back to the hard limit), and the limit is printed;
tests are built before mongod starts;
on failure, the mongod log and process state are printed.
Note: this PR's Check job fails on cargo audit (RUSTSEC-2026-0433, pulldown-cmark). That is fixed in #587; merge it first, then this PR's Check goes green on a re-run.
Backlog t61. The agent integration tests (`compliance-agent/tests`, 87 tests in 30 binaries) were never in CI, because the MongoDB they need kept dying mid-run (three tries in #584).
**Root cause** (from this PR's first run, which kept the mongod log): `Too many open files` → WiredTiger fatal assertion → mongod aborts. Every test opens its own database, and WiredTiger keeps a file open per collection and index. Job containers start with a soft limit of **1024** open files. This also explains the lost `mongo:7` service containers in #584.
Reproduced locally in `rust:1.94-bookworm` with `--ulimit nofile=1024:524288`: 19 of 87 failed and the log shows the same error. With the limit raised: **87 passed**.
It was not memory: MongoDB 7 sizes its cache from the cgroup, and it peaks at ~0.5 GB under the job's 3 GB cap.
**The job** `agent-integration` (PRs only):
- mongod runs as a **process in the job container**: the official 7.0.45 Debian 12 build, checked against its sha256, with `--wiredTigerCacheSizeGB 0.25` and `--bind_ip 127.0.0.1`;
- `ulimit -n 64000` (falls back to the hard limit), and the limit is printed;
- tests are built before mongod starts;
- on failure, the mongod log and process state are printed.
**Note:** this PR's `Check` job fails on `cargo audit` (RUSTSEC-2026-0433, pulldown-cmark). That is fixed in #587; merge it first, then this PR's Check goes green on a re-run.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The 21 agent integration tests need MongoDB. Three tries with a mongo
service container lost the database mid-run (#584), so they were left
out of CI (backlog t61).
Memory was not the cause: against mongo:7 capped like a job (3 GB,
2 CPUs) all agent integration tests pass in parallel locally and mongo
peaks at ~0.5 GB (MongoDB 7 sizes its cache from the cgroup). The new
job runs mongod as a process in the job container instead: the official
Debian 12 build checked against its sha256, a 0.25 GB cache, started
after the tests are built, its log printed when a test fails. Locally
in rust:1.94-bookworm under the same cap: 87 passed, ~0.5 GB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first run of the job lost mongod mid-run again: its log says "Too
many open files" (WiredTiger fatal assertion). Every test opens its own
database, so WiredTiger keeps a file open per collection and index, and
job containers start with a soft limit of 1024. Reproduced locally with
--ulimit nofile=1024:524288 (19 of 87 failed); with 64000, all 87 pass.
That also explains the lost mongo service containers in #584.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Backlog t61. The agent integration tests (
compliance-agent/tests, 87 tests in 30 binaries) were never in CI, because the MongoDB they need kept dying mid-run (three tries in #584).Root cause (from this PR's first run, which kept the mongod log):
Too many open files→ WiredTiger fatal assertion → mongod aborts. Every test opens its own database, and WiredTiger keeps a file open per collection and index. Job containers start with a soft limit of 1024 open files. This also explains the lostmongo:7service containers in #584.Reproduced locally in
rust:1.94-bookwormwith--ulimit nofile=1024:524288: 19 of 87 failed and the log shows the same error. With the limit raised: 87 passed.It was not memory: MongoDB 7 sizes its cache from the cgroup, and it peaks at ~0.5 GB under the job's 3 GB cap.
The job
agent-integration(PRs only):--wiredTigerCacheSizeGB 0.25and--bind_ip 127.0.0.1;ulimit -n 64000(falls back to the hard limit), and the limit is printed;Note: this PR's
Checkjob fails oncargo audit(RUSTSEC-2026-0433, pulldown-cmark). That is fixed in #587; merge it first, then this PR's Check goes green on a re-run.🤖 Generated with Claude Code
05e81625a9toa5e9913957