Skip to content

BUG: Migrations, seeding, config cache, tool storage growth, deps #56

Description

@echel0nn

Labels: bug, migrations, config, dependencies
Severity: S2. (The knowledge Vector(384) vs (1024) ORM drift is already tracked in #37.)

Finding (path:line) Issue
alembic/versions/051_vr_target_ingestion.py:82-95 Upgrade strips JSON keys (audit_mcp_index_id, binary_id, kernel_image_id) via UPDATE; the downgrade drops the new columns but does NOT restore the stripped keys -> permanent data loss on rollback
alembic/versions/060_vr_target_analysis_stages.py:54-79 Backfill selects ALL vr_targets into memory and updates row-by-row -> holds the migration txn open for minutes and risks OOM; no batching
alembic/versions/010_team_isolation.py:132-144 Downgrade REVOKEs from aila_app unconditionally; if the role was dropped independently the REVOKE is fatal and the downgrade half-tears RLS
runtime/builder.py:184-185 Seed loop iterates modules in one session with no per-module try/except -> one module's seed_data() failure aborts all later modules and leaves earlier partial commits
modules/malware/module.py:156-157 seed_data() returns without stamping a SeedVersionRecord despite declaring SEED_VERSION='1.0' -> future re-seed logic can never detect the need
storage/registry.py:67,206-207 ConfigRegistry cache is process-local; a set() on one worker invalidates only that worker -> other workers serve stale config for up to cache_ttl=60s with no cross-process invalidation
platform/tools/{registry,cache,artifacts}.py + storage/memory.py Memory/decision-cache/artifact tools persist with no eviction/TTL/row-cap/size-limit -> unbounded table growth; expired cache entries never pruned
pyproject.toml:38 + pnpm-workspace.yaml slowapi==0.1.9 abandoned (blocks Starlette upgrades); html2canvas@1.4.1 and ogl@0.0.116 unmaintained with no security policy; openpyxl exact-pinned (no future security patches without manual bump)

Acceptance: destructive migrations archive removed data + restore on downgrade; large backfills batched; conditional REVOKE; per-module seed isolation + version stamping; cross-process config invalidation (or shorter TTL + pub/sub); eviction/TTL/size caps on tool storage; dependency review with a supported rate limiter and maintained frontend libs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions