DATA-001 follow-up: substrate.retention module never landed — closed #163 has no implementation, breaks test collection #269

Closed
opened 2026-08-12 06:31:12 +00:00 by Mark · 1 comment
Owner

Summary

Issue #163 (DATA-001: Data Retention Policies) is closed, but its implementation module substrate/retention.py does not exist anywhere in the repo (checked all branches). Only the tests landed:

  • tests/unit/test_retention.py (452 lines, committed in 769e229)
  • tests/integration/test_retention_lifecycle.py

Both files import from substrate.retention:

from substrate.retention import (
    ArtifactRetentionPolicy,
    CompliancePolicy,
    ComplianceReporter,
    DataRetentionScheduler,
    IntentRetentionPolicy,
    LogRetentionPolicy,
    RetentionCleaner,
    RetentionPolicy,
)

Impact

  • pytest tests/unit fails at collection with ModuleNotFoundError: No module named substrate.retention
  • pytest tests/integration fails the same way
  • Every full-suite test run on this repo is broken

The ledger methods the tests also exercise are likewise absent:
list_intents_for_cold_deletion, mark_intent_cold_deleted, delete_intent_hot_row, delete_expired_logs, record_retention_run, get_retention_runs, record_deletion_audit, list_deletions_since, retention_current_state — none exist in substrate/ledger/core.py.

The only related code that did land is list_objects() on the cold-storage backends (in substrate/cold_storage.py, same commit), plus a stale .gsd/salvage-state-Mark_mesh-seed_163.json claiming Implement completed.

Expected

Either implement substrate/retention.py + the ledger methods per the DATA-001 acceptance criteria (configurable retention periods, automated deletion, archive-before-delete, compliance reporting), or explicitly mark #163 as not-delivered and decide whether the tests should remain.

Severity

HIGH — closed issue without implementation; breaks full test suite collection.

## Summary Issue #163 (DATA-001: Data Retention Policies) is **closed**, but its implementation module `substrate/retention.py` **does not exist anywhere in the repo** (checked all branches). Only the tests landed: - `tests/unit/test_retention.py` (452 lines, committed in `769e229`) - `tests/integration/test_retention_lifecycle.py` Both files import from `substrate.retention`: ```python from substrate.retention import ( ArtifactRetentionPolicy, CompliancePolicy, ComplianceReporter, DataRetentionScheduler, IntentRetentionPolicy, LogRetentionPolicy, RetentionCleaner, RetentionPolicy, ) ``` ## Impact - `pytest tests/unit` **fails at collection** with `ModuleNotFoundError: No module named substrate.retention` - `pytest tests/integration` fails the same way - Every full-suite test run on this repo is broken The ledger methods the tests also exercise are likewise absent: `list_intents_for_cold_deletion`, `mark_intent_cold_deleted`, `delete_intent_hot_row`, `delete_expired_logs`, `record_retention_run`, `get_retention_runs`, `record_deletion_audit`, `list_deletions_since`, `retention_current_state` — none exist in `substrate/ledger/core.py`. The only related code that did land is `list_objects()` on the cold-storage backends (in `substrate/cold_storage.py`, same commit), plus a stale `.gsd/salvage-state-Mark_mesh-seed_163.json` claiming Implement completed. ## Expected Either implement `substrate/retention.py` + the ledger methods per the DATA-001 acceptance criteria (configurable retention periods, automated deletion, archive-before-delete, compliance reporting), or explicitly mark #163 as not-delivered and decide whether the tests should remain. ## Severity HIGH — closed issue without implementation; breaks full test suite collection.
Author
Owner

Fix landed — closing

Implementation for DATA-001 (retention) delivered in commit 8e4d491 on origin/master (feat(#269): implement substrate.retention module).

  • substrate/retention.py (686 lines) — RetentionPolicy, ArtifactRetentionPolicy, IntentRetentionPolicy, LogRetentionPolicy, CompliancePolicy, ComplianceReporter, DataRetentionScheduler, RetentionCleaner
  • substrate/ledger/core.py (+240) — all 9 missing ledger methods: list_intents_for_cold_deletion, mark_intent_cold_deleted, delete_intent_hot_row, delete_expired_logs, record_retention_run, get_retention_runs, record_deletion_audit, list_deletions_since, retention_current_state
  • substrate/ledger/migrations.py (+61) — retention/audit tables
  • tests updated (tests/unit/test_retention.py, tests/integration/test_retention_lifecycle.py)

Verification (fresh run, repo .venv):

  • ruff check: clean on all touched files
  • pytest tests/unit/test_retention.py -q: 24 passed
  • pytest tests/integration/test_retention_lifecycle.py -q: 15 passed

Test collection no longer breaks. Per the issue: implementation per DATA-001 acceptance criteria (configurable retention periods, automated deletion, archive-before-delete, compliance reporting) is delivered.

## Fix landed — closing Implementation for DATA-001 (retention) delivered in commit 8e4d491 on origin/master (feat(#269): implement substrate.retention module). - `substrate/retention.py` (686 lines) — RetentionPolicy, ArtifactRetentionPolicy, IntentRetentionPolicy, LogRetentionPolicy, CompliancePolicy, ComplianceReporter, DataRetentionScheduler, RetentionCleaner - `substrate/ledger/core.py` (+240) — all 9 missing ledger methods: list_intents_for_cold_deletion, mark_intent_cold_deleted, delete_intent_hot_row, delete_expired_logs, record_retention_run, get_retention_runs, record_deletion_audit, list_deletions_since, retention_current_state - `substrate/ledger/migrations.py` (+61) — retention/audit tables - tests updated (tests/unit/test_retention.py, tests/integration/test_retention_lifecycle.py) Verification (fresh run, repo .venv): - ruff check: clean on all touched files - pytest tests/unit/test_retention.py -q: 24 passed - pytest tests/integration/test_retention_lifecycle.py -q: 15 passed Test collection no longer breaks. Per the issue: implementation per DATA-001 acceptance criteria (configurable retention periods, automated deletion, archive-before-delete, compliance reporting) is delivered.
Mark closed this issue 2026-08-13 10:40:40 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/mesh-seed#269
No description provided.