Skip to content

[Audit] Worker maintenance/celery tasks tested only via source-scraping, not behavior (TST-13) #809

Description

@hellodk

Auto-filed by the external multi-persona audit (2026-06). Do not fix until reviewed.

Auditor persona: Principal Tester
Severity: Medium
Finding ID: TST-13

Location

tests/unit/test_tasks_maintenance_fixes.py:6-29; test_celery_app.py

Evidence

reads maintenance.py as a string and asserts substrings; never invokes mark_stale_nodes/reap_pending_actions/rotate_llm_query_logs

Impact

Logic errors (wrong SQL filter/threshold/status) in maintenance tasks are not caught by CI.

Recommended fix

Call the tasks with a mocked db and assert the correct UPDATE parameters/behavior.


Tracked in the audit report. Labels: severity = p2-normal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditFinding from external multi-persona audit (2026-06)p2-normalStandard prioritytestTest coverage improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions