Repository navigation
Exclude only conversation turns from a read's thread window - #277
Merged
sanil-23 merged 1 commit intoOct 15, 2026
Merged
Conversation
exclude_thread is documented as leaving the calling thread's conversation turns out, but the engines matched any item carrying the thread id. A host that stamps the thread on what the agent learns in it (OpenHuman's memory tool does) then lost those learnings from its own recall and fetch, which OpenHuman's memory tool tests caught. ThreadWindow::excludes(kind, meta) is true only for a conversation turn inside the window; the reference engine and the CortexDB engine's fetch, recall citations and evidence use it. The pre-turn pack's HolisticRecall exclusion is unchanged. Conformance now requires a learning stamped with the excluded thread to stay readable, and runs the exclusion check after recall so a recall fault is still reported by the recall check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tiny Sweeper reviewTiny Sweeper reviewed this change across 5 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below. State: Ready for maintainer review Review snapshot
Completeness: Complete FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Before mergeNone. How this fits togetherflowchart LR
n0["excluded_thread<br/>changed"]:::changed
n1["fetch_filters<br/>changed"]:::changed
n2["RecallRequest<br/>changed"]:::changed
n3["ThreadWindow<br/>changed"]:::changed
n4["gather<br/>changed"]:::changed
n5["turns_are_separated_and_attributed_by_role<br/>changed"]:::changed
n6["whole"]:::impacted
n7["map"]:::impacted
n8["clone"]:::impacted
n9["recall"]:::impacted
n10["all"]:::impacted
n11["list_all"]:::impacted
n0 -->|calls| n6
n0 -->|calls| n7
n0 -->|calls| n8
n0 -->|calls| n9
n0 -->|calls| n10
n1 -->|calls| n7
n1 -->|calls| n8
n1 -->|calls| n10
n1 -->|calls| n11
n2 -->|uses| n3
n4 -->|calls| n8
n5 -->|calls| n7
n5 -->|tests| n7
n9 -->|calls| n8
n9 -->|calls| n11
n10 -->|calls| n0
n10 -->|calls| n1
n10 -->|calls| n9
n11 -->|calls| n8
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0046 · 600,267 in / 33,630 out · 98,688 cached (16%) · ladder/vectors-oai3, glm-5.3-flash, deepseek-v4.1-flash · 412 embedded
critique: $0.0021 · 265,711 in / 14,111 out · 45,376 cached (17%) · glm-5.3-flash
security: $0.0018 · 240,598 in / 11,944 out · 45,376 cached (19%) · glm-5.3-flash
tests: $0.0004 · 54,718 in / 5,119 out · 2,048 cached (4%) · deepseek-v4.1-flash, glm-5.3-flash
description: $0.0001 · 34,577 in / 833 out · 5,888 cached (17%) · deepseek-v4.1-flash
13 tasks done
sanil-23
added a commit
to sanil-23/openhuman
that referenced
this pull request
Oct 15, 2026
…#277 Same tree as the fork commit f6a1b3cd the previous commit pinned; now reachable from tinyhumansai/tinymemory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a bug in #276:
exclude_threadis documented as leaving out the calling thread's conversation turns, but the engines matched any item carrying the thread id. OpenHuman stamps the calling thread on what its agent learns in that thread, so with #276 the agent's recall and fetch hid its own learnings from that conversation. OpenHuman's memory tool tests caught it while I was wiring #276 into OpenHuman.Related issue
Follow-up to #276. Context: tinyhumansai/openhuman-benchmarks#38.
API or behavior changes
ThreadWindow::excludes(kind, meta), true only for aConversationitem inside the window.fetchhits, recall citations and evidence-mode rendering now useexcludes, so learnings and documents stamped with the excluded thread stay readable.covers/covers_metaare unchanged, and the pre-turnHolisticRecallexclusion is unchanged.excluded_threadnow also requires a learning stamped with the excluded thread to be returned by every fetch mode and cited by recall. It runs afterrecall, so a recall fault is still reported by therecallcheck (each_fault_is_caught_by_its_check).Validation
Commands actually run, with their outcome:
cargo fmt --all -- --check: cleancargo clippy --all-targets --all-features -- -D warnings: cleancargo build --all-targets --all-features: okcargo test --all-features: 1476 passed, 0 failedRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features: okSupply chain CI fails on
maintoo:rustls 0.23.45, RUSTSEC-2026-0346 and RUSTSEC-2026-0347. It is unrelated; the fix iscargo update -p rustls(0.23.46).Tests
query::tests::a_thread_window_excludes_conversation_turns_onlycortex::engine::evidence::tests::a_learning_made_in_an_excluded_thread_stays_in_the_evidenceexcluded_threadlearning case, run against the reference engine and both CortexDB engines on the mock.Documentation
ThreadWindow's rustdoc points toexcludes. The request field docs already said "conversation turns".Checklist
#[allow(...)],#[ignore], or relaxed lints.envcontents in the diff or the description🤖 Generated with Claude Code
Summary by CodeRabbit