Skip to content

ci: harden the test MongoDB for single-process coverage and dump diagnostics on failure - #1769

Merged
chronoai-kai merged 1 commit into
mainfrom
ci/test-mongodb-hardening
Oct 5, 2026
Merged

chronoai-kai merged 1 commit into
mainfrom
ci/test-mongodb-hardening

Conversation

@chronoai-kai

Copy link
Copy Markdown
Contributor

Summary

CI-only hardening for the per-job test MongoDB. No application code changes and no version bump.

Since v0.60.0, the single-process cargo llvm-cov --package nyxid jobs lose mongod at the same cumulative point, about 840–960 s into the run around the auth_device_service tests:

Every DB-backed test then fails until the 90-minute cancel. The [ci-resources] samples show available host memory still around 7 GB, while mongod held about 8 GB when it vanished. This is consistent with descriptor exhaustion: the start script already disables the snapshot window for the same reason, and the per-test ident count keeps growing with new collections and indexes. A host OOM looks unlikely.

Changes

  • start-test-mongodb.sh: raise nofile from 65,536 to 1,048,576 and cap --wiredTigerCacheSizeGB at 2 (the test data set is tiny).
  • New dump-test-mongodb.sh: container state (exit_code, oom_killed, error), mongod descriptor count and limits, VmRSS/VmHWM, kernel OOM lines and the server log tail. Metadata and server log only, no environment.
  • ci.yml: run the dump on failure() || cancelled() after the backend test, billing smoke, head coverage and base coverage steps (continue-on-error).

Validation

This PR's own Coverage (Backend) and Coverage (Backend Base) runs re-measure with the hardened container. The coverage identity fingerprint includes the start script, so the base report is re-measured rather than restored.

…ump diagnostics on failure

Coverage (Backend) and Coverage (Backend Base) lost mongod at the same
cumulative point (~840-960 s, auth_device_service tests) on #1765/#1766 with
~7 GB host memory still free; mongod held ~8 GB when it vanished. Raise the
descriptor limit far above the nextest peak (thousands of per-test databases'
WiredTiger files stay open in one llvm-cov process) and cap the WiredTiger
cache at 2 GB. On failure or cancellation, print the container state
(exit code, OOMKilled), mongod descriptor count/limits, kernel OOM lines and
the server log tail so any recurrence is diagnosable.
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

📊 Code coverage

Component Lines Threshold Status Δ vs base
Backend (nyxid) 87.06% 73% ✅ — 0.00
CLI (nyxid-cli) 69.26% 64% ✅ — 0.00
Frontend (vitest) 72.21% 15% ✅ — 0.00

Gate: line coverage must stay at or above the threshold. Ratchet plan (W21): Backend → 55%, CLI → 50%, Frontend → 30% by quarter end.

@chronoai-kai
chronoai-kai merged commit 637013b into main Oct 5, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant