Skip to content

Trace: record Pi root context and compactions #3721

Open

Description

@waveywaves

Problem

Pi Trace evidence has session-wide token totals but not root-session context-window occupancy or native compaction events. The broader multi-provider request is #3637.

Scope

Pi root selected branch only. Add the minimum machine-readable context size, peak/final occupied tokens, and compaction count that native Pi 1.3.0 records can substantiate.

Acceptance criteria

  • Identify Pi's authoritative window size and per-turn occupancy from pinned transcript/model metadata; do not infer a denominator from a model name when Pi does not provide one.
  • Record root-session peak/final context and native compaction count with explicitly versioned evidence fields; percentages appear only with a verified window size.
  • Count selected-branch and resumed history exactly once; exclude abandoned branches and child sessions.
  • Cover empty, malformed, missing-window, and multi-compaction transcripts in deterministic regressions.
  • Validate the evidence schema/consumer compatibility and a live Pi session before updating only the measured Pi matrix cell.

Non-goals

Parent: #3637. Baseline Pi provider: #3704.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions