Skip to content

v0.31.0

Choose a tag to compare

@github-actions github-actions released this 02 Dec 02:15
· 1911 commits to main since this release
1e99569

v0.31.0: compaction that can work down to a depth target, and background leaf preparation that keeps out of the way

v0.31.0 is a minor release on v0.30.4. It also carries the v0.30.5 compaction fixes (#1250, ported by #3131). Its two new features are off by default: the depth target (LCM_DEPTH_TARGET_RATIO, default 0) and background leaf preparation (LCM_BACKGROUND_LEAF_PREP_ENABLED, default false).

Changes since v0.30.4

  • The v0.30.5 compaction fixes (#1250, ported by #3131), the same as v0.30.5-rc1. One shape of #1250 still stalls; see Known issues.

    • Compaction publishes again for a session whose early rows were stored under its session id and that later bound to its gateway conversation. On v0.30.0 to v0.30.4 every pass of such a session paid for a summary call and published nothing; nothing was lost.
    • When the session moves to its gateway conversation, its latest un-summarized turn is not stored a second time.
    • A window bound to the session id that comes back does not store the moved rows again.
    • When two windows compact the same session, the one that lost rows to the other says why: /lcm status shows last_compression_failure_reason: session_owned_by_other_window, and /lcm doctor explains it in plain words on its compaction: line. It logs one warning and stops paying for summary calls that would be refused, until it publishes or restarts.
    • /lcm doctor counts possible copies from two windows on one session (two_window_replay_copies), read-only.
  • Prepared leaves publish first (#3187, new in rc2). With background preparation on and decision extraction off, a compaction pass that has prepared leaves ready publishes them before it condenses the summary prefix. Publishing a prepared leaf makes no model call. With preparation off (the default), a pass runs as on v0.30.4 plus the v0.30.5 fixes.

    • Prepared-leaf publication in that pass is bounded by the step deadline only, not by the soft target, the route estimate or the reserve. So where publication stops is not the same as on rc1 for those passes (release review R6, P3).
  • New: a depth target (#2838). LCM_DEPTH_TARGET_RATIO lets an automatic compaction pass keep going until the prompt is down to that share of the model window, instead of stopping just under the trigger. LCM_SUMMARY_PREFIX_TARGET_RATIO sets the summary budget as a share of the window when the tokens setting is unset. With a target set, see the #2869 known issue below.

    • Depth-target passes leave room for proactive recall. They stop once a committed summary already meets the target, and they treat a target equal to the trigger as off. If the fallback path fails after the publication lock, they return through the replay-safe recovery path (#2848, #2842).
    • With a depth target set, a pass can continue toward it after its first stored leaf or condensed node, within a bounded catch-up budget. Explicit foreground settings of 60 s soft and 120 s hard count as defaults (#2878).
  • Background leaf preparation (#787).

    • It yields to active turns and to foreground compaction. After a quota or billing refusal it pauses across the profile for the configured spend backoff. It logs each call's token estimate, duration and outcome.
    • When a depth target is set below the default low water, preparation aims at the target itself. The fresh tail stays protected.
    • It can summarise a stored preserved objective or task list inside a leaf. The foreground takes over if the prepared coverage differs from what the host shows.
  • The pre-API deadline yield, part of #2924. Every pass that ingests logs walk= and reruns= on its LCM compaction stop: line. The yield needs a Hermes that tags pre-API compression dispatches (upstream from 63f68522). #2924 stays open; see Known issues.

Also on by default, and named here as C5 finding K1 asked:

  • the #2924 deadline yield, on a Hermes that tags pre-API compression dispatches;
  • the host idle cap on the foreground hard bound. It keeps the foreground pass's hard time limit below the profile's compression.context_timeout_seconds, and has no effect at default settings.
    The deadline yield is on by default: an automatic pre-API pass whose ingest uses up the foreground budget reports deadline_yield and takes the ordinary no-leaf exit, so no summary call starts. Its ingest stays committed. On older hosts, behaviour equals v0.30.4.
    With both new settings unset, compaction otherwise behaves as on v0.30.4 plus the v0.30.5 fixes.

Known issues

  • Everything listed under Known issues for v0.30.5-rc1 still applies, except where this release changes it, including #2507 and #1506 (C1b KNOWN).
  • The v0.30.5-rc1 known issues it marked "until v0.31.0" or "planned" or "tracked for v0.31.0" are not fixed in this release, and still apply. In particular, keep only one window compacting a given session (#2938). The others are #3048, #3060, #3064, #3091, #3092, #3102, #3103, #3127, #3128 and #3129, and the planned cache for the head-copy lookup (#3062). They are tracked for a later release.
  • Open P0 issues. Every issue labelled P0 that applies to v0.31.0 is listed below, in four groups. v0.30.4 users already have all of them. Of the 24 issues labelled P0 today, all 24 are open and listed here. This release fixes two of them in part (#1250 and #2924), in the first group.
  • Two P0 issues this release fixes in part; both stay open.
    • A session whose early rows were stored under its session id can stop publishing after it binds to its gateway conversation (#1250, P0). This release fixes the stall in the report: such a session compacts again. But rows that a summary skips at that point stay behind. On the reporter's own copy, 17 of the session's 18 early rows have no summary over them, and in our reproduction of that shape they are not in the prompt the model sees, then or on later turns, and later passes do not pick them up. Nothing is lost: they stay stored, and unscoped lcm_grep, or lcm_expand with a row's store id, still finds them. A fix is first in line for v0.31.1. One shape still stalls: a window bound to the session id summarised the early rows before the gateway conversation bound. Then the gateway's window refuses its passes, and it now says why: /lcm status shows session_owned_by_other_window. Nothing is lost. A fix for that shape is in progress.
    • A long ingest step can run past the foreground time bound, because the bound is checked only between steps (#2924, P0). One step ran 222.5 s against a 200 s bound. This release shortens the slow step: the same restart-walk changes, measured on the v0.30.x line before they were ported here unchanged, cut a cold restart ingest with no cursor match on synthetic stores shaped like a real one from over 150 s (3,200 rows) to 8.6 s (17,815 rows). A pass whose ingest uses up the budget now yields before any summary call. A deadline check inside ingest is not in this release. The issue stays open until a live read confirms that restart ingest takes seconds.
  • Eight P0 issues from earlier releases are still open (seven, and #3211, split from #2819), and each is unchanged in this release.
    • Compaction commits can rewrite the prompt cache when they do not shrink the prompt (#2854, P0). Present since v0.30.0. v0.30.1 stopped the rewrite for passes that publish nothing; trim-only passes can still rewrite it.
    • A leaf's summary input is not bounded by the chunk setting when its range holds hidden stored rows (#2869, P0). Present since v0.30.0. The call can then be several times the chunk size and time out. Nothing changes at default settings.
      • With a depth target set (off by default), the new catch-up lets a pass make more leaf calls and run longer, so each pass has more chances to meet this. Each catch-up call stays bounded by its own timeout, and each leaf's input is chosen as before. How often this happens has not been measured.
    • A forced pass can consume a tool call with wrapped base64 arguments, and its result, without summarising them (#2890, P0). Present since v0.30.0.
    • A compaction pass can return a list larger than its input (#2982, P0), when its leaves cover mostly hidden rows and copies. The host then trims tool outputs or refuses the pass. Present since v0.30.1 at the latest (first listed in its notes).
      • This release adds one thing nearby: a pass that yields at its deadline (#2924) no longer starts the no-progress hold. That pass stores no leaf, so it cannot return a larger list (compaction.py: the hold at 1107-1110 and 3749-3752; the yield only after the deadline, at 2875-2884, and only with no leaf, at 1402).
    • After the host refuses a pass, its rollback can be lost in rare cases (#3001, P0): a restart or crash inside a short window, or a busy session end then a rebind. The next ingest can then store the previous summary head as a new user row. Present since v0.30.1, which added the rollback.
    • After the host refuses a pass that stored leaves, rows at or below the frontier never map, so compaction stops until the survival cut (#3006, P0). Present since v0.30.0.
    • After a pass escapes more retained rows than its memo keeps (256), later passes can refuse every leaf, so compaction stops and the backlog grows (#2819, P0). Present since v0.30.2 at the latest, unchanged in this release. Nothing is lost. A fix that stops new stalls is being built for v0.31.1.
      • A store that is already stuck stays stuck after that fix (#3211, P0). Workaround: start a new session (for example /new). Earlier messages stay stored and searchable, but they are not summarised into the new session, and the old session should not be resumed. Starting a new session is a real cost for users whose session carries their agent's continuity: the old session's messages leave its live context and are reached only through recall. This was checked on a test store built from the reporter's numbers, not on a live store.
  • Eight more open P0 issues from earlier releases. Where this release touches nearby code, the line says so.
    • After a compaction in the middle of a turn, Hermes can overwrite LCM-X's head row with the plain prompt (#3126, P0). The summary of the older history then leaves every later request in that session, so the model no longer sees it, and the prompt cache is rewritten. The stored rows and summaries are kept, and the dropped summary can still be found with lcm_grep and opened with lcm_expand. Measured on v0.30.0; the LCM-X code involved is unchanged in this release. No fix is planned yet. The Hermes issue it depends on, NousResearch/hermes-agent#157402, is open, and the LCM-X guard proposed in #3126 is not yet specced.
    • A cold ingest of a long conversation can run past the host's 30-second hook limit (#2975, P0). The user waits; nothing is lost. Seen on v0.30.2. This release includes three changes that lower the walk's cost without changing what is stored; whether they bring a real-shaped store under the limit has not been measured yet.
    • In one long session, automatic compaction can make no progress: every pass stops at a retained row with no leaf, and it retries each turn, at 10 to 75 seconds a pass (#2815, P0). Nothing is lost. Seen on v0.30.0. This release does not change the retained-stop path. A pass that yields at its deadline (the default-on #2924 deadline yield) arms no no-progress hold, so passes may be retried more often; nothing is lost.
    • A turn-start compaction pass can run on unchanged history and make no progress (about 66 seconds in one turn), and the no-progress hold does not survive an agent rebuild (#1880, P0). Nothing is lost. Seen on v0.29.0. A pass that yields at its deadline (the default-on #2924 deadline yield) arms no no-progress hold, so passes may be retried more often; nothing is lost.
    • Compaction can log repeated publication_invariant_conflict warnings and repeat passes that do not shrink the context (#1555, P0). Seen on v0.27.0. This release's publication-ownership change (part of #1250) removes or paces some of these warnings. The shape where a new session binds at frontier 0 is unchanged.
    • On a small (64K) window, one compaction can be followed by passes that do nothing while the prompt keeps growing (#2863, P0). Seen on v0.30.0. On v0.30.2 the reporter's host no longer stops; hosts without the re-anchor stay with #2918.
    • With LCM_HOST_MESSAGE_UID=on (not the default), a cold bind can store known rows a second time when the uid walk stops at the first row whose bytes differ (#2910, P0). Nothing leaves the returned list; recall can return copies.
    • A tool result stored without a tool name can be stored again, with every reply after it, at each cold bind of a gateway session (#2886, P0). Nothing is lost; recall can return the copies. v0.30.1 fixed part of this (PR 2916). Copy sets made before then, and replays after a compaction, are still open.
  • Six P0 issues carried from the v0.30.5-rc1 notes, as described there.
    • A store already stuck behind an old hidden-only leaf stays stuck (#1141, P0). Seen on v0.28.1. There is no known way to reach this state at default settings, and no in-place repair or workaround yet.
    • Compaction can stop on the same row at every pass (#1162, P0). Reported on a v0.30.1 release candidate. There is no workaround yet.
    • When the host changes a tool result, ingest can store the calling row and an unchanged sibling row a second time (#2781, P0). Nothing is lost; recall can return those rows twice. Seen with LCM_HOST_MESSAGE_UID=on.
    • The first ingest after a host change can be slow, with compaction waiting behind it (#2818, P0). In the test cell it takes 38 to 40 seconds, over the 30-second bar.
    • Compaction passes can free no host rows while the walk crosses stored rows the host no longer shows (#3081, P0). On a long-running store, compaction can run for two to three minutes on about a dozen turns in a row, and the context does not shrink. There is no workaround.
    • After a restart, a tool call and its stubbed result can be stored a second time, and on a large store the first turn can wait about 75 seconds (#1674, P0). Recall can show the copies; nothing is lost.
  • With preparation on, a refused first prepared leaf ends the pass before the summary prefix is condensed (#3189, P2). If the first prepared leaf is refused at publication (a fence conflict or a SQLite lock), that pass publishes and condenses nothing, and the oversized summary prefix waits for the next pass. Nothing is lost. This corrects the rc2 notes, which said such a pass makes the same calls as on rc1: it makes fewer.
  • lcm_status can show budget_exhausted=false after a time cut in that deferred condensation, beside pre_leaf_condensation_stop_reason=time_budget_exhausted (#3189, P3). Read the stop-reason field.
  • With a very slow route estimate, a pass that published prepared leaves can still start its first model call, as a pass without prepared leaves already does (rc2).
  • The "LCM depth target missed" log line can report a prompt size well above the real one after a pass. It converts the pass's savings with one ratio measured before the pass. Read the size from the provider's count.
  • With preparation on, a prepared chain can be refused on every pass, not only after a restart. The walk that matches prepared leaves to the host's list is cut short by the token budget the foreground uses for one leaf, so the chain does not match. Those passes then write their own leaves, and can stop short of the depth target. Nothing is lost. A fix is planned in v0.31.1.
  • After a gateway restart, the first pass can also refuse its prepared leaves, because some rows are stored again at the restart (#1674, open; not fixed in this release). As above, that pass then summarises those rows itself. Nothing is lost, and that pass is slower.
  • On Hermes 0.21.3 only, the install scan lists one extra medium finding, 'references shell startup file', for leaf_prep.py. It is a false match on an attribute named profile; leaf_prep.py never reads or writes a shell startup file. Hermes 0.21.5 and later do not show it, and the install verdict is unchanged.
  • With background preparation on, a compaction pass can, in rare row orders, leave two of the user's messages out of both the summary and the visible context until the next compaction. They stay stored and searchable. A fix is planned after v0.31.0 (#3191). The same can happen to a tool result that arrives late, or is repeated, after its call was used in a prepared leaf: it stays stored and searchable, and reaches a summary with a later leaf. v0.31.1 refuses that case.
  • On Hermes older than 0.21.6, a /retry or /undo followed by later gateway restarts stores growing copies of earlier replies (pre-existing: v0.30.4 has it; not new in v0.31.0; refs #1573 and #1674). After the session diverges once, each later restart stores another copy of every earlier reply, so the copies grow by one per earlier reply per restart. In a real-gateway run on v0.31.0-rc2 (identical to v0.30.4), one /retry and two restarts left 20 stored rows for a 10-row transcript: 8 linked copies, 1 at the retry, 3 at the first restart and 4 at the second. A no-retry control at the same restarts stored 8 rows for 8. Every copy is linked to its original (possible_replay_of), and no text is lost. Remedy: update Hermes to 0.21.6 or later, where replayed replies carry message ids that bind them; a retry followed by restarts has not yet been run on such a host.
  • Background preparation can stay paused across a profile when a host passes different turn ids at the start and end of one turn; this needs preparation switched on (#3185).
  • The release review's rollback P2: see the rollback section (#3136).

Upgrade and rollback

  • Upgrade. No schema change. When compaction moves a session's rows to its gateway conversation (the #1250 re-own), it writes new keys into the existing metadata table.
  • Rollback. Take a SQLite-safe backup first (see docs/operator-guide.md), then install v0.30.4. It ignores the new settings.
    • Copies after a rollback (T1-691 GA condition): after a rollback, a window bound to the session id that comes back can store a copy of the rows that this release moved to the gateway conversation, on each restart. Nothing is lost (#3136).

Qualification

The GA tag is the v0.31.0-rc2 tree (6399091) plus these notes. Receipts are attached to this release, with local paths removed. v0.31.0-rc1 (bd4cf29) was qualified first; its receipts are evidence only.
A scorecard cell says "not measured for this release" when this release has no gate result for that objective. Every result below is from bench or CI runs, not from a live deployment.

Objective v0.31.0 result
Kept in store The upgrade and rollback roundtrip with v0.30.4 lost, changed and duplicated 0 rows. The D9 pass accounted for every row it took out of the list. D7 dropped 0 rows. The exceptions are copies, with nothing lost: the restart copies (#1674), the copies after a rollback (#3136), and the /retry copies on Hermes older than 0.21.6 (see Known issues). Receipts: L1-RECEIPT, D9-D12, D7.
Kept in view Not measured for this release. The known issues name the cases where stored rows can leave the view until the next compaction (#3191).
Used correctly M1: 0 changed recall results over 25 questions against v0.30.4. M2: 26 of 30 correct on both. C4: 0 changed recall results over 500 questions, with R@10 0.8733 on both. D7 kept 0.91 of the facts against a 0.80 floor. Receipts: M1, M2, L1-RECEIPT.
At shipped defaults Not measured for this release. Both new features are off by default.
Any harness Not measured for this release. The live soak on seven host builds, Phase C, was not run.
Unnoticed D7: a mean turn wait of 5.1 s and a compaction wall p90 of 42 s over 186 turns. A D9 compaction pass completes in about 5 s, where v0.30.4's ran out of time at about 75 s. Receipts: D7, D9-D12.
  • Receipts (attached to this release, local paths removed; checksums in SHA256SUMS):
  • Authorized exceptions: the "v0.31.0 only" row of the decision table in bench/specs/RELEASE-READINESS-V1.md records each row that did not run or is not green, with its raw verdict and the decision behind it.
  • CI on the rc2 commit: all 9 required checks pass (lint, the tests on Python 3.11 to 3.14, the test-count check, the bench tests, the workflow lint and the differential), and the plugin version matches the tag.
  • Before rc2 was cut: the reliability matrix on the fix's branch, compared cell by cell with v0.30.4's run: no new failure.
  • The smoke stage (L1) on rc2:
    • Upgrade and rollback roundtrip with v0.30.4: passes (0 lost, 0 changed, 0 duplicated).
    • Phase A, both postures: 37 of 37 rows pass.
    • Reliability matrix C1a: no new failures across 1,540 rows on seven host builds; the only untracked rows are the #3013 pair, mapped to #3013.
    • Reliability matrix C1b (crash and upgrade cells): passes. #1506 and #2507 are KNOWN, every failing run matched by v0.30.4's; the three ACP upgrade-crash cells are unsupported.
    • The hands-on lane: 6 of 7 host builds pass all 982 tests. On the seventh, the build whose host assigns message ids, one new test fails because of how the test is written, not the product: it builds its two engines in different folders, so their summary ids differ there (release decisions T1-695 and T1-696; the test fix ships with the next release that carries code, tracked on #3189).
    • The release review sweep: rc2 re-ran the compaction shard (8 finder reviews, 9 candidates voted by two model families); the other shards' files are unchanged from rc1 and carry rc1's review. No verified P0 or P1. One P2, the refused-first-leaf case above, is tracked in #3189.
    • Fast recall tier C4 (D1 OFF, 500 questions): 0 changed recall results against v0.30.4 (lcm_recall and full-text search); R@10 0.8733 on both.
    • M3 (one D7 seed): passes every bar (14.5 compactions per 100 turns, mean wait 4.8 s, p90 41 s, 0 rows dropped; facts kept 0.90 against a 0.80 floor).
    • M2 (the D4 30-question mini row, against v0.30.4 in the same window): 26 of 30 correct on both, 0 net losses against a bound of 3.
    • Both smoke checks pass: the session switch while a pass waits for its summary (#2851: both sessions' rows stored once and in order) and the planner bound (#2840: 33,154 windows against a bound of 49,731).
  • D7 (pacing and facts kept on the fleet summary route), three seeds: passes every bar. Over 186 turns it averaged 14.5 compactions per 100 turns, a mean wait of 5.1 s and a compaction wall p90 of 42 s, with 0 rows dropped, no timeouts or failures, and 0.91 of the facts kept against a 0.80 floor. The compaction rate, waited-turn share and facts kept match rc1; rc1's mean wait was 4.96 s and its wall p90 41 s.
  • D9-D12 (live-session rows on a bench server, the pinned producer, against v0.30.4 in the same setup): no worse than v0.30.4 on every row, under the same arrangement as v0.30.5 (release decisions T1-672 and T1-699). D9 and D12 pass. D10 is inconclusive where v0.30.4 fails, and D11 fails in the same copies-only shape as v0.30.4, with nothing lost. A D9 compaction pass now completes in about 5 s, where v0.30.4's ran out of time at about 75 s. Every row that pass takes out of the list is accounted for: still listed, covered by the new summary or an earlier one, or a byte-equal copy.
  • Phase B, the full test suite on seven Hermes host builds, against v0.30.4 on the same CI setup: no new failing test outside two known ones. Every earlier failure is the same set v0.30.4 and v0.30.5 had, tracked on #1539 and #3021. The two known ones:
    • On Hermes 0.21.3, the install-scan test sees the false match listed under Known issues.
    • On the build whose host assigns message ids, the summary-id test described above.
      Each timing-sensitive test that failed once passed on its re-run.
  • M1 (the D1 LOCAL mini row: 25 fixed questions, against a fresh v0.30.4 arm on the same machine): 0 changed recall results, no timeout and no fallback; 23 healthy answers plus 2 exempt abstentions on both.
  • Not run before GA (release decision T1-696; recorded in the "v0.31.0 only" row of the decision table in bench/specs/RELEASE-READINESS-V1.md). Tests follow the diff: the new behaviours are off by default, and the default-path changes (#1250, #2924) are covered by the smoke stage and the canary.
    • D1 in full (LOCAL) and D2/D3 (Track S facts kept): not run for v0.31.0. There is no kit for them in this release, and nothing in the diff changes what they measure at the shipped defaults.
    • D4/D8 in full (LongMemEval-S and LoCoMo QA rows, delivery guards): not run for v0.31.0, and not on the GA path; M2 is their smoke-stage stand-in.
    • D5-B (the controlled clone cells on the reference agent's settings): not run before GA; it runs after GA, as on v0.30.4.
  • Phase C, the live 30-plus-turn hermes acp soak on seven host builds: not run for v0.31.0 (release decision T1-697; recorded in the "v0.31.0 only" row of the decision table in bench/specs/RELEASE-READINESS-V1.md). The bench route it used, a GLM coding plan, ended on 11-29, and the test kit has no approved way yet to give Hermes a Codex sign-in. The live-session evidence for this release is the reference agent's rc1 canary (see the canary line below) and the D9-D12 live-session rows.
  • D5, the clone run: not run for v0.31.0. It has never passed its dry run, and no stopped-store snapshot of the reference agent was available for this release (release decision T1-690 addendum 2; recorded in the "v0.31.0 only" row of the decision table in bench/specs/RELEASE-READINESS-V1.md).
  • The reference agent's canary: not run on rc2 (release decision T1-727). It has run v0.31.0-rc1, which is all of v0.31.0 except #3187, since 2026-11-30, with no stop sign from LCM-X. The depth target was not reached on its latest pass. #3187's path (prepared leaves publishing first) did not run there; it is measured live with v0.31.1. This is not a pass of the depth target feature.