Skip to content

feat(memory): file the brain by connector, not by file type - #7085

Merged
M3gA-Mind merged 11 commits into
tinyhumansai:mainfrom
M3gA-Mind:feat/brain-by-connector
Oct 7, 2026
Merged

M3gA-Mind merged 11 commits into
tinyhumansai:mainfrom
M3gA-Mind:feat/brain-by-connector

Conversation

@M3gA-Mind

@M3gA-Mind M3gA-Mind commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • The brain now files each document under the connector it came from, not its file type.
    • Every local file and upload, whatever its format, goes to source:files.
    • Links and feeds go to source:web.
    • GitHub (the repository reader and the Composio toolkit alike) goes to source:github.
    • Any other connected app goes to its canonical Composio slug (source:gmail, source:googledrive).
  • Composio toolkit slugs in memory sources are canonicalized (google_drive → googledrive), and a source saved before this still matches its connections.
  • The Brain tab labels the new files source in all 16 locales.

Problem

  • A brain source is the unit memory erases when the user disconnects an app or removes a source. Local files were filed by format: a PDF in source:pdf, a markdown file in source:markdown, an HTML file in source:web next to fetched links. No node matched anything the user can actually remove.
  • A Composio memory source took its slug only lowercased. A google_drive source never matched Composio's googledrive connections, and its items would have filed under a source no connection uses.

Solution

  • memory::brain::brain_source(kind, target) maps by connector. memory_brain_ingest defaults to files.
  • files is BrainSource::Other("files") until the tinymemory pin carries BrainSource::Files (File the brain by connector: source:files, and collections below a source tinymemory#214). It is the same node, so nothing moves at that bump.
  • normalize_target() and source_id_for_toolkit() use canonicalize_toolkit_slug(), now pub(crate), so the canonical slug is defined in one place.
  • Only new writes of local files, links and feeds change node. Existing documents stay readable where they are until the migration moves them.

Submission Checklist

  • Tests added or updated:
    • synced_items_are_filed_by_their_connector covers every kind, the GitHub reader and toolkit sharing a source, and the alias slug.
    • normalize_target covers the alias, and source_id_for_toolkit covers an alias saved before this change.
    • The upload path is checked to land in source:files, and end to end over JSON-RPC: local_files_and_text_file_under_the_files_source and an_aliased_toolkit_is_one_memory_source.
    • Vitest covers brainSourceLabel.
    • Revert-checks: mapping local files back to per-format makes the connector test red, and dropping the slug canonicalization makes the alias end-to-end test red.
  • Diff coverage ≥ 80%: every changed Rust line is exercised by the tests above. I did not run the merged pnpm test:coverage locally; CI's diff-cover is the gate.
  • Coverage matrix updated: N/A, behaviour-only change.
  • Affected feature IDs: N/A, none.
  • No new external network dependencies introduced: none.
  • Manual smoke checklist: N/A, not a release-cut surface.
  • Linked issue: N/A, no issue. This implements the product decisions D1, D3 and D5 of the CortexDB memory scoping.

Impact

  • Core memory (desktop, CLI); the Brain tab shows a Files source.
  • Existing documents are not moved by this PR. They stay readable at their old nodes; re-filing them is the memory migration's job, which carries its own end-to-end test.
  • Compatibility: memory_brain_ingest, _search and _forget still accept every old source id.

Related


AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: feat/brain-by-connector
  • Commit SHA: 4171b6ab25

Validation Run

  • pnpm --filter openhuman-app format:check: prettier --check on the changed frontend files passes; cargo fmt --all -- --check passes.
  • pnpm typecheck: pass.
  • Focused tests:
    • cargo test -p openhuman --lib -- memory:: integrations::composio: 520 passed.
    • vitest run --config test/vitest.config.ts src/components/memory: 148 passed.
  • Rust fmt/check: cargo clippy -p openhuman --all-targets -- -D warnings and pnpm rust:layout pass.
  • Tauri fmt/check: N/A, no app-shell change.
  • Also run: eslint (changed files) and pnpm i18n:check pass.

Validation Blocked

  • command: pnpm i18n:english:check
  • error: 2 unexpected English strings in ja (chat.subagents.ofTotal, chat.todos.ofTotal = "{complete} / {total}").
  • impact: pre-existing on main, not touched by this PR.

Behavior Changes

  • Intended behavior change: brain documents file by connector; Composio slugs are canonical.
  • User-visible effect: the Brain tab lists Files (and connected apps) instead of PDF and Markdown for new documents.

Parity Contract

  • Legacy behavior preserved: old source ids still parse, search and forget; Composio items keep their node.
  • Guard/fallback/dispatch parity checks: an unparsable Composio slug still falls back to composio.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): none
  • Canonical PR: this one
  • Resolution (closed/superseded/updated): N/A

