Skip to content

refactor: align artifact graph tooling with archive readiness - #269

Merged
Sinity merged 2 commits into
masterfrom
feature/refactor/artifact-graph-readiness-renewal
Apr 20, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/refactor/artifact-graph-readiness-renewal

Conversation

@Sinity

@Sinity Sinity commented Apr 20, 2026 •

Copy link
Copy Markdown
Owner

Closes #199

Summary

  • rename archive health types and operations to readiness across the substrate
  • align artifact graph, maintenance, MCP, and benchmark/tooling surfaces with the readiness vocabulary
  • regenerate docs and update tests/showcase fixtures to the new names

Problem

#199 called out that the project used generic "health" naming for a much narrower concept: archive readiness. Even after the artifact graph and related maintenance machinery existed, the graph-facing tooling, MCP surfaces, generated docs, and tests still mixed health/readiness terminology and exposed stale operation names.

Solution

  • rename polylogue/health.py to polylogue/readiness.py and shift the report/check APIs to Readiness*
  • rename artifact, operation, and maintenance-target readiness surfaces so graph-driven readiness and doctor workflows use one vocabulary
  • propagate the rename through CLI/MCP resources, synthetic benchmark catalogs/runtime, validation-lane docs, showcase catalogs, and tests

Verification

  • devtools verify

@coderabbitai

coderabbitai Bot commented Apr 20, 2026 •

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR systematically renames "health" terminology to "readiness" across the codebase to clarify that checks measure narrow archive readiness (index currency, product materialization) rather than broad system health. The refactoring updates API names, dataclass/class names, artifact and operation identifiers, artifact path names, devtools catalogs, validation lanes, CLI commands, MCP tools, documentation, and all related tests consistently.

Changes

