Skip to content

Add bounded retained-cost and yield telemetry - #230

Draft
chaoz23 wants to merge 1 commit into
mainfrom
agent/216-retained-cost-ledger
Draft

chaoz23 wants to merge 1 commit into
mainfrom
agent/216-retained-cost-ledger

Conversation

@chaoz23

@chaoz23 chaoz23 commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a bounded schema-v1 long-run telemetry ledger with inclusive lifecycle phases and pass-local first-to-last-sample cost/yield intervals
  • retain exact decimal byte-millisecond numerators for deterministic logical ownership and observed process RSS, with six separate useful-yield rates instead of a weighted score
  • expose the additive receipt on successful CLI JSON/JSON-stream output and persist validated per-window campaign cost plus explicit campaign-new yield
  • preserve canonical report/checkpoint payloads and identity inputs, legacy campaign observability, the 1,024-window planning envelope, and existing decision functions
  • bound campaign persistence and inspection with generated allocation, durable-session, and adaptive 32 KiB response checks

Validation

  • npm run --silent build
  • frozen serial full suite: 427 tests, 424 passed, 0 failed, 3 expected skips
  • npm pack --dry-run --json: 123 entries; package version remains 0.7.2
  • independent core, CLI, session, privacy, contract, and precommit audits: clear

Exact-head calibration

Compared exact main 4f756c88 with candidate 539d235 on one excluded warmup pair plus four counterbalanced measured Intercept pairs, one process at a time:

  • wall ratio of medians: +0.225%
  • max-RSS ratio of medians: -0.482%
  • paired medians: wall -0.414%, RSS -0.463%
  • worst positive pair: wall +2.169%, RSS +16.301% (an unusually low base-RSS outlier)
  • both primary <=5% gates passed
  • all 10 arms matched the exact 50,000-state / 297-ending / 29-knot / 0-error / maxStates-only workload and the same canonical-output hash after stripping only resources.longRunTelemetry

This is an overhead calibration, not a performance or memory-improvement claim.

Boundaries

Telemetry is observational and is not read by allocation, knee, forecast, shadow-policy, frontier, or stopping decisions. Collection still has bounded overhead and can move an execution already beside a memory/time guard.

This remains partial #216 work. Checkpoint/epoch/generic-pressure boundaries, complete exclusive-owner attribution, policy activation, default changes, InkBench promotion, and release publication remain out of scope.

Related: #216, #215

@chaoz23 chaoz23 added the enhancement New feature or request label Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant