Skip to content

fix(deps): require context-manager 0.14.1 - #365

Merged
Anarchid merged 2 commits into
anima-research:mainfrom
nissa-seru:fix/context-manager-0.14.1-floor
Oct 15, 2026
Merged

Anarchid merged 2 commits into
anima-research:mainfrom
nissa-seru:fix/context-manager-0.14.1-floor

Conversation

@nissa-seru

Copy link
Copy Markdown
Contributor

!Fixes #345

TL;DR: agent-framework now requires context-manager 0.14.1. With 0.14.0, hiding or suppressing a message could leave an agent on the autobiographical strategy unable to compile its next turn, because the preview they answer with is now a dry compile (#285). 0.14.1 fixes that in context-manager (anima-research/context-manager#180). This closes the release hold #345.

Changes

  • package.json: @animalabs/context-manager goes from ^0.14.0 to ^0.14.1.
  • A fixed fragment for the next release's notes, saying why, and what 0.14.1's calibration change means here.
  • The dry-run fragment's "With context-manager 0.14" becomes 0.14.1, since 0.14.0's dry run is the one that changed what the next compile reads.
  • Tests: remove the middle of three messages by hiding one message, by hiding a range, and by suppressing it, then run a turn.

Why the floor

context-manager 0.14.0 mishandled a dry compile that was the first compile after a message's removal, under the autobiographical strategy. It put the strategy's store order back without the listing the order was built from, so later compiles read message positions from before the removal. With the middle of three messages removed, every later compile then threw UncoveredDropError until something rebuilt the order.

Since #285 (merged, not yet released), compiles that are never sent are dry runs: previews, message.list, the agent context commands and a conversation fork's seed. Hiding messages, in either of the hide command's forms, and suppressing them both answer with a preview of the last visible message right after the removal, so on 0.14.0 that dry compile was the first one after it.

What callers will notice

  • A fresh install of the next release brings context-manager 0.14.1 or a later 0.14 release. A host whose own lockfile holds context-manager 0.14.0 should update it, so the host and agent-framework go on sharing one copy.
  • After a hide or a suppression, the agent's next turn is sent with the messages left, where on 0.14.0 it was refused with UncoveredDropError.
  • context-manager 0.14.1 also reads a calibration record written by 0.13.0 or earlier, which has no pricing stamp, as provisional rather than learned (Calibration: an unstamped multiplier learned before 0.11.0 is kept and re-stamped, folding the window to ~45% or OverBudget at startup context-manager#179). It may be discarded at load; one above 1 that puts a compile over budget drops to 1; and the first provider sample replaces it. So an agent whose autobiographical strategy uses adaptive resolution, upgrading from such a store, can compile a different window when the record is read, and again when the first provider sample sets the multiplier, rather than over about ten samples. A store that has already run a committing compile on 0.14.0 keeps its re-stamped multiplier.

Evidence

At 6ae80715, on main 92125b07. The head, ddd65ebc, changes only the fragment's wording after it.

  • The new tests, against each context-manager release, each installed in a clean worktree at 6ae80715. Each removal must answer with a preview showing the third message last, and the turn must be sent with the first and third messages and without the second. On 0.14.0 all three turns fail with UncoveredDropError: Renderer dropped 1 middle message(s) that no summary covers, after previews that pass; on 0.14.1 all three pass.
  • The full suite, each file in its own process, as npm installed it from this package.json (context-manager 0.14.1, membrane 0.5.87): 2,232/2,232 across 145 files on Node 24.21.0 unforced, on Node 24 with --test-force-exit as CI runs npm test, and on Node 20.20.2 with --test-force-exit. Nothing was cut short. Typecheck and build are clean.

Not covered

— Ada-1017 (Claude Opus 5.5)

Ada-1017 and others added 2 commits October 14, 2026 23:57
context-manager 0.14.0 mishandled a dry compile that was the first compile
after a message's removal, under the autobiographical strategy: it put the
strategy's store order back without the listing the order was built from,
so later compiles read message positions from before the removal. With the
middle of three messages removed, every later compile then threw
UncoveredDropError until something rebuilt the order. 0.14.1 fixes it
(anima-research/context-manager#180).

This package now runs compiles that are never sent as dry runs: previews,
message.list, the agent context commands and a conversation fork's seed.
Hiding messages, in either of the hide command's forms, and suppressing
them both answer with a preview of the last visible message right after the
removal, so on 0.14.0 that dry compile was the first one after it, and the
agent's next turn was refused.

The new tests remove the middle of three messages, by hiding one message,
by hiding a range and by suppressing it, then run a turn. Each removal must
answer with a preview showing the third message last, and the turn must be
sent with the first and third messages and without the second. On
context-manager 0.14.0 all three turns fail with UncoveredDropError; on
0.14.1 all three pass.

The fragment also says what 0.14.1's other change means here: a calibration
record written by 0.13.0 or earlier is read as provisional
(anima-research/context-manager#179). The dry-run fragment's "With
context-manager 0.14" becomes 0.14.1, since 0.14.0 is the release whose dry
run changed what the next compile reads.

Closes anima-research#345, the release hold that asked for this floor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndow

Only the adaptive select path reads a calibration record, so the note
names an agent whose autobiographical strategy uses adaptive resolution,
not every autobiographical agent. And the window can change twice, not
once: when the record is read (a discard at load, or a drop to 1 on an
over-budget compile, restarts from a provisional 1) and again when the
first provider sample sets the multiplier, rather than over about ten
samples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[High impact] This PR appears safe to merge.

Summary

Raises the minimum @animalabs/context-manager version to 0.14.1.

  • Agents can take their next turn after a message is hidden or suppressed.

Reviews (1) · Last reviewed commit: "docs(changelog): say when 0.14.1's calib..." · Reviewed by Greptile

@Anarchid
Anarchid merged commit bf1b1ae into anima-research:main Oct 15, 2026
6 checks passed
nissa-seru pushed a commit to nissa-seru/agent-framework that referenced this pull request Oct 16, 2026
…pawn wait and transport listeners, and TypeScript 7

main since cd036e0 brings anima-research#329, anima-research#333, anima-research#273, anima-research#368, anima-research#343, anima-research#340, anima-research#365, anima-research#341,
anima-research#352, anima-research#338, anima-research#274 (TypeScript 7), anima-research#347, anima-research#346, anima-research#348 and anima-research#344 (no hang after a
signal kill; no uncaught transport or spawn errors). Merged, not rebased, so
the commits slimepriestess and the round's readers read stay as they were
(Ada-1017, room-203 #105340). `git show --remerge-diff` shows the resolution
alone.

Conflicts, three files:
- src/mcpl/transport.ts:
  - anima-research#344's listeners for a read error on the child's stdout or stderr go in
    beside the stdin listener this branch already had.
  - close() stays this branch's reap (SIGTERM, then SIGKILL, then an
    explicit failure; one shared attempt). anima-research#344's version waited for an exit
    that kill() made likely, and its change there, counting a signalCode as an
    exit (anima-research#331), the reap already does.
- src/mcpl/server-connection.ts:
  - handshake keeps this branch's signature (the abort signal and the
    negotiated protocolVersion) and its abortable open, and takes anima-research#344's
    logAfterSettled. That listener takes over 'error' once the initialize
    race settles, comes off just before a successful return, and stays on a
    failed handshake's transport.
  - The race's cleanup keeps both lines: this branch's removal of the abort
    listener and anima-research#344's logAfterSettled.
  - The reconnect attempt keeps this branch's reconnectOnce, which reaps the
    previous launch before another starts and closes a handshaken transport
    itself when close() has ended the attempt. anima-research#344's version kept that
    transport for close() with a logging listener. That intent carries over
    as a listener put on before the attempt's own close, since the
    transport isn't wired and the handshake's listeners are off.
- package.json: devDependencies take both @babel/parser (anima-research#274) and
  @modelcontextprotocol/server (this branch).

Beyond the conflicts, for main's async StdioTransport.spawn (anima-research#344):
- SpawnerStdioTransport.start() awaits it. So a modern stdio command that
  can't be spawned rejects start() with its spawn error, and the connect
  fails with that error instead of waiting out its 30 s discover probe. This
  is R1-4's fix (Anarchid's review, room-364 #105270), and its test follows
  this merge.
- The tests that wrap spawn to make a child unreapable await it, in
  mcp-modern-outcomes, mcp-server-ownership and mcpl-legacy-lifetime. So
  does the unreapable-close test's own spawn. tsc can't see the old
  synchronous wrappers, since they reach the child through a cast, and they
  hung those suites.
- anima-research#344's test of a transport kept for close() during a reconnect now
  follows this branch's reconnectOnce. The attempt closes that transport
  itself and close() waits for it, so the test resolves the held close
  before it awaits the attempt. It's retitled for what it checks: the
  transport logs the errors it reports while it closes, and after.

tsc (TypeScript 7) is clean. A trial of this resolution on main bdc5dc4
with anima-research#344's head 8387393, the head that merged, passed every test file on
Node 24.21.0 and Node 20.20.2 (J10968). The only failures were 69 in a
stale dist/test/mcp-modern-http-2025.test.js that the VPS copy kept from
anima-research#337's runs. The full check of this commit follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nissa-seru pushed a commit to nissa-seru/agent-framework that referenced this pull request Oct 17, 2026
…nima-research#352 has landed

main took anima-research#343, anima-research#340, anima-research#365 (context-manager ^0.14.1), anima-research#341 and anima-research#352 since 92125b0.

The one conflict is anima-research#352's drain kick at the exhaustion site, which this branch moved into kickOverBudgetDrain. The site keeps this branch's call. kickOverBudgetDrain takes anima-research#352's kick whole (no tick started while a surgery holds the store, ticking stops when one takes it, MaintenanceWithdrawnError counted as a stop, the kick registered in overBudgetDrains so a surgery waits for it), and adds only the hold's callbacks. A kick declined under a surgery registers none, and the surgery's release asks for the check. This is the resolution checked in trial merges with anima-research#352's earlier heads, and main's kick block is the same as anima-research#352's head ca2f806.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Release hold: the next release needs a context-manager floor with context-manager#180

2 participants