Cohort / File(s) Summary
Core Readiness Module
polylogue/readiness.py
Renamed public API from HealthReport/HealthCheck to ReadinessReport/ReadinessCheck; renamed functions get_health→get_readiness, run_archive_health→run_archive_readiness, run_runtime_health→run_runtime_readiness, quick_health_summary→quick_readiness_summary; updated constant HEALTH_TTL_SECONDS→READINESS_TTL_SECONDS and internal helper names.
Artifact Graph & Operations
polylogue/artifacts.py, polylogue/operations/specs.py, polylogue/scenarios/operational_surfaces.py
Renamed artifact nodes action_event_health→action_event_readiness, session_product_health→session_product_readiness, retrieval_band_health→retrieval_band_readiness, archive_health→archive_readiness; renamed artifact paths and operation specs from *-health-* to *-readiness-*; changed OperationKind.HEALTHCHECK→OperationKind.READINESSCHECK; updated ArtifactNode.health_surfaces→readiness_surfaces.
Maintenance Targets
polylogue/maintenance_targets.py, polylogue/maintenance_models.py
Renamed MaintenanceTargetSpec fields: include_preview_when_healthy→include_preview_when_ready, doctor_health_operation→doctor_readiness_operation, include_in_archive_health→include_in_archive_readiness, archive_health_unhealthy_status→archive_readiness_unready_status, archive_health_requires_deep→archive_readiness_requires_deep; renamed MaintenanceTargetCatalog methods archive_health_specs()→archive_readiness_specs() and doctor_health_operations_for_names()→doctor_readiness_operations_for_names().
CLI Workflows & Commands
polylogue/cli/check_workflow.py, polylogue/cli/check_models.py, polylogue/cli/check_maintenance.py, polylogue/cli/check_rendering_plain.py
Updated CheckCommandResult report type annotations from HealthReport to ReadinessReport; switched CLI check workflow to call get_readiness/run_runtime_readiness instead of get_health/run_runtime_health; renamed build_health_lines()→build_readiness_lines(); updated parameter types in build_preview_counts() and persist_maintenance_run().
CLI Helpers & Summary
polylogue/cli/helpers.py, polylogue/cli/helper_summary.py
Renamed helper exports from get_health/quick_health_summary to get_readiness/quick_readiness_summary; updated print_summary_impl() parameters and label output from "Health" to "Readiness".
CLI Storage & Reset
polylogue/cli/query_stats.py, polylogue/cli/commands/reset.py
Changed stats query from embedding_health_status to embedding_readiness_status; removed health cache deletion (data_home()/health.json) from reset command.
MCP Integration
polylogue/mcp/payloads.py, polylogue/mcp/server_resources.py, polylogue/mcp/server_tools.py, tests/infra/mcp.py
Renamed payload classes MCPHealthCheckPayload→MCPReadinessCheckPayload, MCPHealthReportPayload→MCPReadinessReportPayload; changed MCP resource from polylogue://health to polylogue://readiness; renamed tool from health_check to readiness_check; updated test expectations to use new resource/tool names.
Storage & Stats
polylogue/lib/stats.py
Renamed ArchiveStats property embedding_health_status→embedding_readiness_status.
Scenario Execution & Surfaces
polylogue/scenarios/execution.py, polylogue/scenarios/operational_surfaces.py
Updated _metadata_for_polylogue_doctor() and _metadata_for_polylogue_embed() to use doctor_readiness_operations_for_names() and operation names project-*-readiness; renamed operational surface family "doctor-health"→"doctor-readiness" and variant "live-health-json"→"live-readiness-json".
Exercise & Benchmark Catalogs
polylogue/showcase/exercise_catalog.json, devtools/synthetic_benchmark_catalog.py, devtools/synthetic_benchmark_runtime.py
Renamed exercise from "doctor-health" to "doctor-readiness"; renamed benchmark campaign and runner from "startup-health" to "startup-readiness", with associated metrics/targets renamed to readiness variants; renamed function run_startup_health_campaign()→run_startup_readiness_campaign().
Validation Lane Catalogs
devtools/validation_lane_catalog_composites.py, devtools/validation_lane_catalog_contracts.py
Renamed composite member identifier from "live-health-json" to "live-readiness-json"; updated lane target identifiers, descriptions, and tags from health to readiness semantics (e.g., archive_health→archive_readiness, *-health-*→*-readiness-*).
Devtools Support
devtools/artifact_graph.py, devtools/campaign_report.py, devtools/query_stats.py
Updated artifact graph rendering to use target.doctor_readiness_operation; changed campaign report metric from total_health_s to total_readiness_s; renamed benchmark campaign entry.
Documentation
docs/test-quality-workflows.md
Updated all lane descriptions and scenario projections from health to readiness terminology; replaced live-health-json with live-readiness-json; renamed benchmark campaign from startup-health to startup-readiness; updated all downstream operation/artifact target references to use readiness names.
Core Tests
tests/unit/core/test_*.py, tests/unit/operations/test_*.py
Updated artifact graph test expectations to use readiness node/path/operation names; updated artifact specs test assertions; renamed test classes and updated imports from health to readiness; updated maintenance targets test expectations for doctor_readiness_operation and archive_readiness_specs().
CLI & MCP Tests
tests/unit/cli/test_*.py, tests/unit/mcp/test_*.py
Renamed test classes from health to readiness; updated imports from polylogue.health to polylogue.readiness; renamed test functions; updated monkeypatch targets and mock assertions; changed expected MCP resource/tool names.
Devtools & Scenario Tests
tests/unit/devtools/test_*.py, tests/unit/scenarios/test_*.py, tests/unit/showcase/test_*.py
Updated artifact graph, benchmark campaign, execution specs, quality registry, and validation lane test assertions to use readiness operation/artifact names; renamed test expectations for operational surfaces and runtime scenarios; updated exercise catalog test assertions.
Storage Tests
tests/unit/storage/test_fts5.py
Updated test to use get_readiness() instead of get_health().

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • refactor: renew source and showcase boundary contracts #228: Both PRs modify maintenance target metadata surface — this PR renames doctor_readiness_operation fields and catalog methods, while #228 adds CampaignResult.maintenance_targets populated from ScenarioMetadata, creating direct interdependency on the renamed fields and methods.

Suggested labels

refactor, terminology, area:core, area:cli, area:testing

