Repository navigation
v0.31.1: compaction no longer stalls after a large escape, skipped rows are covered before it moves on, and a stuck window can be reset
v0.31.1 is a patch release on v0.31.0. It was tested first as v0.31.1-rc1 and v0.31.1-rc2. Three changes are on the default compaction path: the fix that stops new stalls after a large escape (#2819), the fix for rows a summary skipped (#1250), and a small record of each pass refused for missing lineage, which a user-started reset for a stuck window reads (#3211). The reset itself runs only when a user asks for it. The other changes affect only background leaf preparation, which stays off by default (LCM_BACKGROUND_LEAF_PREP_ENABLED, default false).
Changes since v0.31.0
- Compaction no longer stalls after one pass escapes more retained rows than its memo keeps (256) (#2819, #3209). Past the cap, the memo keeps every escaped row whose host copy is still in view, so later passes no longer refuse those copies with "selected leaf chunk lacks raw store lineage" (#3202). On by default. This stops new stalls; a window an earlier build already left stuck needs the reset below.
- Rows a summary skipped are covered before compaction moves past them (#1250, #3216). On by default.
- The case: a session stored its early rows under its session id, then bound to its gateway conversation. A pass could then move the gateway's frontier past early rows that no summary covered. They stayed stored and searchable, but were in no summary and not in the prompt the model sees.
- Now a pass covers such rows with a summary, or proves they are excluded, before the frontier passes them, in the same transaction that writes the summary and moves the frontier.
- A large backlog of such rows drains over several passes instead of one (in review, 149 rows took four passes). Each extra pass costs a summary call. Nothing is lost.
- Not shown: that a store an earlier build already left in this state recovers its rows. Two paths keep the earlier behaviour (see Known issues).
- A user can reset a compaction window that an earlier build left stuck (#3211, #3213). Such a window refuses every pass with "selected leaf chunk lacks raw store lineage". After three such refusals in a row at the same point,
/lcm statuspoints to the dry run./lcm doctor repair stuck-windowis a dry run: it reports the matched copies, their first and last store ids and the boundary id, and writes nothing./lcm doctor repair stuck-window applyarms the reset for the next pass in that session. That pass keeps the fresh tail and leaves the matched host copies out of the summary it builds.- Nothing is deleted. The originals stay stored, summarised and searchable.
- Checked on synthetic test stores only. On a store shaped like #3202 (708 escaped rows against the memo's 256), the dry run finds 707 copies; after
apply, a summary publishes, the frontier moves, and five later passes have no refusal. - To make the dry run possible, every "lacks raw store lineage" refusal now records one small metadata entry. This runs on the default path. It moves and deletes no rows.
- With background preparation on, a prepared leaf is promoted only when its summary read every host row the leaf removes (#3194, refs #3191). Otherwise that range is summarised in the foreground. This closes the rare row order in which two of the user's messages left both the summary and the visible context. A tool result that arrives late, after its call was used in a prepared leaf, is refused (#3194, #3201). With #3212, a tool result repeated after a summarised call and result is accepted: the repeat's copy can leave the visible context until a later leaf covers it, while the original stays in the summary. Nothing is lost.
- With background preparation on, prepared leaves can promote across hidden rows or oversized stored units (#3201, #3212), still respecting the host prefix, the fresh tail and the coverage checks. The check that keeps a tool call and its result together is now exact. One refusal remains: when the part being summarised starts with a result whose call is gone and two later calls reuse that id before either is answered, the prepared summary is refused and written in the foreground instead. Nothing is lost; that pass is slower by those calls.
- When a prepared chain is refused where it would split a host unit, the log line says where and why (#3199, refs #1674): the candidate boundary and the reason, as store ids, roles and counts. No message content is logged.
- Docs (#3221, #3228): the compaction flow page shows how background leaf preparation works, the order of its probe's checks, how a prepared leaf is checked before it is published, and what each refusal reason and log line means. The bundled skill's configuration reference no longer says cloud privacy filtering is on by default: cloud embedding providers receive unfiltered copies by default (
privacy:off); durable storage stays raw. - Tests: the pre-leaf condensation lock test runs on a host that assigns message ids (#3190). The stuck-window reset test now checks the engine's own message-id records apart from the stored rows' records, and checks after the reset that no stored row's record changed (test-only, in this GA).
Known issues
- Everything listed under Known issues for v0.31.0 still applies, except where this release changes it. Two v0.31.0 lines are corrected below.
- All 24 open P0 issues listed in the v0.31.0 notes stay open in this release: #1141, #1162, #1250, #1555, #1674, #1880, #2781, #2815, #2818, #2819, #2854, #2863, #2869, #2886, #2890, #2910, #2924, #2975, #2982, #3001, #3006, #3081, #3126, #3211. This release changes three of them:
- #2819: new stalls stop (above).
- #1250: the skipped-rows shape is fixed on the default path (above). One shape still stalls, as the v0.31.0 notes say: a window bound to the session id summarised the early rows before the gateway conversation bound, so the gateway's window refuses its passes, and
/lcm statusshowssession_owned_by_other_window. Nothing is lost. Its fix is planned for v0.31.2. - #3211: a stuck window can be reset (above), within the limits below.
- Two paths still let the frontier pass a skipped row (#3219, P3). In both, the row stays stored and unscoped recall still finds it, but it is in no summary. Both behave as before this release.
- With
ignore_message_patternsset (it is empty by default), a placeholder summary for replies to an ignored message can move the frontier past a row stored under the session id. - With
LCM_IDENTITY_ANCHOR=0, compaction keeps the earlier behaviour on purpose: skipped rows stay under the session id, and the frontier passes them.
- With
- Homes that share one database through
database_pathmust not share a session id (#3237, planned for v0.31.2). The release manager rated it P2 for this release after a probe, because the setup is not the default and nothing is lost; the v0.31.2 fix is tracked at P1. API callers send a distinctX-Hermes-Session-Idper home, or each home uses its own database. In that setup v0.31.0 already shows one home's summaries to the other, and v0.31.1 can move one home's unpublished rows into the other's conversation and stop the first home's compaction. Nothing stored is lost. - The stuck-window reset fails closed when it cannot prove a copy matches its original. In each case nothing is deleted or lost, and the window stays stuck.
- Another process that compresses the same session, for example a second gateway on the same store, sees an armed reset only after it reopens the store (#3217). After
apply, restart any such process. - A host copy that differs from its stored original, for example a tool result the host pruned to a placeholder, cannot be reset; the dry run reports
lossy. It also reportsambiguous_occurrencewhen the store lacks the host identity evidence the reset needs, andunstamped_unprovenwhen it cannot prove that a row without a timestamp has exactly one stored original. - The reset proves an externalized original only for payload names in the format used since v0.25.0-rc1. Older payloads report
lossyorno_stored_original. - A window that starts with a summary whose source lineage is very long (
read_failed), and a first reset pass whose summary ends before the boundary row (reset cancelledin the log) (#3220). - The workaround stays: start a new session (for example /new). Earlier messages stay stored and searchable but are not summarised into the new session, and the old session should not be resumed. That 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.
- Another process that compresses the same session, for example a second gateway on the same store, sees an armed reset only after it reopens the store (#3217). After
- Other limits of the stuck-window reset (release review, P2 to P4):
- A reset pass that stops at the first row it cannot prove still publishes the full set of consumed ids and the frontier, so host rows it consumed can stay in view past that point.
- A retry pass for an armed reset can return the already committed summary with no new leaf, for up to 3 charged attempts.
- Engine copies cloned inside one process for other agents do not see each other's armed reset (as #3217, for one process).
- Two windows on one session id share that session's stuck-window record.
- On long sessions, most window rows without a timestamp read
unstamped_unproven, because the match budget is twice the window's rows.
- Corrected from the v0.31.0 notes.
- #1162 (P0). The v0.31.0 notes said compaction can stop on the same row at every pass, with no workaround. The reporter's rerun on v0.30.2 found no such stop after the upgrade. But the pass that then published did not shrink the prompt: its summaries covered almost none of the live prompt, so the prompt grew (1,002 to 998 messages, 272,122 to 273,314 tokens). A synthetic test built from the reported counts shows the same symptom on v0.31.1-rc1. Its stop reason and retained-row count differ from the report, so the cause is not yet confirmed.
- #3081 (P0). The v0.31.0 notes said passes can run two to three minutes on about a dozen turns in a row without shrinking the context, with no workaround. Those timings came from a test rig with a longer foreground budget than the default and a stand-in summariser. On v0.30.4 at default settings, on the same store copy and conversation, 12 of 14 passes freed host rows, each in 49 to 59 s, and no more than one pass in a row freed none. The issue stays open in case it forms on a live store.
Upgrade and rollback
- Upgrade. No schema change. v0.31.1 writes new keys into the existing
metadatatable: the record of a pass refused for missing lineage, and a reset when a user arms one. - Rollback. Take a SQLite-safe backup first (see
docs/operator-guide.md), then install v0.31.0. The upgrade and rollback roundtrip with v0.31.0 lost, changed and duplicated 0 rows. That roundtrip used a small store; it did not cover v0.31.1's new records (a refusal record, an armed reset, or rows moved to the gateway conversation).- The #2819 stall can form again after a rollback to v0.31.0. v0.31.1 lets its record of rows kept out of summaries grow past 256 while their host copies are in view; v0.31.0's next write can trim it back to 256, so the stall of #2819 and #3211 can re-form. Nothing is lost. v0.31.0 has no reset command, so if the stall comes back, start a new session or upgrade to v0.31.1 again and use the reset.
- A rollback past v0.31.0, to v0.30.4, can store more copies (#3136): v0.30.4 has no reader for the record of rows v0.31.1 moved to the gateway conversation. A window under the session id that comes back after the rollback can store a copy of those rows on each restart, as it already can for older rows. Nothing is lost. A rollback to v0.31.0 is safe from this: it writes and reads that record as v0.31.1 does.
Qualification
The GA tag is the v0.31.1-rc2 tree (e01f275) plus these notes, the CHANGELOG title, two README phrases and the test-only fix above. The gate rows ran on rc2 against v0.31.0 and cover all of v0.31.1 (rc1 and rc2). Every result below is from bench or CI runs, not from a live deployment.
| Objective | v0.31.1 result |
|---|---|
| Kept in store | The upgrade and rollback roundtrip with v0.31.0 lost, changed and duplicated 0 rows. D7 dropped 0 rows. On D9-D12, rows kept are identical to v0.31.0's in every cell (no loss). The exceptions are copies, as listed for v0.31.0. |
| Kept in view | Not measured for this release. |
| Used correctly | D7 kept 0.911 of the facts against a 0.811 floor, the same as v0.31.0. M1, C4 and M2 were skipped: nothing they measure changed (below). |
| At shipped defaults | Not measured as an objective for this release. The three default-path changes are covered by the rows below. |
| 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 4.89 s and a compaction wall p90 of 40.9 s over 186 turns. The refusal record adds at most 75.8 ms to a refusing pass (bar: 100 ms). On D9-D12, the candidate's holds are within 2 s of v0.31.0's in every cell. |
- Receipts: the receipts behind every result in this section are held in the project's private release records. They are not attached to this release.
- Authorized exceptions: the "v0.31.1 only" row of the decision table in
bench/specs/RELEASE-READINESS-V1.mdon main (the row) records Phase C, D5, D1 in full, D2/D3 and D4/D8, each with its raw verdict and the decision behind it. The M1, C4 and M2 skips and D9-D12 are recorded in release decisions T1-751 addendum 2 and T1-758. - CI on the rc2 tag commit (push run 46880513538): lint, the tests on Python 3.11 to 3.14, the test-count check, the bench tests and the workflow lint pass. The required checks are read again on the GA commit before the tag.
- Pre-cut reliability matrix on the rc2 tag commit, compared cell by cell with v0.31.0's run: no new failure, 784 of 784 cells on seven host builds, 0 missing. Each of its two attempts had one harness database-copy error on one cell, a different cell each time (#2622), so it was read as a per-cell composite of both attempts, on the condition that every cell scored in both agrees (all 110 did; release decision T1-751 addendum 6). The 67 shared failures fail with the same bars on v0.31.0: 41 map to an open issue, 18 only to closed issues (KNOWN for v0.31.1), 6 are deliberate red controls, and 2 are now tracked as #3234.
- The smoke stage (L1) on rc2:
- Upgrade and rollback roundtrip with v0.31.0 (also the rollback rehearsal): passes (0 lost, 0 changed, 0 duplicated; schema 5 throughout).
- Phase A, both postures: 37 of 37 rows pass.
- Reliability matrix C1a: no new failures against v0.31.0 on seven host builds; the only untracked rows are the #3013 pair, mapped to #3013.
- Reliability matrix C1b (crash and upgrade cells): passes. 7 cells pass; #1506 and #2507 are KNOWN, every failing run matched by v0.31.0's; the three ACP upgrade-crash cells are unsupported.
- The hands-on lane: 6 of 7 host builds pass all 1,475 tests (33 skipped). On the build whose host assigns message ids, one test failed at its precondition because of how the test was written, not the product: it counted the engine's own message-id records as stored rows (release decision T1-751 addendum 4). This release fixes the test; its run on that build is part of the GA read.
- The release review sweep (C5): 24 finder reviews, 33 candidates, each voted by two model families. No verified P0 or P1. The P2 findings are under Known issues and in the rollback section; the shared-database case is #3237.
- M3 (one D7 seed): passes its bars (14.5 compactions per 100 turns, mean wait 4.94 s, p90 43.5 s, 0 rows dropped).
- M1, C4 and M2 skipped: nothing they measure changed (coverage receipt; release decision T1-751 addendum 2). One real question per row ran under line coverage on the candidate code, and none executed a changed product line beyond what importing the module runs. The residual: only one question per row ran, so the other questions, shards and arms were not measured; and the coverage runs deviated from the kit (data restored from the archive, matching the kit manifest; Python 3.12; M1 with 4 threads and one part; M2 through a replay of the bridge requests; the row wrappers not run).
- D7 (pacing and facts kept on the fleet summary route), three seeds: passes all six bars. Over 186 turns it averaged 14.5 compactions per 100 turns, a mean wait of 4.89 s and a wall p90 of 40.9 s, with 0 rows dropped, no timeouts or failures, and 0.911 of the facts kept against a 0.811 floor (v0.31.0's 0.911 minus 0.10). Each seed refused 0 passes for missing lineage.
- The #2819 fix was not exercised by D7 or M3: every run started with an empty retained-escape memo, and the bound session's memo row stayed empty in every pass, so no pass ended above 256. So the facts-kept bar is not binding for it (it passes anyway). That the fix stops a stall is shown by its tests, not by a bench row.
- The refusal record behind the stuck-window reset, on four synthetic stores: all 12 bars pass. The closest is 75.8 ms added per refusing pass against 100 ms; the longest write-lock hold is 1.2 ms against 50 ms; no pass hit a busy timeout. Ordinary passes are unchanged apart from that record: from v0.31.1-rc1 to rc2 the compaction trace tests change in exactly 11 of 160 cells, all refusal cells, each by one added metadata write, and the skipped-rows fix adds only read queries to one assembly trace cell.
- D9-D12 are formally UNRUN (release decision T1-758): the producer's lock watch did not qualify on the v0.30.0 baseline in either bench run. Under the arrangement used for v0.31.0 (release decision T1-699) they count for this GA: v0.31.1 is no worse than v0.31.0 on every comparable measure (the same store; identical pass completion and rows kept; holds within 2 s). Cross-run timing is recorded, not judged. The raw session-switch and planner-bound smoke checks pass.
- Not run for v0.31.1 (release decision T1-743), each with its raw verdict
UNRUN, for the same reasons as on v0.31.0:- Phase C, the live
hermes acpsoak: the test kit has no approved way yet to give Hermes a Codex sign-in. - D5, the clone run: it has never passed its dry run, and no stopped-store snapshot of the reference agent is available. D5-B runs after GA as recorded evidence, as on v0.31.0.
- D1 in full (LOCAL), D2/D3 (Track S facts kept) and D4/D8 in full: there is no kit for them in this release.
- Phase C, the live
- The reference agent's canary is watch-only and is not a pass. It runs v0.31.1-rc1. After its latest counted compaction pass (2026-12-02 14:43 UTC), the next provider request carried 245,440 input tokens by the provider's count, against the canary's bar of 222,000: the bar was missed.