Skip to content

refactor: introduce artifact graph and clarify health/readiness naming #199

Closed

Description

@Sinity

Problem

polylogue/health.py uses generic health language for a narrower concept: archive readiness. The current checks answer whether indexes are current, products are materialized, and stale/orphan state is absent. They do not prove parser correctness, schema validation quality, raw coverage, or broad data integrity.

The archive also has implicit artifact dependencies:

raw_conversations -> parsed conversations -> messages -> FTS index
                                       -> content_blocks
                                       -> session_profiles
                                       -> work_events -> work_threads
                                       -> session_phases
                                       -> tag_rollups
                                       -> day/week summaries

Readiness and repair logic rediscover parts of that graph through table-specific checks. Adding a new product type requires touching multiple places instead of declaring one dependency edge.

Scope

  1. Rename narrow health concepts to readiness concepts where that improves operator accuracy.
  2. Add an artifact graph that declares producer/consumer dependencies for archive and product artifacts.
  3. Use the graph for readiness checks, repair ordering, and invalidation where practical.

Acceptance criteria

  • CLI and code wording make the readiness scope explicit.
  • Artifact dependencies are declared in one module.
  • Adding a product artifact requires adding a graph edge rather than duplicating readiness and repair logic.
  • Readiness/repair tests prove the graph is used for dependency ordering.

Activity

  1. added
    type:refactor
    on Apr 16, 2026
  2. added 4 commits that reference this issue on Apr 22, 2026
    8c67f2d
    7b2b57e
    aa96272
    be5c607
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:storagetype:refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions