Files
pruefwerk/compliance-agent/tests
Sharang ParnerkarandClaude Opus 5.5 5424074d26
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Failing after 18m34s
fix(agent): cascade delete reads ids raw; integration tests run in CI
The agent's integration tests were not in CI and had rotted: 10 of 21
failed on main. Most seeded data into <db> while the API reads the
per-tenant <db>_dev since the M7.2 tenant split; the rest asserted old
field names (repositories, critical), the old DAST type spelling
(webapp, now web_app) and 'total_findings counts resolved ones' (the
overview counts open findings only).

One was a real bug: deleting a target found its DAST targets and
pentest sessions as typed documents, and 'while let Some(Ok(..))'
stopped at the first that did not decode, so its downstream data was
left behind. The cascade now reads only the _ids, raw (ids_of), and
deletes everything linked whatever the document's shape; the session
cleanup is one helper. The cascade test keeps an old-shaped DAST target
on purpose.

- tests/common: TestServer::tenant_db_name(); all seeding uses it
- ci.yml: a mongo:7 service and 'Tests (agent integration)'

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYcAAeTw22GE9QPzDM8yc4
2026-10-29 22:36:09 +01:00
..