Summary by CodeRabbit

  • New Features
    • Local files, uploads, and text without a specified source are grouped under “Files,” regardless of format; web content remains under “Web.”
    • Memory source labels for files are now translated across supported languages.
  • Bug Fixes
    • Composio toolkit names with alternate spellings now resolve consistently to the same memory source, preventing duplicate entries for the same toolkit.
    • Files are consistently searchable under the shared “Files” source, including PDFs and other document formats.

A Composio memory source took its toolkit slug only lowercased, so
`google_drive` stayed `google_drive` while Composio names the toolkit
`googledrive`: the source never matched its own connections, and its
items would file under a brain source no connection uses.

normalize_target() now runs the slug through canonicalize_toolkit_slug()
(now pub(crate)), and source_id_for_toolkit() compares canonical slugs on
both sides, so a source saved before this still finds its connections.
A brain source is the unit memory erases when the user disconnects an
app or removes a source, so it has to name where a document came from.
Local files were filed by format (source:pdf, source:markdown, HTML in
source:web next to links), so no node matched anything a user removes.

brain_source() now maps by connector: every local file and upload to
`files`, links and feeds to `web`, GitHub (the reader and the Composio
toolkit alike) to `github`, and any other Composio toolkit to its
canonical slug. memory_brain_ingest files under `files` when no source
is named. `files` is BrainSource::Other until the tinymemory pin carries
BrainSource::Files (same node).
The migration to the connector-keyed brain re-stores every document of
the old per-type nodes under its new source. legacy_brain_node() is the
one rule it applies, as a pure function: per-format nodes (pdf, markdown,
docx, xlsx, pptx, code, other) to `files`; `web` to `files` for a file
(a file kind, or a file path, which uploads kept although they carried
the Link kind `web` implies) and to `web` for links and feeds; any other
node to its canonical Composio slug, so connectors keep their node.
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a0a50b46-39f3-4ed8-8d18-a297070111ed
📥 Commits

Reviewing files that changed from the base of the PR and between 14352b6 and 4171b6a.

📒 Files selected for processing (3)
  • crates/openhuman-core/src/memory/brain.rs
  • crates/openhuman-core/src/memory/brain_tests.rs
  • tests/memory_v2_e2e.rs
💤 Files with no reviewable changes (2)
  • crates/openhuman-core/src/memory/brain.rs
  • crates/openhuman-core/src/memory/brain_tests.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

Memory documents now use connector-based source assignments. Local files and uploads use the files source when ingestion omits a source. Composio toolkit slugs are canonicalized for source matching and duplicate detection. The memory UI has translated labels for files in 17 languages.

Changes

Memory source filing and labels

