Skip to content

logs: old-format run directories in .logs/ are invisible to the retrospective scan #47

@ooloth

Description

@ooloth

Problem

The .logs/2026-04-05-00-41-fix-2/ run directory contains report.md and retrospective.json instead of the current metadata.json and reflections.json schema. recent_run_summaries() silently skips directories without metadata.json:

for d in dirs:
    meta_path = d / "metadata.json"
    if not meta_path.exists():
        continue

This means early run data — which may contain useful patterns for the retrospective — is permanently invisible to analysis. More importantly, there is no migration path and no warning that data is being skipped. If the schema changes again in the future, the same silent data loss will recur.

Definition of done

You know this is fixed when:

  1. recent_run_summaries() logs a warning (at DEBUG or INFO level) when it encounters a run directory that has no metadata.json, naming the directory so the operator knows data was skipped
  2. The existing old-format directories are either migrated to the current schema or deleted (operator choice — the issue is about visibility, not preservation)

Out of scope

  • Automatic schema migration for future format changes
  • Changing the current metadata.json schema
  • Adding a version field to the schema (though that would help; it is a separate concern)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions