Skip to content

[long-run] Add versioned retained-resource and semantic-yield interval telemetry #216

Description

@chaoz23

Parent: #215. Extends the shipped #98 accounting; does not reopen #98.

Product outcome

Let a creator or agent see what a long InkCheck run retains, what useful evidence each interval adds, and whether post-discovery work is converting memory and time into author-facing value. Keep raw throughput separate from semantic yield.

Contract

  • Add a versioned bounded-interval sample with deterministic transition position and observational elapsed/process-resource fields.
  • Attribute current and peak counts/bytes to pending and active state payload, exact dedupe, ancestry/witnesses, semantic indexes, frontier references/node slots, findings, checkpoint buffers, and finalization reserve.
  • Define component ownership so shared backing is charged once; report deterministic logical estimates separately from V8 heap/RSS/external memory and an observational unattributed remainder.
  • Record a yield vector, not one score: critical findings, approved intent/stages, authored locations/choice edges, visible-outcome fallback, bounded meaningful variable transitions, exact terminal variants, and raw state territory.
  • Distinguish first useful/critical discovery from post-first-discovery yield, including bounded dry-gap summaries and campaign-new versus rediscovered identities.
  • Keep progress and compact MCP output privacy-safe and bounded; full detail remains drill-down data.
  • A policy decision is a pure function of persisted sample inputs. Wall time may bind a ceiling but must not silently perturb frontier order.

Acceptance criteria

  • Samples appear at a fixed transition cadence, epoch/checkpoint boundaries, pressure actions, and termination.
  • Every major retained owner has current/peak count and byte fields; totals are internally consistent and clearly labeled as logical estimates or observed process metrics.
  • Visible outcomes, assertion violations, goals, and stages can independently trigger the interval record that contains them.
  • Reports distinguish early discovery from post-discovery yield and expose category-specific per-million-transition and retained-GiB-minute inputs without an opaque aggregate score.
  • Identical source/config/seed/policy/sample ledger produces identical structural actions and semantic identities.
  • Tests cover zero-yield, late recovery, assertion/goal boundaries, large finding sets, logical-versus-RSS separation, sample compaction, and privacy/response bounds.
  • Calibration records telemetry overhead; promotion requires no more than 5% wall/RSS overhead or explicit accounting.

Non-goals

  • Activating shadow long-tail allocation.
  • Treating terminal multiplicity or raw state novelty as actionable value.
  • Choosing checkpoint encoding or next-window size.

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions