Skip to content

refactor: renew transient run-state and storage view contracts #235

Closed

Description

@Sinity

Ref #222

Outcome

Renew the transient pipeline/storage view layer so run planning, run results, and non-durable storage views use explicit typed contracts instead of broad dict-shaped payloads.

Problem or opportunity

The durable session-product runtime is now on typed count/status contracts, but the transient run-state layer still carries path-dependent broad containers: PlanResult, RunResult, pipeline run-state accumulation, and adjacent non-durable storage view models still rely on dicts and loose cursor/failure payloads. That keeps CLI/pipeline surfaces more ambiguous than the substrate beneath them.

Expected scope

Likely modules include:

  • polylogue/storage/state_views.py
  • polylogue/pipeline/run_state.py
  • polylogue/pipeline/run_finalization.py
  • polylogue/pipeline/services/planning_runtime.py
  • polylogue/storage/store_runtime_archive_records.py
  • adjacent tests under tests/unit/pipeline/ and tests/unit/cli/

Acceptance criteria

  • Non-durable run-state and planning/result contracts are modeled directly rather than through anonymous dict payloads.
  • Cursor, drift, and render-failure surfaces are materially tightened where they cross pipeline/CLI boundaries.
  • The tranche lands as a coherent PR with devtools verify green.

Verification plan

Run devtools verify before merge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions