Skip to content

Add summary growth model with logarithmic floor option#115

Closed
jimmytacks wants to merge 2 commits into
mainfrom
experiment/095-summary-growth-model
Closed

Add summary growth model with logarithmic floor option#115
jimmytacks wants to merge 2 commits into
mainfrom
experiment/095-summary-growth-model

Conversation

@jimmytacks
Copy link
Copy Markdown
Collaborator

Engine Change

Add summaryGrowthModel and summaryGrowthCoefficient parameters to enable realistic summary growth over long sessions.

Problem: Summary size converges to a fixed ceiling of interval / (ratio - 1) — at default settings, ~3.3k tokens regardless of how much history has been compressed. For 200-cycle sessions compressing 100k+ tokens, this is unrealistically small.

Solution: A logarithmic growth floor: floor = coefficient × ln(1 + totalCompressed / 1000). When enabled, summary size grows sublinearly with compressed history:

totalCompressed Floor (tokens) vs 3.3k convergence
10k 2,400 Below — no effect
30k 3,400 Just above — growth begins
100k 4,600 +39% above convergence
300k 5,700 +73% above convergence

Changes:

  • summaryGrowthModel: 'fixed' | 'logarithmic' (default: 'fixed' — preserves existing behaviour)
  • summaryGrowthCoefficient: number (default: 1000)
  • Floor applied in all strategies that produce summaries (1, 2 incl. meta-compaction, 4a-d)
  • New enum paramKind for sweep support of string enum parameters
  • Frontend: dropdown in Parameter Panel (coefficient shown only when logarithmic selected)
  • Sweep UI: enum checkboxes, numeric range for coefficient
  • 9 new tests (unit + integration): floor logic, backwards compatibility, cost impact

Closes #95

Test plan

  • All 195 tests pass (including 9 new summary growth tests)
  • TypeScript compiles cleanly
  • CI passes (lint, build, tests)

🤖 Generated with Claude Code

jimmytacks and others added 2 commits April 2, 2026 19:56
Add summaryGrowthModel ('fixed' | 'logarithmic') and summaryGrowthCoefficient
parameters to break the fixed summary convergence ceiling. When set to
'logarithmic', summary size grows as coefficient * ln(1 + totalCompressed/1000),
modelling that longer sessions need larger summaries to retain accumulated
knowledge.

- Apply floor in all strategies that produce summaries (1, 2, 4a-d)
- Add enum paramKind for sweep support of string enum parameters
- Frontend: dropdown in Parameter Panel, sweep UI with checkboxes
- 9 new tests (unit + integration) verifying floor logic and backwards compat
- Default 'fixed' preserves all existing behaviour and results

Closes #95

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add compressedTokens=0 arg to all evaluate() calls in strategy.test.ts
- Spread readonly enum values to satisfy mutable return type in sweep.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jimmytacks jimmytacks closed this Apr 3, 2026
@jimmytacks jimmytacks deleted the experiment/095-summary-growth-model branch April 3, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Summary growth model: allow summary size to grow sublinearly over long sessions

1 participant