Layer / File(s) Summary
Canonicalize Composio toolkit slugs
crates/openhuman-core/src/integrations/composio/tools.rs, crates/openhuman-core/src/integrations/composio/tools/connect.rs, crates/openhuman-core/src/memory/sources/*, tests/memory_v2_e2e.rs
The Composio slug canonicalizer is available across the crate. Source target normalization, duplicate detection, and toolkit lookup use canonicalized slugs. Tests cover alias matching and duplicate rejection.
Map and ingest brain sources
crates/openhuman-core/src/memory/brain.rs, crates/openhuman-core/src/memory/brain_tests.rs, crates/openhuman-core/src/memory/convert_tests.rs, crates/openhuman-core/src/memory/sources/sync.rs, tests/memory_v2_e2e.rs
Brain source mapping uses connector kind and target. Files and text default to files when no source is supplied. Tests check source mappings, stored namespaces, source listings, and search results.
Display translated files source labels
app/src/components/memory/memoryLifecycleLabels*, app/src/lib/i18n/*
The memory UI uses a translated label for the files source. Translation entries were added in 17 languages. Tests cover files, web, and gmail labels.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: codeghost21

Merge Risk: ⚪ Minimal · up to 4171b

No actionable merge-blocking issue is established in the supplied changes. The new ingestion test’s listing and search checks use a mock backend that exposes accepted writes synchronously.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 4171b

Documents now share connector-based groups, and toolkit aliases resolve to one identity. Existing source and connection deletion filters remain narrowly scoped. Compatibility with older records and cleanup during concurrent background writes is not fully established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed grouping affects documents within their existing memory layout roots. A brain forget operation for files now covers all newly filed local formats in that root, while toolkit aliases share a canonical brain group. This is a broader grouping unit, not evidence of access to another tenant or environment.

Trust Boundaries and Controls

  • observed — User-supplied Composio targets remain nonempty toolkit slugs restricted to ASCII alphanumerics, underscores, and hyphens before canonicalization. Connection discovery still requires active connections. Canonicalization does not create credentials or authorize a connection.
  • observed — Configured-source removal filters memory by its persisted source ID. Connection cleanup filters by Composio source kind and the exact connection tag. Neither filter derives deletion authority from the canonical toolkit slug, countering unintended deletion widening across connections.

Resilience and Maintainability Implications

  • observed — Legacy saved aliases are recognized during duplicate detection and direct source lookup, but lookup chooses the first canonical match rather than reconciling multiple saved entries. Scheduled sync separately passes the saved target to connection discovery; compatibility of that path with legacy aliases remains unresolved.

Hardening Proposals

  • proposed — For the subsequent migration, validate privacy cleanup using historical alias nodes, existing source IDs, and multiple connections. Include interrupted migration, repeated sync, rollback, and removal racing with writes; verify that cleanup remains complete without deleting unrelated connections' records.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 95.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 24 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: filing memory documents by connector instead of file type.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit files a note away,
In files it rests through night and day.
Slugs align, each source in place,
New labels greet it, face to face.
I twitch my nose and hop along,
The memory paths now hum a song.

Comment @coderabbitai help to get the list of available commands.

@tinysweeper

tinysweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Tiny Sweeper completed its review; deterministic results follow.

State: Reviewing pending checks
Priority: medium
Reviewed head: b004d58ef753
Updated: 1791392934 (Unix time)

Review snapshot

Change surface Files Review signal Count
Production 23 Active findings 2
Tests 6 Noted findings 0
Documentation 0 Resolved findings 37
Configuration 0 Pending checks/questions 4

Completeness: Complete
Test assessment: Test coverage is assessed from changed tests and lane evidence; execution is not claimed without trusted check data.

What changed

The pull request refiles brain documents by connector rather than by file format. `brain_source` now keys on the source kind: GitHub, web, or a Composio toolkit's canonical slug, while local files and text of every format are filed under a single `files` source instead of per-format nodes like `pdf`/`markdown`. `canonicalize_toolkit_slug` is promoted to `pub(crate)` and applied when normalizing Composio targets, matching configured sources, and deriving source ids, so legacy aliases like `google_drive` are treated as the same toolkit as `googledrive` and duplicates are rejected. The UI adds a translated `files` brain source label across 17 locales. This revision also adds a poll-until-queryable helper for e2e reads of writes.

Features

  • Modified — Brain documents filed by connector instead of file type: Synced items are filed at `source:<connector>` nodes and local files or uploads of every format are filed under a single `files` source; disconnecting or removing a connector now erases one source. `BrainIngestParams.source` defaults to `files` for both path and text ingests. (crates/openhuman-core/src/memory/brain.rs#pub async fn ingest(config: &Config, params: BrainIngestParams) -> MemoryResult<, crates/openhuman-core/src/memory/brain.rs#pub struct BrainIngestParams {, crates/openhuman-core/src/memory/sources/sync.rs#pub(crate) async fn store_all()
  • Modified — Composio toolkit slug canonicalization: `canonicalize_toolkit_slug` is promoted to `pub(crate)` and applied in `normalize_target`, `apply_add` duplicate detection, and `source_id_for_toolkit`, so legacy alias targets (e.g. `google_drive`) are recognized as the same toolkit as the canonical slug and duplicate sources are rejected. (crates/openhuman-core/src/integrations/composio/tools/connect.rs#use super::super::types::{ComposioConnectionsResponse, ComposioToolkitsResponse}, crates/openhuman-core/src/memory/sources/mod.rs#pub fn normalize_target(kind: MemorySourceKind, target: &str) -> MemoryResult<St, crates/openhuman-core/src/memory/sources/mod.rs#pub fn apply_add(, crates/openhuman-core/src/memory/sources/composio.rs#pub async fn sync_toolkit()
  • Added — Localized `files` brain source label: The UI translates the `files` brain source label in 17 locales, and connected apps are shown by their own slug verbatim. (app/src/components/memory/memoryLifecycleLabels.ts#type Translate = (key: string, fallback?: string) => string;, app/src/lib/i18n/en.ts#const en: TranslationMap = {, app/src/lib/i18n/ar.ts#const messages: TranslationMap = {, app/src/lib/i18n/zh-CN.ts#const messages: TranslationMap = {)

Tests

  • e2e — `local_files_and_text_file_under_the_files_source` ingests a file and pasted text over RPC without naming a source, asserts both are filed under `files`, and uses `ok_until` to wait for the sources listing and scoped search to reflect the writes.: Pins the new default filing through the running core while handling asynchronous indexing; the critique lane notes the legacy-node scenario is separate and still not driven with genuinely pre-migration persisted data. (tests/memory_v2_e2e.rs#impl Fixture {, tests/memory_v2_e2e.rs#async fn sources_add_sync_list_and_remove() {)
  • e2e — `a_document_at_an_old_per_format_node_stays_listed_searchable_and_forgettable` ingests a document explicitly under the legacy `pdf` source alongside a default `files` document, asserts both are listed, an unscoped search reads both, and the legacy node is forgettable, using `ok_until` for the reads.: Covers legacy per-format node visibility beside `files`; the critique lane notes this exercises the migration through the new code path rather than seeding genuinely legacy persisted data, so the migration remains only partially verified end to end. (tests/memory_v2_e2e.rs#async fn sources_add_sync_list_and_remove() {, tests/memory_v2_e2e.rs#impl Fixture {)
  • e2e — `an_aliased_toolkit_is_one_memory_source` adds a Composio source with target `Google_Drive` over RPC, asserts it is stored as `googledrive`, and asserts a second add under `googledrive` is rejected as a duplicate.: Pins slug canonicalization and duplicate detection through the add RPC. (tests/memory_v2_e2e.rs#async fn sources_add_sync_list_and_remove() {)
  • unit — `synced_items_are_filed_by_their_connector` pins `brain_source` for each kind, including Composio aliases (`google_drive` to `googledrive`, `github` shared with the GitHub reader) and files of any format to `files`.: Pins the connector-keyed filing logic, including alias handling. (crates/openhuman-core/src/memory/brain_tests.rs#async fn a_file_is_converted_and_filed_by_its_format() {)
  • unit — `a_file_is_converted_and_filed_under_files` and `brain_ingest_files_a_pdf_by_path` assert ingested files (including a PDF) land at the `source:files` namespace.: Pins the per-format to `files` filing change at the brain-ingest and conversion layers. (crates/openhuman-core/src/memory/brain_tests.rs#async fn a_file_is_converted_and_filed_by_its_format() {, crates/openhuman-core/src/memory/convert_tests.rs#async fn brain_ingest_files_a_pdf_by_path() {)
  • unit — `source_id_for_toolkit_prefers_the_configured_source` and `normalize_target_accepts_each_kinds_shape`/`add_validates_kind_schedule_and_target` pin alias matching against configured sources and duplicate rejection.: Pins the legacy alias compatibility in source-id derivation and `apply_add`. (crates/openhuman-core/src/memory/sources/composio_tests.rs#fn source_id_for_toolkit_prefers_the_configured_source() {, crates/openhuman-core/src/memory/sources/mod_tests.rs#fn normalize_target_accepts_each_kinds_shape() {, crates/openhuman-core/src/memory/sources/mod_tests.rs#fn add_validates_kind_schedule_and_target() {)
  • unit — `brainSourceLabel` tests assert known sources (including `files`) translate and connected apps show their slug verbatim.: Pins the UI label behaviour; would fail if the `files` case regressed. (app/src/components/memory/memoryLifecycleLabels.test.ts)

Findings

  • medium · critique · Seed a genuinely legacy per-format node — This labels a document as “old”, but creates it through the current `memory_brain_ingest` RPC. That does not establish a pre-migration persisted `source:pdf` node, so the test can (tests/memory\_v2\_e2e\.rs:1352)

Previously reported and still active

  • Drive a legacy per-format node through migration end to end

Resolved this pass

  • Preserve duplicate detection for legacy toolkit slugs
  • No end-to-end test drives local files filing under `files`
  • Wait for ingested documents to become queryable
  • medium — No end-to-end test drives local files filing under `files`
  • medium — Legacy brain-node migration is unverified end to end
  • medium — Drive a legacy per-format node through the migration end to end
  • medium — Verify legacy-brain migration end to end
  • medium — Wait for ingested documents to become queryable
  • medium — Preserve duplicate detection for legacy toolkit slugs
  • Preserve duplicate detection for legacy toolkit slugs
  • No end-to-end test drives local files filing under `files`
  • Legacy brain-node migration is unverified end to end
  • Verify legacy brain-node migration end to end
  • Drive a legacy per-format node through the migration end to end
  • Drive the legacy node migration end to end
  • Drive a legacy brain-node migration end to end
  • Drive legacy brain-node migration end to end
  • Wait for ingested documents to become queryable
  • Drive the legacy brain-node migration end to end
  • Drive a legacy brain-node migration end to end
  • Drive a legacy per-format node through the migration end to end
  • Drive the legacy brain-node migration end to end
  • Drive legacy brain-node migration end to end
  • Drive a legacy brain-node migration end to end
  • Verify legacy brain-node migration end to end
  • Wait for ingested documents to become queryable
  • Preserve duplicate detection for legacy toolkit slugs
  • No end-to-end test drives local files filing under `files`
  • Legacy brain-node migration is unverified end to end
  • Preserve duplicate detection for legacy toolkit slugs
  • Verify legacy brain-node migration end to end
  • Drive a legacy per-format node through the migration end to end
  • Drive the legacy node migration end to end
  • Wait for ingested documents to become queryable
  • Drive legacy brain-node migration end to end
  • Drive the legacy brain-node migration end to end
  • Drive a legacy brain-node migration end to end

Pending checks: Rust E2E (mock backend), Build Playwright E2E Artifact, E2E (Playwright / web lane), Desktop E2E (full suite, 3 OS)

Before merge

  • Address carried finding Drive a legacy per-format node through migration end to end.
  • Wait for Rust E2E (mock backend), Build Playwright E2E Artifact, E2E (Playwright / web lane), Desktop E2E (full suite, 3 OS).

How this fits together

flowchart LR
  n0["german"]:::impacted
  n1["missingKeys"]:::impacted
  n2["simplifiedChinese"]:::impacted
  n1 -->|uses| n0
  n1 -->|uses| n2
  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
Loading
Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: The new tests cover local-file classification, eventual indexing, and duplicate aliased toolkit detection. The legacy-node scenario is still not an end-to-end migration test, so the change should not merge without exercising genuinely pre-migration persisted data. (9 earlier finding(s) still open) _Code retrieval was unavailable (model: ladder embeddings returned 400 Bad Request: {"error":{"message":"unknown ladder vectors; known ladders are flash (also chat-v1, flash-v1), instant (also no-think, instant-v1), reasoning (also deepseek), max-reasoning (also max-reasoning-v1), deepseek-flash (also reasoning-v1, agentic-v1), deep (also luna), scribe, uncensored, vectors-oai3 (also embeddings-oai3-v1), vision (also vision-v1, multimodal-v1), image (also images-v1, image-v1), vi), so this review saw the diff alone._ _Memory was unavailable (model: cortex: v1/recall: error sending request for url (http://cortexdb:3141/v1/recall\)\), so this review ran without it._
  • Evidence: tests/memory\_v2\_e2e\.rs — Seed a genuinely legacy per-format node

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The security lane reports no new security or authorization issue is evident and considers the change safe to merge.
  • Lane summary: The added end-to-end coverage waits for asynchronous indexing and exercises local files, legacy sources, and toolkit aliases. No new security or authorization issue is evident, and the change is safe to merge. (16 earlier finding(s) still open) _Code retrieval was unavailable (model: ladder embeddings returned 400 Bad Request: {"error":{"message":"unknown ladder vectors; known ladders are flash (also chat-v1, flash-v1), instant (also no-think, instant-v1), reasoning (also deepseek), max-reasoning (also max-reasoning-v1), deepseek-flash (also reasoning-v1, agentic-v1), deep (also luna), scribe, uncensored, vectors-oai3 (also embeddings-oai3-v1), vision (also vision-v1, multimodal-v1), image (also images-v1, image-v1), vi), so this review saw the diff alone._ _Memory was unavailable (model: cortex: v1/recall: error sending request for url (http://cortexdb:3141/v1/recall\)\), so this review ran without it._

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The tests lane reports the new e2e tests drive local files and text filing under `files`, a legacy per-format node staying listed, searchable and forgettable beside the new node, and an aliased toolkit being treated as one source, each with assertions that would fail on regression.
  • Lane summary: The new e2e tests in tests/memory_v2_e2e.rs now drive the behaviours my earlier findings asked for: local files and pasted text filing under `files`, a legacy per-format node (`source:pdf`) staying listed, searchable and forgettable beside the new node, and an aliased toolkit being treated as one source — each with assertions that would fail on regression. The review is resolved; the change looks safe to merge. (1 earlier finding(s) still open) _Code retrieval was unavailable (model: ladder embeddings returned 400 Bad Request: {"error":{"message":"unknown ladder vectors; known ladders are flash (also chat-v1, flash-v1), instant (also no-think, instant-v1), reasoning (also deepseek), max-reasoning (also max-reasoning-v1), deepseek-flash (also reasoning-v1, agentic-v1), deep (also luna), scribe, uncensored, vectors-oai3 (also embeddings-oai3-v1), vision (also vision-v1, multimodal-v1), image (also images-v1, image-v1), vi), so this review saw the diff alone._ _Memory was unavailable (model: cortex: v1/recall: error sending request for url (http://cortexdb:3141/v1/recall\)\), so this review ran without it._

commits

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: Nothing sensitive found in what this pull request commits.

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: This revision adds the end-to-end tests the earlier reviews asked for: local files and text filing under `files`, a legacy per-format node (`source:pdf`) staying listed, searchable and forgettable, and an aliased Composio toolkit deduplicating against its canonical slug. The prior concerns about unverified legacy-node migration, missing alias duplicate-detection coverage, and reads racing writes (now handled by the `ok_until` helper) are all addressed. The change looks sound and ready to merge. (4 earlier finding(s) still open) _Code retrieval was unavailable (model: ladder embeddings returned 400 Bad Request: {"error":{"message":"unknown ladder vectors; known ladders are flash (also chat-v1, flash-v1), instant (also no-think, instant-v1), reasoning (also deepseek), max-reasoning (also max-reasoning-v1), deepseek-flash (also reasoning-v1, agentic-v1), deep (also luna), scribe, uncensored, vectors-oai3 (also embeddings-oai3-v1), vision (also vision-v1, multimodal-v1), image (also images-v1, image-v1), vi), so this review saw the diff alone._ _Memory was unavailable (model: cortex: v1/recall: error sending request for url (http://cortexdb:3141/v1/recall\)\), so this review ran without it._

e2e

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: This revision adds three end-to-end tests in tests/memory_v2_e2e.rs that drive the behavioural changes: local files and pasted text filing under the `files` source (with a poll-until-queryable helper), legacy per-format brain nodes staying listed/searchable/forgettable, and alias-canonicalized Composio toolkit duplicate detection. All previously raised coverage gaps are now addressed; the change looks sound from the end-to-end perspective, though the new CI jobs are still pending. Waiting on end-to-end jobs: `Rust E2E (mock backend)`, `Build Playwright E2E Artifact`, `E2E (Playwright / web lane)`, `Desktop E2E (full suite, 3 OS)`. (1 earlier finding(s) still open)
  • Unresolved questions/checks: Rust E2E (mock backend), Build Playwright E2E Artifact, E2E (Playwright / web lane), Desktop E2E (full suite, 3 OS)
Evidence and run details
  • Models: gpt-5.6-luna, glm-5.3-flash
  • Spend: $0.004491
  • Tokens: 123268 input · 6136 output · 7892 cached · 0 embedding
Head State Pass summary
430ab41aa0ac pending 4 active finding(s), 8 resolved finding(s) (at 1791383014)
14352b6ff773 pending 3 active finding(s), 16 resolved finding(s) (at 1791385312)
4171b6ab2550 pending 5 active finding(s), 23 resolved finding(s) (at 1791390533)
d09abe33329b pending 4 active finding(s), 38 resolved finding(s) (at 1791391559)
b004d58ef753 pending 1 active finding(s), 37 resolved finding(s) (at 1791392934)

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0264 · 391,406 in / 16,400 out · 59,653 cached (15%) · gpt-5.6-luna, glm-5.3-flash
critique:    $0.0129 · 170,731 in / 6,808 out  · 45,469 cached (27%) · gpt-5.6-luna, glm-5.3-flash
security:    $0.0130 · 167,810 in / 4,684 out  · 11,240 cached (7%)  · gpt-5.6-luna
tests:       $0.0001 · 12,232 in  / 533 out    · 1,536 cached (13%)  · glm-5.3-flash
description: $0.0001 · 12,880 in  / 248 out    · 1,408 cached (11%)  · glm-5.3-flash
e2e:         $0.0001 · 15,874 in  / 131 out    · 0 cached (0%)       · glm-5.3-flash

Comment thread crates/openhuman-core/src/memory/sources/mod.rs
@tinysweeper tinysweeper Bot added the priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. label Oct 7, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 7, 2026
brain_ingest_files_a_pdf_by_path only runs with the documents feature,
so the focused memory:: run missed it; it now expects the files source
and checks the node the document landed at.
A source saved as google_drive before targets were canonicalized and a
new googledrive one name the same toolkit, but apply_add compared the
stored target literally and added the second. It now canonicalizes the
saved Composio target before comparing.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0077 · 118,980 in / 5,446 out · 8,490 cached (7%)  · gpt-5.6-luna, glm-5.3-flash
critique:    $0.0027 · 23,728 in  / 1,242 out · 2,031 cached (9%)  · gpt-5.6-luna
security:    $0.0045 · 38,290 in  / 1,372 out · 1,787 cached (5%)  · gpt-5.6-luna
tests:       $0.0001 · 13,234 in  / 238 out   · 1,536 cached (12%) · glm-5.3-flash
description: $0.0001 · 13,988 in  / 93 out    · 1,408 cached (10%) · glm-5.3-flash
e2e:         $0.0001 · 16,933 in  / 871 out   · 1,728 cached (10%) · glm-5.3-flash

Comment thread crates/openhuman-core/src/memory/brain.rs
Comment thread crates/openhuman-core/src/memory/brain.rs Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 7, 2026
End to end through the running core: memory_brain_ingest with a file
path and with text, neither naming a source, files both under files,
memory_brain_sources lists that one source with both documents, and a
search of it finds them.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0078 · 169,214 in / 9,618 out · 14,680 cached (9%) · gpt-5.6-luna, glm-5.3-flash
critique:    $0.0047 · 65,182 in  / 3,794 out · 9,136 cached (14%) · gpt-5.6-luna, glm-5.3-flash
security:    $0.0025 · 29,376 in  / 2,074 out · 5,352 cached (18%) · gpt-5.6-luna
tests:       $0.0001 · 13,933 in  / 773 out   · 64 cached (0%)     · glm-5.3-flash
description: $0.0001 · 14,687 in  / 227 out   · 64 cached (0%)     · glm-5.3-flash
e2e:         $0.0001 · 17,569 in  / 772 out   · 64 cached (0%)     · glm-5.3-flash

Comment thread tests/memory_v2_e2e.rs
Comment thread tests/memory_v2_e2e.rs
Comment thread tests/memory_v2_e2e.rs
Comment thread tests/memory_v2_e2e.rs
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 7, 2026
… to end

Over JSON-RPC through the running core: a document at an old per-format
node (source:pdf) stays listed beside files, searchable and forgettable
until the migration re-files it; a Composio source added as Google_Drive
is stored as googledrive, and adding googledrive again is refused.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0096 · 221,152 in / 11,671 out · 19,050 cached (9%)  · gpt-5.6-luna, glm-5.3-flash
critique:    $0.0029 · 40,896 in  / 2,228 out  · 4,056 cached (10%)  · gpt-5.6-luna, glm-5.3-flash
security:    $0.0060 · 70,834 in  / 4,792 out  · 12,050 cached (17%) · gpt-5.6-luna
tests:       $0.0003 · 30,437 in  / 1,389 out  · 1,536 cached (5%)   · glm-5.3-flash
description: $0.0001 · 15,504 in  / 458 out    · 1,408 cached (9%)   · glm-5.3-flash
e2e:         $0.0001 · 18,030 in  / 582 out    · 0 cached (0%)       · glm-5.3-flash

Comment thread tests/memory_v2_e2e.rs
Comment thread tests/memory_v2_e2e.rs Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 7, 2026
legacy_brain_node() had no caller here: it is the migration's rule, and
it belongs with the job that re-files old documents and the end-to-end
test that proves it, so it leaves this change. The alias end-to-end
test stays, as an_aliased_toolkit_is_one_memory_source.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0123 · 300,352 in / 15,937 out · 31,021 cached (10%) · gpt-5.6-luna, glm-5.3-flash
critique:    $0.0067 · 132,308 in / 7,358 out  · 15,259 cached (12%) · gpt-5.6-luna, glm-5.3-flash
security:    $0.0049 · 92,680 in  / 3,787 out  · 10,962 cached (12%) · gpt-5.6-luna
tests:       $0.0001 · 13,234 in  / 673 out    · 1,536 cached (12%)  · glm-5.3-flash
description: $0.0001 · 13,988 in  / 749 out    · 1,408 cached (10%)  · glm-5.3-flash
e2e:         $0.0001 · 16,561 in  / 1,348 out  · 1,728 cached (10%)  · glm-5.3-flash

Comment thread crates/openhuman-core/src/memory/brain.rs
Comment thread tests/memory_v2_e2e.rs Outdated
Comment thread tests/memory_v2_e2e.rs
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 7, 2026
…d to end

A document stored at source:pdf before the brain was filed by connector
stays listed beside files, is found by an unscoped brain search, and can
be forgotten by its source, over JSON-RPC through the running core.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0038 · 163,706 in / 10,137 out · 18,039 cached (11%) · gpt-5.6-luna, glm-5.3-flash
critique:    $0.0013 · 57,246 in  / 3,811 out  · 7,893 cached (14%)  · gpt-5.6-luna, glm-5.3-flash
security:    $0.0020 · 46,261 in  / 3,101 out  · 8,482 cached (18%)  · gpt-5.6-luna
tests:       $0.0001 · 13,847 in  / 367 out    · 64 cached (0%)      · glm-5.3-flash
description: $0.0001 · 14,459 in  / 297 out    · 1,408 cached (10%)  · glm-5.3-flash
e2e:         $0.0001 · 17,179 in  / 293 out    · 64 cached (0%)      · glm-5.3-flash

Comment thread tests/memory_v2_e2e.rs
Comment thread tests/memory_v2_e2e.rs
Comment thread tests/memory_v2_e2e.rs
Comment thread tests/memory_v2_e2e.rs
The fixture's backend answers a read of a fresh write at once, but the
brain e2e cases now wait (bounded, ten seconds) for the listing and the
search to show what was ingested, so they hold on a backend that indexes
after it answers.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0045 · 123,268 in / 6,136 out · 7,892 cached (6%)  · gpt-5.6-luna, glm-5.3-flash
critique:    $0.0026 · 20,359 in  / 1,850 out · 2,540 cached (12%) · gpt-5.6-luna, glm-5.3-flash
security:    $0.0012 · 24,242 in  / 1,176 out · 5,352 cached (22%) · gpt-5.6-luna
tests:       $0.0001 · 14,338 in  / 337 out   · 0 cached (0%)      · glm-5.3-flash
description: $0.0001 · 14,950 in  / 450 out   · 0 cached (0%)      · glm-5.3-flash
e2e:         $0.0001 · 17,669 in  / 343 out   · 0 cached (0%)      · glm-5.3-flash

Comment thread tests/memory_v2_e2e.rs
@M3gA-Mind
M3gA-Mind merged commit 5700baf into tinyhumansai:main Oct 7, 2026
30 of 32 checks passed
M3gA-Mind added a commit that referenced this pull request Oct 7, 2026
fix(memory): forget a disconnected app's items within its own source (stacked on #7085)
M3gA-Mind added a commit that referenced this pull request Oct 7, 2026
feat(memory): replace a connector record's previous version on re-sync (stacked on #7090, #7085)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant