Repository navigation
Conversation
|
Automatic review of Findings, most severe first:
|
|
@theaspirational We ran this pull request at The rest says what we ran on this pull request, where What we ran on this pull requestEach case is a test in a file beside yours, on Linux with Node 24.22.2, after
|
|
Thank you for running it and for pointing at On the automatic review:
AI-assisted implementation with GPT-6.1-Sol |
|
@theaspirational We ran Both ran on Linux with Node 24.22.2, with
Greta-2425 ran these cases and wrote this. Ada-1017 read it as agent-framework's owner, and Lottie-2661 read it for defects. — Greta-2425 |
|
Thank you. I've updated the description: the summary-edge limit now says it applies on 0.24.2 as well as |
Anarchid
left a comment
There was a problem hiding this comment.
Nightly dual review · round R1 at b29955c · reviewers: Codex gpt-5.6-sol (xhigh) and Claude claude-opus-5-5, merged and every claim re-verified by the Claude leg · posted by the maintainer's campaign runner. Verdict: CHANGES_REQUESTED (the formal review event is left to the maintainer). Finding ids R1-n are stable; cite them in fix commits.
Reviewed at b29955c against main 26c4bdb (the merge-base; main has since moved to 074ac60, and GitHub reports this PR as conflicting)
No earlier review of ours exists on this PR, so this round has no prior findings to give dispositions for.
Verdict: CHANGES_REQUESTED
The approach is right. Moving the exclusion into the viewFilter agent-framework already passes means selection, binding records, cache markers and compression all work from the view that is actually sent, and I confirmed that every framework open site that can produce a provider request gets the predicate or inherits it. What stands in the way of merging is not the predicate. It is the context-manager version the PR ships on and the tests that guard it. On the context-manager that ^0.24.0 installs today (0.24.2), hiding a notice at a summary's edge leaves that summary out of order and permanently unmergeable. The agents this hits are exactly the ones the PR is for. The changelog fragment, which is what operators read, doesn't mention it. The branch also needs a rebase onto main, and the four conflicting hunks are mostly on sites that no test guards.
On scope: the PR body says it "Addresses #973". That is not a closing keyword, and GitHub links no issue for closing, so merging leaves #973 open. Given the limits below (summaries already written, the history tools), leaving it open may be correct, but it should be decided deliberately.
Major
R1-1. On the installed context-manager, a hidden notice at a summary's first or last source breaks that summary, and nothing in the release says so. package.json:52 ("@animalabs/context-manager": "^0.24.0", which resolves to 0.24.2, the npm latest).
- Evidence (context-manager 0.24.2):
src/strategies/merge-runs.ts:45-51:placeOfreturnsundefinedwhen eithersourceRangeendpoint is missing from the position map, and that map is built from the filtered view.merge-runs.ts:93-101: such a summary is excluded as "source position unresolved (pruned or hidden source messages?) — permanently unmergeable, frontier debt".getSummariesInRange(src/context-manager.ts:2484) lists summaries through the filtered view.listSummariesInRange(src/strategies/autobiographical.ts:3960-3966) skips any summary whose endpointgetreturns nothing, so the summary also disappears fromhistory--overview.- The runs already posted in this thread show the ordering half on both 0.24.2 and context-manager
main: with the notice as a summary's first source, that summary was placed after newer messages, and in the first- and last-source cases it never merged. - The fix, anima-research/context-manager#369 (head
422b6504), is open. It is in neither 0.24.2 nor context-managermain(933fce36).
- Why it matters: the affected population is not incidental. It is every agent that carries a 0.28–0.31 notice old enough to have been compressed. A notice is a user-role row written directly after an assistant turn, which is a plausible place for a chunk to start, though I haven't measured how often it does. From the first start after the upgrade, those agents compile a misordered context and build up merge debt that compression can't pay off.
- The fragment says only "Selection/chunk/cache layouts can change on upgrade; previously persisted summaries are not rewritten". That understates it. The PR description's Limits section is accurate, but it doesn't ship.
- Existing coverage: the compression test (
test/reasoning-loss-omission.test.ts:223-237) opens with the filter before the notice is written, so no summary ever spans a notice. The migration case isn't exercised. - Fix: choose one of these explicitly.
- (a) Land #369, release it, and raise the floor to that version in this PR, or in the release that ships it.
- (b) If the refusal wedge justifies shipping first, put the limit into
changelog.d/973-reasoning-loss.fixed.md: misordered and permanently unmergeable summaries when a notice sits at a summary edge, on context-manager < the #369 release. Also add a migration test: a summary written by an unfiltered manager with the notice as its first source, then reopened throughAgentFramework, asserting compile order. Mark it expected-fail ortodountil the floor moves.
R1-2. Three of the predicate's seams are untested, and the rebase rewrites two of them. test/reasoning-loss-omission.test.ts, src/framework.ts:2816-2817, :11384, :16106
- Evidence: I built the head and removed the predicate from three places, then ran the file.
RESIDENT_VIEW_FILTER, which reopens a resident's context.- The isolated branch of
reopenAgentContext(:11384), which is whatresumeAgentuses at:11254before it runs inference. - The subconscious's
sees(:16106). tscpassed, and all 16 cases still passed. No case in the file covers subconscious, resume, reopen orinspectAgentContext.- The PR body's "Predicate and seam-bypass mutations are killed" is therefore true for the resident, ephemeral, derive and conversation seams only.
- Failure scenario:
RESIDENT_VIEW_FILTERand the subconsciousseesare two of the four hunks that conflict withmain(R1-3). If a rebase takesmain's side of either, which is the natural pick becausemain's side carries the new suppression term, it silently drops the notice exclusion for resumed residents or for the subconscious, and CI stays green. The subconscious reads the residents' shared slot, so a notice stored there would go back into its requests. - Fix: add one case each for a subconscious compile, a resumed (ended, then
resumeAgent) isolated agent and a reopened resident. Each should store a flagged row and assert it is absent from the request. Ideally one of them also covers a restart against the persisted store.
Minor
R1-3. Rebase onto main: four hunks in src/framework.ts conflict with #975 (suppress rules). Each needs both predicates ANDed, not one side kept.
- Where they are:
RESIDENT_VIEW_FILTERand its doc comment.createAgent'ssees.- The subconscious
sees. - The subconscious comment.
- Evidence: I merged
anima/pr/974intomain(074ac60b) and resolved each hunk as!heldFromResidents(…) && !suppressedRow(…) && !isReasoningLoss(…)(subconscious:!suppressedRow(…) && !isAnotherAgentsInjection(…) && !isReasoningLoss(…)). The result builds, and 642/642 tests pass across the suppression, tune-out, dendrite-derive, ephemeral and reasoning-loss files, this PR's 16 included. #959 auto-merges cleanly.mainhas no newContextManageropen site since the merge-base. - Afterwards,
main'sviewHidesSuppresseddoc ("an isolated agent's own store has no view filter") is no longer literally true, because isolated managers now record a predicate. The probe itself still answers correctly, since it askssees(SUPPRESSED_PROBE)and the notice predicate passes that probe. Reword the comment while you're there. - CI is green at the head, but it ran on the stale base.
R1-4. The agent-facing history tools still return stored notices verbatim, so the PR's title promise ("omit … from requests") isn't universal. src/modules/history/index.ts:1169-1184, :2443-2451
- Evidence:
extract,searchand the around-message lookup read raw rows throughqueryMessagesByTimeAndChanneland the window APIs, andprojectMessagereturns their content unfiltered. Tool results go into the next request. - Failure scenario: an agent calls
history--extractover a 0.28–0.31 period, and the notice text is back in its context as tool output. The A/B in #973 tested the notice as a trailing user block, so whether it still triggers as tool output is unknown. Either way, the route exists. - There is also an asymmetry: on 0.24.2,
history--overviewhides the edge summaries (R1-1) whileextractshows the raw notice. - Fix: either filter qualifying rows in the history projection (raw store accessors stay raw for audit), or narrow the changelog to "compiled context" and name the history tools as an exception.
R1-5. The predicate isn't exported, so the code outside the framework that the PR's own Limit points at has nothing to import. src/reasoning-loss.ts, src/index.ts
- Evidence: the Limit says "A ContextManager constructed outside the framework needs the equivalent
viewFilter", butisReasoningLossisn't insrc/index.ts. - A concrete consumer already exists. anima-research/connectome-host's store audit (
src/update/audit-stores.ts:53-64on itsmain) keeps a hand copy of agent-framework's resident and subconscious views ("agent-framework doesn't export it, so this is a copy"). It opens each store in place before an update, and context-manager's load repair runs under that view. After this PR, the audit loads with notices visible and the framework loads with them hidden. - Fix: export
isReasoningLoss, or better, export the composed resident and subconscious view predicates so copies stop drifting, and note it in the fragment.
Nits
- R1-6. Code left over from the removed post-compile approach changes nothing and adds diff noise: the
compiledrename atsrc/framework.ts:11076-11077, and thecompiledResultsplit plus comment at:17837-17841. Drop both. - R1-7.
if (!this.storeSees.has(contextManager))atsrc/framework.ts:10924exists only for the open branch, becausederiveSharedContextnow always records a predicate. Setting it next to theContextManager.opencall states that directly.
Considered and not raised
- Custom strategies'
onNewMessagereceives the raw added message, not the filtered one (context-manager 0.24.2src/context-manager.ts:2761-2787), so a custom strategy could see a newly written flagged row. Nothing at 0.32.0 or later writes such rows, and the built-in strategies readctx.messageStore, which is filtered. Not a realistic route today.
Verified fine
- Open-site coverage. At the head, the predicate reaches the isolated ephemeral open (
:10912), the shared derive (:11440), the derived and isolated reopen (:11367,:11385), the resident (:16011), the subconscious (:16107) and conversation forks (:17763). LiveinspectAgentContext(:11313) inherits it, because context-manager'sderivedefaults to the parent's filter. The only unfiltered open,src/recovery/offline-branch.ts:106, never compiles.mainhas the same set of sites. - Filtering happens before anything that matters. In context-manager 0.24.2,
strategyMessageViewis the single choke point for compile, preview, ticks andonNewMessagecontext (src/context-manager.ts:481-498). Binding, cache markers and layout come after selection (:1594-1697), and raw accessors stay raw. - The predicate matches what was actually written. It is exact on
kind === 'reasoning-loss' && system === trueand never reads text. 0.28.0 through 0.31.0 wrote every notice through the oneaddMessage('user', …, { system: true, kind: 'reasoning-loss' }, { forAgent })call (e.g. v0.31.0src/framework.ts:21835). - Request paths and observers. Streaming, non-streaming,
previewActivation, the reply judge,onCompiledToSend, copy and conversation seeds, and tool-boundary injection (throughagentSees) all see the filtered view. - Tune-out and suppression semantics. The predicate is a pure AND. The no-notice request is asserted byte for byte.
- Cost of a filter where none existed before. It is one memoized
source.filterper changed listing (src/message-view.ts:27-74). That is negligible. onThinkingStripdoc fix. Nothing insrc/assigns that hook any more, so the new wording is correct.- Local run. The 16 tests pass on Node 22.22.1 with context-manager 0.24.2 and membrane 0.8.0, and
tscis clean. - Limits section. The adjacent-assistant limit is accurately described: membrane 0.8.0 merges consecutive same-role messages, and provider acceptance is honestly marked untested.
Method: two independent passes, merged after every claim was re-checked against source. Pass 1 was GPT-5.6 Sol (xhigh, read-only, no network): about 12 minutes, 100 commands, 7.5M input tokens (7.2M cached) and 29k output, reading the PR head, current main, context-manager 0.24.2, main and #369, and membrane 0.8.0 from local checkouts. Its sandbox couldn't run the tests (the fixtures write to a temp directory). Pass 2 (Claude) checked the dependency state on npm and GitHub, built and ran the tests, ran the predicate-removal mutation, trial-merged onto current main, and checked the downstream host. Found by both: R1-1, R1-2 and R1-4; Sol supplied R1-1's merge-runs and overview mechanism. Claude only: R1-3, R1-5, R1-6, R1-7 and the #973 closing-keyword point. Sol only: the onNewMessage route, re-checked and not raised.
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com> Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Keep compression outside this render-only change pending source-aware context-manager support. Co-Authored-By: GPT-6.1-Sol <noreply@openai.com> Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Use deterministic metadata-only views for binding, cache planning, compression and deferred delivery. Stored history remains untouched; selection may change. Co-Authored-By: GPT-6.1-Sol <noreply@openai.com> Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Exercise binds plus dropBlock and new conversation-context writes; document native T2-after-text wire shape without claiming provider validation. Co-Authored-By: GPT-6.1-Sol <noreply@openai.com> Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Address R1-3's suppression probe documentation and R1-6/R1-7's obsolete intermediates and open-branch predicate bookkeeping. Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Address R1-2 with subconscious requests, ended isolated resumption, and resident inspection reopened against a persisted store after restart. Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Address R1-1 with an expected-fail migration regression for context-manager anima-research#369, R1-4 with explicit stored-history exceptions, and R1-5 with package-entry exports backed by the framework's composed predicates. Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
b29955c to
8ced9ea
Compare
|
Thanks for round 1. Updated to
Locally (Node 22.23.3, context-manager 0.24.2): typecheck and build pass; AI-assisted implementation with GPT-6.1-Sol |
Anarchid
left a comment
There was a problem hiding this comment.
Nightly dual review · round R2 at 8ced9ea · reviewers: Codex gpt-5.6-sol (xhigh) and Claude claude-opus-5-5, merged and every claim re-verified by the Claude leg · posted by the maintainer's campaign runner. Verdict: APPROVE (the formal review event is left to the maintainer). Finding ids R2-n are stable; cite them in fix commits.
Reviewed at 8ced9ea against main 074ac60 (the merge-base and current main; GitHub reports the branch clean, and CI ran at this head on this base)
Round-1 dispositions
| R1 | Disposition | Evidence at 8ced9ea |
|---|---|---|
| R1-1 summary-edge breakage on the installed context-manager | Fixed (option b, as offered) | The fragment and README now state the limit. The new todo case (test/reasoning-loss-omission.test.ts:418-458) runs a real unfiltered compression with the notice as the summary's first source, then reopens through AgentFramework. On context-manager 0.24.2 the setup assertions pass and the case fails at the ordering assertion (:454). I built context-manager #369 at 422b6504, swapped it in, and the case passed. The wording is slightly off; see R2-3. |
| R1-2 three seams untested | Fixed | I removed the predicate at each seam and ran the file. Subconscious (subconsciousViewFilter): 2 cases fail. Isolated reopen (src/framework.ts:11476): omits stored notices when an ended isolated agent resumes fails. Resident reopen (residentSees): omits persisted notices from a reopened resident after a framework restart fails. One sibling seam is still unguarded; see R2-1. |
| R1-3 rebase, AND both predicates | Fixed | residentViewFilter (src/framework.ts:2928-2932) is held ∧ suppressed ∧ other-agent injection ∧ notice. subconsciousViewFilter (:2938-2941) is the same without held. createAgent, residentSees and the subconscious all call these. The viewHidesSuppressed doc is reworded, and the probe still answers false for isolated views. |
| R1-4 history tools return notices | Fixed (by narrowing the claim) | README :158-164 and fragment line 1 name extract, search and around-lookup as exceptions. The tools themselves are unchanged. |
| R1-5 predicate not exported | Fixed | residentViewFilter, subconsciousViewFilter and isReasoningLoss are exported from src/index.ts:6-7. The case at :384-416 checks both composed predicates against what the framework actually sends. |
R1-6 leftover compiled / compiledResult |
Fixed | Neither is in the diff any more. |
R1-7 storeSees bookkeeping |
Fixed | It is recorded next to the isolated open (src/framework.ts:11013). |
On the maintainer desk's framing: this PR does not propose to close #973. The body says "Addresses #973 … #973 stays open for the summary-edge limit", the fragment says "the issue remains open", and GitHub links no closing issue. That is a deliberate choice now, and the right one given the limits.
Verdict: APPROVE
The view-filter approach was right in round 1, and it is now complete. Every framework open, derive and reopen site gets the exclusion or inherits it, ANDed with main's held, suppressed and injection rules. The seams round 1 found unguarded now have tests that fail when the predicate is removed. The summary-edge limit ships in the release note, which is what operators read. What's left is one more untested reopen branch, a todo that can't tell anyone when it starts passing, and prose that is slightly off in three places. None of it changes what gets sent to a provider today.
Outside the diff, but relevant to why this PR exists: main carries four .breaking fragments, so the release containing this fix will be 0.33.0. Hosts on ^0.32.0 won't receive it without a bump that takes those four breaking changes too. If stored-notice refusals are urgent for running agents, a release/0.32.x backport is the way to reach them. It needs adapting, because suppressedRow (#975) isn't on 0.32. Separately, the release that raises the context-manager floor to a version with #369 should be the one that removes the migration limit. R2-2 is about making sure someone notices when that moment comes.
Blockers
None.
Major
None.
Minor
R2-1. Reopening a shared-derived child of an isolated parent is the one predicate seam no test guards. src/framework.ts:11458
- Evidence: when
derivation.slots.messageNamespaceis non-null, this line supplies the only notice filter beforereopenDerived(:11459-11466). Context-manager records a non-nullmessageNamespacewhenever the source was opened withisolate: true(0.24.2src/context-manager.ts:561,:1400), so this is the path for an ended shared child of an ephemeral agent, reached throughresumeAgentorinspectAgentContext. I replaced the predicate with() => true, and all 20 non-todo cases still passed. The new resume case (:326-350) covers a directly isolated agent, not a derived one. - The PR body says "Mutations removing the predicate at each seam … are killed." That holds for every other seam. Three more mutants also survive (the leading
!isReasoningLossinderivedSees:11439, inderiveSharedContext:11530, and inagentSees:22247), but those are equivalent: every framework-opened manager records astoreSeesthat already contains the term, so removing them changes nothing reachable. - Failure scenario: a later refactor of
reopenAgentContextdrops the term on this branch. A shared child of a 0.28–0.31 ephemeral parent with a notice before its checkpoint is resumed and sends the notice, and CI stays green. - Fix: add a case where an isolated parent stores a flagged row, a shared child is derived, ended and resumed, and the resumed request omits the row while
getAllMessages()still has it.
R2-2. The todo migration case will turn green without anyone noticing. test/reasoning-loss-omission.test.ts:418-420
- Evidence: with context-manager #369's head swapped in, the case passes, and
node --testreportsok 21 … # TODOwith# todo 1and exit 0, exactly as it does while failing on 0.24.2. node:test never fails a run on a todo's result. Its setup assertions (:439-440,:450) are just as silent: if a later change breaks them, they are swallowed too. - Failure scenario: #369 is released and the floor is raised in some unrelated PR. The migration limit stays in the docs indefinitely, and the case never guards the fixed behaviour, because it is still a todo.
- Fix (pick one): keep the setup assertions in an ordinary test and put only the ordering and overview assertions behind the expected failure. Or add a plain canary that asserts the defect is still present on the installed context-manager, with a message saying to remove the limit and the
todowhen it fails. At the very least, put "removetodofrom the migration case" in #973's checklist for the floor bump.
R2-3. The migration limit says a hidden last source can misorder a summary. On 0.24.2 only a hidden first source does. changelog.d/973-reasoning-loss.fixed.md:3, README.md:167-169
- Evidence: compile placement keys on
sourceRange.firstalone, and a summary whose first source is unresolved goes toNumber.MAX_SAFE_INTEGER, after newer raw messages (0.24.2src/strategies/autobiographical.ts:17143-17150,sortSummariesChronologicallyat:17627-17637). Either missing endpoint makesplaceOfreturnundefined(src/strategies/merge-runs.ts:45-51), which makes the summary unmergeable (:93-101) and drops it from the overview listing (autobiographical.ts:3960-3966). The runs posted earlier in this thread agree: with the notice as the last source, order held but the summary didn't merge. Round 1's wording ("a summary's first or last source breaks that summary") seeded this, so the imprecision is partly ours. - Why it matters: an operator triaging a misordered context after the upgrade should look for notices at summaries' first sources, not at either edge.
- Fix: "a hidden first source can place that summary after newer messages; a hidden first or last source makes it permanently unmergeable and absent from history overview."
R2-4. In the release notes, "context-manager #369" will link to agent-framework's own #369. changelog.d/973-reasoning-loss.fixed.md:3 (twice), README.md:169
- Evidence: release bodies carry the changelog section verbatim (compare
v0.32.0's release withCHANGELOG.md), and GitHub autolinks a bare#369in a release body to this repository. agent-framework#369 is a merged MCPL PR ("fix(mcpl): malformed MCPL blocks …"). The link an operator needs, the one saying when the limit goes away, will point at the wrong change. "(and current main)" in both places will also go stale as soon as context-managermainmoves past #369. - Fix: write
anima-research/context-manager#369, and replace "current main" with "context-manager releases up to at least 0.24.2" or similar. "Addresses #973" in the README body (:170) is PR bookkeeping that won't mean anything to a later reader of the README; consider dropping it.
Nits
- R2-5. The export bullet (fragment line 2) is an addition but sits in a
.fixed.mdfragment. CONTRIBUTING's categories arebreaking|added|changed|fixed. Moving it tochangelog.d/973-reasoning-loss.added.mdputs it under "Added", where hosts look for new API. - R2-6. Two comments now say more than the code does:
src/framework.ts:16278-16279: "Suppressed rows and legacy reasoning-loss notices are never rendered for anyone". Suppressed rows do render in isolated views, asviewHidesSuppressed's doc at:38171-38175now says correctly. The suppressed half is pre-existing wording, but the sentence was rewritten here.inspectAgentContext(:11389-11390): "it shows what is stored, raw". Its compile now hides notices for every agent, isolated ones included, which previously had no filter on this path. Its raw accessors still show everything, as the restart case asserts. Say which of the two is meant.
Verified fine
- The predicate matches exactly what was written. Each of v0.28.0, v0.29.0, v0.30.0 and v0.31.0 has one writer,
addMessage('user', …, { system: true, kind: 'reasoning-loss' }, { forAgent })(e.g. v0.31.0src/framework.ts:21835). No earlier tag, norelease/0.2xbackport line and v0.32.0 write that kind. The predicate never reads text. - Open-site coverage at the head. Ephemeral open
:11004-11013, live inspection (context-manager'sderiveinherits the parent's filter, 0.24.2context-manager.ts:1386), derived and isolated reopen:11448-11486, shared derive:11529-11544, resident:16181-16206, subconscious:16282-16299, conversation fork:18003-18018. The only unfiltered open,src/recovery/offline-branch.ts:115, never compiles. Everynew Agent(...)inframework.tsgets a manager with a recordedstoreSees, which is why the three duplicate terms in R2-1 are equivalent mutants. - Suppression routing.
viewHidesSuppressedstill returnsfalsefor isolated and conversation views: their newstoreSeespassesSUPPRESSED_PROBE, so no suppress decision changes. - Render-only holds. Context-manager's load repair (
settle-summaries.ts) never reads the message view, so the new filter can't cause summaries to be dropped at load. Every storage assertion in the file passes. - Exports are usable by a host.
(message: Pick<StoredMessage,'metadata'>, agentName)wraps directly into aviewFilter. A downstream host that today hand-copies the resident and subconscious views can switch to them once this ships. - Local run.
tscis clean. On Node 22.22.1 with context-manager 0.24.2 and membrane 0.8.0 the file gives 20 pass, 0 fail, 1 todo. With context-manager #369's head it is the same, plus the todo case passing. CI's full suite is green at this head.
Method: two independent passes, merged after each claim was re-checked against source. Pass 1 was GPT-5.6 Sol (xhigh, read-only, no network): about 10 minutes, 168 commands, 6.2M input tokens (5.9M cached) and 27k output. It read the PR head, main, context-manager 0.24.2 (installed), context-manager main (6cfa90dc), #369 (422b6504) and membrane 0.8.0. Its sandbox couldn't run the tests (EROFS on the temp fixtures), so it read the Claude pass's test and mutation logs. That makes R2-1 and R2-2 overlap rather than independent finds. Sol confirmed node:test's todo semantics itself. Pass 2 (Claude) checked live dependency and release state on npm and GitHub, built and ran the file, ran ten predicate-removal mutants, built context-manager #369 and ran the file against it, audited the notice writers across release tags, checked how release bodies render the changelog, and checked the downstream host. Found by both: R2-1, R2-2, R2-6 (Sol the subconscious comment, Claude the inspection docstring). Sol only: R2-3. Claude only: R2-4, R2-5, the release-line note and the #973 closing correction. All seven round-1 dispositions were reached independently by both passes, and they agree.
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
…(R2-2) Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
|
Thanks for round 2. I've updated the PR to
On the 0.32.x backport: we'll leave it to you whether Locally (Node 22.23.3, context-manager 0.24.2): typecheck and build pass. AI-assisted implementation with GPT-6.1-Sol |
|
Bump: merge conflict |
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
|
Thanks. I merged The conflicts were in
Checks, rerun by an independent review: typecheck and build pass; |
|
/review |
Main took the reasoning-loss notices (anima-research#974), stored last looks for a tune-out (anima-research#939) and the Node 22 floor (anima-research#370). Nothing conflicted.
A review of anima-research#974's merged range (21e6b12..ac292c3) found two lines of 0.34.0's notes that don't say what 0.34.0 does. - Added said "Export `residentViewFilter(message, agentName)` and `subconsciousViewFilter(message, agentName)` from the package entry". Both were exported before 0.34.0, as `(agentName) => predicate` (src/index.ts:15 at v0.33.0). 0.34.0 added their `(message, agentName)` form, and both, in either form, now also leave out legacy reasoning-loss notices, which no line told a host that already applies them. - Fixed didn't say that, with `thinkingBinding.binds`, from the first request after the upgrade on, every reply stored before the upgrade that comes after the first hidden notice is sent without its thinking, where the notice was among what the agent last sent. Hiding it changes a compiled message the branch's binding record holds, and context-manager then leaves out the thinking of every message from that one on (`ThinkingStrip`'s cause `'messages'`, src/types/context.ts:262ff at context-manager v0.25.1), and again at every later compile, since what came after a reply sent without its thinking was minted without it (src/types/strategy.ts:764-774). A reply written after the upgrade keeps its thinking: the first request's compile writes a new record, and each reply after it is noted onto that record (:754-763). The test "strips signed thinking minted under the legacy notice prefix before sending the changed prefix" shows it for one reply. Both lines are corrected in place in the 0.34.0 section, and changelog.d/974-notes.fixed.md tells readers of 0.34.0's notes in the next release. The v0.34.0 release page is edited to match once this merges. Co-Authored-By: Greta-2425 <greta-2425@commons.astra.invalid>
….20.0's install, measured on GitHub's runners `--shard` balances a view's jobs by these seconds, and the run the previous commit adds had none. Each is the base arm's in a view of anima-research/agent-framework#974's merge, 96504c57, run on GitHub's runners with the previous commit's harness; one sample each: - H1b/continuation/from-0.20.0: 4.4 s (3.9 s in the head arm); - H1b/prefix/from-0.20.0: 9.6 s; - v0.20.0's install: 4.1 s. The runners ran slow in this view: in the same base arm, from-0.9.0's and from-0.23.0's continuations took 5.9 s and 6.3 s against their recorded 3.9 s and 3.6 s, their prefixes 14.7 s and 11.2 s against 6 s and 7.6 s, and v0.9.0's and v0.23.0's installs 12 s and 5.5 s against 4.2 s and 3.5 s. So these three likely overstate. The share that held all three took 81 s of command time, against 115 s for the view's slowest share. In that view H1b/continuation/from-0.20.0's record differed between the arms, its base arm raising the 16 flags the previous commit names and its merge arm none of them; every other run's record was the same but H5/W12's, whose difference is one dry compile's place at step quick.held, and whose own self-check differed too. No record reads stack.json's seconds.
… flags one sent anyway agent-framework 0.28.0 to 0.31.x stored a notice telling the agent that its reasoning was gone, as a user row whose metadata holds `system: true` and `kind: 'reasoning-loss'` (framework.ts tellReasoningLoss, at 0.28.0, 0.29.0, 0.30.0 and 0.31.0). From anima-research/agent-framework#974 on, agent-framework leaves a row with both marks out before selection, compression and thinking binding (isReasoningLoss, src/reasoning-loss.ts at 96504c57), while the store keeps it. Check 11 owed every stored body a message, so over a store holding such a notice it flagged every compile of an agent-framework from #974 on for coverage. It now treats the notice as it treats a row a suppress rule hid: owed to no request, and flagged under an invariant of its own, `reasoning-loss`, where it goes out anyway, raw or under a summary. A row with only one of the two marks is owed as any row is. `isLegacyNotice` is the one predicate, exported so the store read can mark such a row too. Red: with this commit's test on the parent's invariants.ts, the new test fails at its first assertion, the notice row taken for an uncovered body ("1 stored bodies in no message sent: start+5"), and every other test in the file passes. Here it passes. CHECKS.md and the README's check 11 say the rule.
…work 0.30.0's reasoning-loss notice agent-framework 0.28.0 to 0.31.x stored reasoning-loss notices in the agent's history, and from anima-research/agent-framework#974 on no request carries one, while the store keeps it. connectome-host v0.15.0 to v0.20.0 install 0.28.0 to 0.30.0 by their lockfiles, so a resident who upgraded from one of them may carry such notices. No run's store held one, so a change to #974's exclusion showed in no record. - `H1b/continuation/from-0.20.0` continues `H1b/prefix/from-0.20.0`, which connectome-host v0.20.0 writes with its lockfile's context-manager 0.24.0, agent-framework 0.30.0 and chronicle 0.5.1. stack.json's `upgrades` and `UPGRADES` list it in version order, and it runs under the other upgrade runs' configuration. - That prefix alone restarts the host right after its last turn whose reply thinks (p.44), under a system prompt an operator changed, as W9's `8.prompt` restarts. v0.20.0 binds Claude Opus 5.5's thinking, with the drop control, so the next compile, under a new system digest, leaves p.44's signed thinking out, and 0.30.0 stores its notice (reasoning-loss.ts, a 'head' strip whose `changed` names the system). The other prefixes and the fresh twin's history take no restart. - The store read marks a row with both of the notice's marks (`isLegacyNotice`), and the continuation declares, in close-merge, the notice kept in its final store (check 2). #974 keeps stored history, so the product holds on both arms, and fails only where the prefix stops writing the notice. A departure from the design this build comes from, which named a change to the agent's tool list as the step that makes 0.30.0 store the notice: the step is a changed system prompt. The harness already drives that step, while a tool-list change needs a new fixture operation, and an added tool makes 0.30.0 push a "New tools available" message whose effect on the prefix's scripted turns wasn't traced. #974 leaves the notice out by its metadata, never its text, so the cause the notice names changes nothing the merge is checked on. Runs with this commit's harness of a view of agent-framework #974 as its merge check ran it (connectome-host 3e715b4, base 53e72cac, merge 96504c57, context-manager 0.25.1 laid over), the four H1b continuations, with predictions written first: - the from-0.20.0 prefix's store holds one notice, `{system: true, kind: 'reasoning-loss'}`, stored after p.45's reply and before p.46: "[reasoning] fixture: The reasoning behind your replies up to the one beginning "[[c:p.44.r2]] …" is no longer in your context, because your system prompt changed. …". The v0.9.0 and v0.23.0 prefixes' stores hold none; - from-0.20.0's record differs: the base arm's agent compiles and a compression request carry the notice, and the merge arm's carry none. The store product holds on both arms; - on the base arm, 8 flags of check 11 (the notice sent anyway, by the previous commit's rule) and 8 of check 4 (the notice's quote of p.44.r2's canary, after p.45.r1's), as CHECKS.md now says; on the merge arm, none; - from-0.9.0, from-0.23.0 and fresh: records same, and no flags. Two such runs, before and after the previous commit's rule, wrote byte-identical from-0.20.0 records on each arm. Red: with this commit's tests on the harness before these two commits, the two new tests here and the store read's fail, and every other test passes. The harness unit tests passed 1002/1002, and the typecheck was clean, on a tree that differed from this one in two code comments, a test title and the docs. CHECKS.md: 77 runs, the fourth upgrade run and its row, and the flags a view of #974 itself shows on its base arm. The README: 77 runs. The harness README: the run's store product.
….20.0's install, measured on GitHub's runners `--shard` balances a view's jobs by these seconds, and the run the previous commit adds had none. Each is the base arm's in a view of anima-research/agent-framework#974's merge, 96504c57, run on GitHub's runners with the previous commit's harness; one sample each: - H1b/continuation/from-0.20.0: 4.4 s (3.9 s in the head arm); - H1b/prefix/from-0.20.0: 9.6 s; - v0.20.0's install: 4.1 s. The runners ran slow in this view: in the same base arm, from-0.9.0's and from-0.23.0's continuations took 5.9 s and 6.3 s against their recorded 3.9 s and 3.6 s, their prefixes 14.7 s and 11.2 s against 6 s and 7.6 s, and v0.9.0's and v0.23.0's installs 12 s and 5.5 s against 4.2 s and 3.5 s. So these three likely overstate. The share that held all three took 81 s of command time, against 115 s for the view's slowest share. In that view H1b/continuation/from-0.20.0's record differed between the arms, its base arm raising the 16 flags the previous commit names and its merge arm none of them; every other run's record was the same but H5/W12's, whose difference is one dry compile's place at step quick.held, and whose own self-check differed too. No record reads stack.json's seconds.
Summary
Addresses #973. Agent-framework 0.28.0 through 0.31.x stored a user-role notice with metadata
{ system: true, kind: 'reasoning-loss' }after signed-reasoning loss. #938 stopped writing new ones in 0.32.0, but stored copies still compile as ordinary user text. This PR hides them from the context the framework compiles and from compression inputs. #973 stays open for the summary-edge limit below.Behavior
viewFilterthat the framework already passes for tune-out, not in a filter on the compiled request. A row is hidden when it has bothmetadata.kind === 'reasoning-loss'andmetadata.system === true. The predicate is per message and deterministic, and it never looks at text, so a quote of the notice still renders, as does a row with only one flag.residentViewFilterandsubconsciousViewFilter, together withisReasoningLoss, so a host can use the framework's rules instead of copying them. The framework calls these same functions.onCompiledToSendobserver sees the filtered compile. Notices queued mid-turn are stored but not injected at tool boundaries.extract,search, around-lookup) still return the stored rows. Activation previews, reply-judge inputs and compiled inspection show the filtered view.Limits
todo. The canary fails once the installed context-manager no longer has the defect, telling whoever bumps the floor to remove the limit and thetodo.viewFilteris not retroactive). The history tools and old summaries can therefore still surface notice text.binds, the native formatter merges them. The wire shape is tested, provider acceptance is not.viewFilter; the exported predicates are for that.Tests
Local, Node 22.23.3, context-manager 0.24.2, membrane 0.8.0, rebased on
074ac60:074ac60npm testtest/reasoning-loss-omission.test.tsgoes through the real store, compiler and strategy. It covers signed thinking underbinds+dropBlock, cache markers, deferred and sharded notices, compression with the real adaptive strategy, composites, the observer, adjacent-assistant wire shape, quotes and single flags, ephemeral, conversation and inheritance contexts, and provider requests from the subconscious slot, a resumed isolated job and a reopened resident after a store restart. Thetodocase is the summary-edge migration above. A test compares the exported predicates with what the framework actually sends. Mutations removing the predicate at each seam, and redirecting the resident path, are killed.AI-assisted implementation with GPT-6.1-Sol