🐰 From health to readiness we hop,
Where indexes bloom and products don't stop!
The artifact graph now clear and bright,
No stale debris, just future in sight—
Archive ready, shining with might! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.24% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'refactor: align artifact graph tooling with archive readiness' clearly and concisely summarizes the main change: renaming health terminology to readiness across artifact graph-related tooling.
Description check ✅ Passed The PR description addresses all template sections: Summary explains what changed and why, Problem states the necessity, Solution details the approach, Verification provides exact commands, and Risks section is appropriately omitted.
Linked Issues check ✅ Passed The PR fully addresses issue #199's acceptance criteria: health terminology is replaced with readiness throughout code/CLI, artifact graph is declared in polylogue/artifacts.py with ArtifactNode/ArtifactPath definitions, and graph-driven readiness/repair logic uses the unified vocabulary.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #199 objectives. Comprehensive renaming spans health→readiness across artifact graph, maintenance targets, MCP surfaces, operations, CLI helpers, benchmarks, validation lanes, and tests—all within scope of clarifying readiness naming and declaring the artifact graph.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/artifact-graph-readiness-renewal

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sinity
Sinity merged commit 046d6eb into master Apr 20, 2026
14 of 15 checks passed
@Sinity
Sinity deleted the feature/refactor/artifact-graph-readiness-renewal branch April 20, 2026 11:35
Sinity added a commit that referenced this pull request Apr 22, 2026
Closes #199

## Summary
- rename archive health types and operations to readiness across the substrate
- align artifact graph, maintenance, MCP, and benchmark/tooling surfaces with the readiness vocabulary
- regenerate docs and update tests/showcase fixtures to the new names

## Problem
`#199` called out that the project used generic "health" naming for a much narrower concept: archive readiness. Even after the artifact graph and related maintenance machinery existed, the graph-facing tooling, MCP surfaces, generated docs, and tests still mixed health/readiness terminology and exposed stale operation names.

## Solution
- rename `polylogue/health.py` to `polylogue/readiness.py` and shift the report/check APIs to `Readiness*`
- rename artifact, operation, and maintenance-target readiness surfaces so graph-driven readiness and doctor workflows use one vocabulary
- propagate the rename through CLI/MCP resources, synthetic benchmark catalogs/runtime, validation-lane docs, showcase catalogs, and tests

## Verification
- `devtools verify`
Sinity added a commit that referenced this pull request Apr 22, 2026
#199 called out that the project used generic "health" naming for a
much narrower concept: archive readiness. Even after the artifact
graph and related maintenance machinery existed, the graph-facing
tooling, MCP surfaces, generated docs, and tests still mixed
health/readiness terminology and exposed stale operation names.

Renames `polylogue/health.py` to `polylogue/readiness.py` and shifts
the report/check APIs to `Readiness*`. Renames artifact, operation,
and maintenance-target readiness surfaces so graph-driven readiness
and doctor workflows use one vocabulary. Propagates the rename
through CLI/MCP resources, synthetic benchmark catalogs/runtime,
validation-lane docs, showcase catalogs, and tests.

Verification: devtools verify green.

Closes #199
Sinity added a commit that referenced this pull request Apr 22, 2026
#199 called out that the project used generic "health" naming for a
much narrower concept: archive readiness. Even after the artifact
graph and related maintenance machinery existed, the graph-facing
tooling, MCP surfaces, generated docs, and tests still mixed
health/readiness terminology and exposed stale operation names.

Renames `polylogue/health.py` to `polylogue/readiness.py` and shifts
the report/check APIs to `Readiness*`. Renames artifact, operation,
and maintenance-target readiness surfaces so graph-driven readiness
and doctor workflows use one vocabulary. Propagates the rename
through CLI/MCP resources, synthetic benchmark catalogs/runtime,
validation-lane docs, showcase catalogs, and tests.

Verification: devtools verify green.

Closes #199
Sinity added a commit that referenced this pull request Apr 22, 2026
#199 called out that the project used generic "health" naming for a
much narrower concept: archive readiness. Even after the artifact
graph and related maintenance machinery existed, the graph-facing
tooling, MCP surfaces, generated docs, and tests still mixed
health/readiness terminology and exposed stale operation names.

Renames `polylogue/health.py` to `polylogue/readiness.py` and shifts
the report/check APIs to `Readiness*`. Renames artifact, operation,
and maintenance-target readiness surfaces so graph-driven readiness
and doctor workflows use one vocabulary. Propagates the rename
through CLI/MCP resources, synthetic benchmark catalogs/runtime,
validation-lane docs, showcase catalogs, and tests.

Verification: devtools verify green.

Closes #199
@Sinity

Sinity commented May 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@Sinity
Sinity requested a review from Copilot May 1, 2026 01:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: introduce artifact graph and clarify health/readiness naming

2 participants