Skip to content

Split execution/evidence/ into distinct sub-packages (recording/, session-log cluster) #4967

Description

@Trecek

Summary

resolve-review on PR #4947 (the #4672 execution/ decomposition) found that execution/evidence/ bundles three unrelated concerns, purely because #4672 was a mechanical move driven by a file-count architecture gate (REQ-CNST-010), not a domain redesign:

  1. Session-log cluster (durable, cross-run history): session_log.py, _session_log_recovery.py, _session_retention.py, session_index.py
  2. Runtime observability signals (always-on): anomaly_detection.py, linux_tracing.py, otlp_sink.py
  3. Recording/replay tooling (env-var-gated, AUTOSKILLIT_RECORD_SESSION only): recording.py, _recording_skills.py

Two independent DISCUSS-investigation passes (PR #4947 local resolve-review) confirmed clusters 1 and 3 are self-contained enough to split into their own sub-packages, leaving cluster 2 as a coherent "observability" package with a natural one-line inclusion criterion.

Proposed changes

  • Split recording.py + _recording_skills.py out into a new execution/recording/ sub-package.
  • Split the session-log cluster (session_log.py, _session_log_recovery.py, _session_retention.py, session_index.py) into a new sub-package with a distinct name from the existing execution/session/ — reusing "session" would conflate this durable-log concern with execution/session/'s actual meaning (single-run result processing: _exit_classification, _session_outcome, _retry_fsm, etc.). Candidate: execution/session_log/ (not yet bikeshedded — track the naming choice via Tracking: Naming inconsistencies for a future consistency pass #4552).
  • After both splits, execution/evidence/ keeps only the observability trio and its AGENTS.md can state the unifying criterion ("runtime signals collected for post-hoc diagnosis") directly, instead of describing a heterogeneous grab-bag.

Compatibility-sensitive surface

Touches the execution/__init__.py and execution/evidence/__init__.py re-export gateways, covered by the test_gateway_reexports_pre_move_names / REQ-GATEWAY-PARITY contract tests in tests/contracts/test_package_gateways.py. Also touches execution/evidence/AGENTS.md and any direct-submodule imports in tests (e.g. tests/execution/test_session_log_retention.py imports _session_retention/_session_log_recovery directly).

Source

PR #4947 local resolve-review round — cohesion findings, DISCUSS verdicts (indices 28, 30, 52), independently re-investigated by a separate sub-agent pass before this ticket was filed. See also #4552 (naming-consistency tracker) for the sub-package naming discussion.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions