Skip to content

feat(v3.3.5): Hermes-aligned compact policy bump — +30K thresholds + warn-summariser lift - #41

Merged
webdevtodayjason merged 1 commit into
mainfrom
feat/v3.3.5-hermes-compact
May 28, 2026
Merged

feat(v3.3.5): Hermes-aligned compact policy bump — +30K thresholds + warn-summariser lift#41
webdevtodayjason merged 1 commit into
mainfrom
feat/v3.3.5-hermes-compact

Conversation

@webdevtodayjason

@webdevtodayjason webdevtodayjason commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

Two narrow behavioral changes to components/evy/ aligning v3 Evy's auto-compact with the Hermes findings doc (.subctl/docs/hermes-compact-and-skills-findings.md §1.5 — landed in #39 as research artifact, now applied as code).

(1) Default token thresholds bumped +30K each in compact-policy.ts:

  • warn_tokens 25_000 → 55_000
  • compact_tokens 40_000 → 70_000
  • target_tokens 30_000 → 55_000

Calibrated for v3.3.x's default chat supervisor profile (Codex / gpt-5.5 class, 32K-128K windows depending on model) rather than the v2.7.3-era 65K LM-Studio loadout the original numbers were built around.

(2) runJitCompactCheck warn-action now calls compactTranscriptInline (server.ts). Pre-v3.3.5 the warn band emitted an SSE banner and returned without compacting; v3.3.5 also summarises, matching Hermes' "compact below the hard ceiling so the next turn fits" envelope. Distinct SSE initiator tags (jit-warn vs jit) preserve dashboard timeline distinction.

Pivot logged

Original /goal framing was Hermes-formula-literal (max(0.5 × ctx, 65_536) + three triggers + config.yaml + LLM-driven summariser). Inspection of components/evy/compact-policy.ts + runJitCompactCheck + compactTranscriptInline showed Evy's contract differs from Hermes in shape (two-stage absolute thresholds, JSON config, deterministic structured summariser). Findings doc §1.5 explicitly scoped the v3 Evy adaptation as "bump defaults +30K + lift summariser onto warn"; v4 Evy (Rust evy-thinking) gets the full Hermes treatment. This PR ships the §1.5-aligned scope; LLM summariser and config.yaml are explicitly deferred to v4.

Test plan

  • bun test components/evy/__tests__/compact-policy.test.ts — 26/26 pass with new defaults
  • bun test components/evy/__tests__/auto-compact.test.ts — 3 new contract tests for v3.3.5 bands (60k warn, full matrix, realistic warn shape)
  • Full evy suite: 1198 pass / 5 fail / 3555 expect() — the 5 failures are pre-existing on main (lmstudioAuthHeader env-token tests, unrelated)
  • bun build --target=bun components/evy/server.ts clean
  • Live verification on operator's actual chat after deploy — supervisor running profile=chat, fresh prompt should land in ok band, transcript growth should now compact at warn (55k) instead of at compact (was 40k pre-v3.3.4 — irrelevant comparison; new behavior is "compact at 55k")

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes v3.3.5

  • Changes

    • Increased default token thresholds for compaction warnings and triggers by ~30K tokens, affecting transcript handling when custom configuration is unavailable.
    • Compaction warning actions now automatically trigger inline compaction; dashboard labels distinguish soft vs. hard compaction events for better monitoring visibility.
  • Documentation

    • Updated changelog with v3.3.5 compact behavior details and verification notes.

Review Change Stack

…warn-summariser lift

Two narrow changes to components/evy/ aligning v3 Evy's auto-compact with
the Hermes findings doc (.subctl/docs/hermes-compact-and-skills-findings.md §1.5):

1. Default token thresholds bumped +30K each (compact-policy.ts):
   warn_tokens 25_000 → 55_000
   compact_tokens 40_000 → 70_000
   target_tokens 30_000 → 55_000

   Calibrated for the v3.3.x default supervisor profile (chat — Codex /
   gpt-5.5, 32K-128K windows) rather than the v2.7.3-era 65K LM-Studio
   loadout that the original 25k/40k pair was built around.

2. runJitCompactCheck — warn action now calls compactTranscriptInline
   (server.ts). Pre-v3.3.5 warn emitted an SSE banner and returned;
   v3.3.5 warn ALSO summarises, matching Hermes' "compact below the
   hard ceiling" envelope. Distinct SSE initiator tags (jit-warn vs
   jit) preserve dashboard timeline distinction.

Operators with explicit warn_tokens / compact_tokens in
~/.config/subctl/master/compact.json are unaffected — only defaults change.

Explicit non-goals (deferred to v4 Evy / Rust evy-thinking per findings §1.5):
- LLM-driven summariser replacing compactTranscriptInline
- config.yaml / compression.threshold knob (Evy uses compact.json)
- Post-API-error recovery trigger

Tests: compact-policy 26/26, three new auto-compact contract tests, full
evy suite 1198 pass / 5 fail (5 lmstudio failures pre-existing on main).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@webdevtodayjason
webdevtodayjason merged commit d2db85c into main May 28, 2026
0 of 2 checks passed
@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: beb51225-ceb8-4081-9ef1-58375737917d

📥 Commits

Reviewing files that changed from the base of the PR and between f843607 and ea4c5f5.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • VERSION
  • components/evy/__tests__/auto-compact.test.ts
  • components/evy/__tests__/compact-policy.test.ts
  • components/evy/compact-policy.ts
  • components/evy/server.ts

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Walkthrough

Evy's compact-policy defaults are increased across three thresholds (warn, compact, target) by 30K tokens each, and the JIT compact gate's warn action now triggers inline compaction with distinct SSE labels. Tests validate the new defaults and warn-band behavior.

Changes

Evy v3.3.5 Compact-Policy Defaults and Warn-Action Behavior

Layer / File(s) Summary
Default compact-policy thresholds
components/evy/compact-policy.ts, components/evy/__tests__/compact-policy.test.ts
DEFAULT_COMPACT_CONFIG thresholds updated: warn_tokens 25K→55K, compact_tokens 40K→70K, target_tokens 30K→55K. Tests assert these new defaults when config file is missing or JSON is malformed.
JIT compact gate warn-action behavior
components/evy/server.ts
runJitCompactCheck now performs inline compaction when warn action is triggered (previously returned early). Distinct initiator/stage/logLabel are computed to allow dashboards to distinguish soft vs hard compaction. Post-compaction logging unified across ok/noop/error outcomes.
Test coverage for v3.3.5 default-bump behavior
components/evy/__tests__/auto-compact.test.ts
New test suite validates the warn-band classification for ~60K transcripts, verifies the action matrix across ok/warn/compact thresholds, and ensures synthetic transcripts produce token counts within the 55k–70k warn band.
Version and release documentation
VERSION, CHANGELOG.md
Version bumped to 3.3.5 and changelog entry documents token threshold increases, warn-action behavior change, explicitly excluded features, and test verification.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Three thresholds grew by thirty each,
a warn now runs where once we'd teach—
soft compaction hides no more,
the labels tell what stage's in store!
Tests validate the bumped-up band,
v3.3.5 takes a stand.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/v3.3.5-hermes-compact

Comment @coderabbitai help to get the list of available commands and usage tips.

@webdevtodayjason
webdevtodayjason deleted the feat/v3.3.5-hermes-compact branch May 28, 2026 18:31
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.

1 participant