Skip to content

docs: consolidate root documentation and update architecture#279

Merged
yacosta738 merged 5 commits into
mainfrom
docs/documentation-improvement
Mar 19, 2026
Merged

docs: consolidate root documentation and update architecture#279
yacosta738 merged 5 commits into
mainfrom
docs/documentation-improvement

Conversation

@yacosta738
Copy link
Copy Markdown
Contributor

  • Move CONTRIBUTING.md and CHANGELOG.md to root\n- Update README.md with localized documentation links\n- Translate Cerebro migration guide to Spanish\n- Refresh architecture guides (EN/ES) for Rust runtime and Cerebro\n- Add developer-focused README to Cerebro module\n- Fix clippy warning and formatting in agent-runtime

This pull request introduces several improvements across documentation, code formatting, and memory API schema definitions. The most significant changes are the addition of comprehensive JSON schema files for the Cerebro memory API (in Spanish documentation), updates to documentation links and structure, and code formatting cleanups for better readability.

Memory API Schema Additions:

  • Added new JSON schema files for Cerebro memory API endpoints (in Spanish), covering operations such as saving, searching, retrieving, deleting memories, saving prompts, and managing sessions. These schemas define input/output structures for mem_save, mem_search, mem_context, mem_get_observation, mem_delete, mem_save_prompt, mem_session_start, and mem_session_end endpoints. [1] [2] [3] [4] [5] [6] [7] [8]

Documentation Improvements:

  • Updated the main README.md to provide clearer links to English and Spanish documentation, removed outdated instructions, and improved references to contribution guidelines.
  • Improved and clarified architectural documentation in Spanish, updating terminology and reflecting the current technology stack and component roles.
  • Fixed and updated documentation links in CONTRIBUTING.md, including correct paths for maintainer workflow, CI map, and security policy references. [1] [2]

Code Formatting and Readability:

  • Refactored code in clients/agent-runtime/src/tools/mcp/client.rs and clients/agent-runtime/src/tools/shell.rs for better readability, including line breaks and variable renaming for clarity. No logic changes were introduced. [1] [2] [3] [4]

- Move CONTRIBUTING.md and CHANGELOG.md to root\n- Update README.md with localized documentation links\n- Translate Cerebro migration guide to Spanish\n- Refresh architecture guides (EN/ES) for Rust runtime and Cerebro\n- Add developer-focused README to Cerebro module\n- Fix clippy warning and formatting in agent-runtime
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 19, 2026

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
📝 Walkthrough

Walkthrough

Documentation updates (English/Spanish) and MCP schema text/constraints; added local docs build commands; implemented a Storage::timeline API across Surreal/InMemory/Disk storages and hooked it into the mem_timeline tool in Cerebro, plus metadata-merge behavior in mem_update.

Changes

Cohort / File(s) Summary
Docs root & build
README.md, modules/cerebro/README.md
Switched doc links to clients/web/apps/docs/... paths and added make docs-dev / make docs-build local commands.
Architecture guides
clients/web/apps/docs/src/content/docs/guides/architecture.md, clients/web/apps/docs/src/content/docs/es/guides/architecture.md
Rewrote Cerebro section to enumerate implemented and planned MCP tools and describe multi-model storage.
Spanish Cerebro guides & migration
clients/web/apps/docs/src/content/docs/es/guides/.../architecture.md, .../cerebro/migration.md
Localization and clarifications: token env var changed to CEREBRO_AUTH_TOKEN; clarified storage fallback behavior.
MCP schema localization & minor constraints
clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/*
Multiple Spanish translations and small schema edits: added minLength: 1 to some fields, marked several endpoints as draft/unimplemented, adjusted descriptions.
MCP schema shape changes
.../mcp-schema/mem_suggest_topic_key.json, .../mem_update.json, .../mem_save.json, .../mem_get_observation.json
Structural/schema changes: removed some length constraints, replaced candidates array with candidates_count, relaxed input.observation to accept arbitrary JSON, and added non-empty string checks where noted.
Cerebro storage API & implementations
modules/cerebro/src/storage/mod.rs, .../surreal.rs, .../disk_backed (impls)
Added Storage::timeline(...) to trait and implemented it for storages; query/filter/slice timeline window by memory_id using before/after and include_deleted.
Cerebro tools
modules/cerebro/src/tools.rs
Implemented mem_timeline calling storage.timeline; enhanced mem_update to merge/replace observation.metadata when provided.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant CerebroTool as Cerebro (tools)
    participant Storage
    participant DB as SurrealDB/Backend

    Client->>CerebroTool: mem_timeline(memory_id, before, after, include_deleted)
    CerebroTool->>Storage: timeline(memory_id, before, after, include_deleted)
    Storage->>DB: query all memory records ordered by timestamp
    DB-->>Storage: rows -> Vec<MemoryRecord>
    Storage-->>CerebroTool: Vec<MemoryRecord> (windowed slice)
    CerebroTool-->>Client: { "items": [...records...] }
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

area:docs, area:web, risk:high

Suggested reviewers

  • yuniel-acosta
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title follows Conventional Commits style with 'docs' prefix and clearly summarizes the main changes: consolidating root documentation and updating architecture guides.
Description check ✅ Passed The PR description provides a comprehensive summary covering documentation moves, schema additions, architecture updates, and code formatting changes. All key aspects of the changeset are documented.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/documentation-improvement
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 19, 2026

✅ Contributor Report

User: @yacosta738
Status: Passed (12/13 metrics passed)

Metric Description Value Threshold Status
PR Merge Rate PRs merged vs closed 89% >= 30%
Repo Quality Repos with ≥100 stars 0 >= 0
Positive Reactions Positive reactions received 9 >= 1
Negative Reactions Negative reactions received 0 <= 5
Account Age GitHub account age 3065 days >= 30 days
Activity Consistency Regular activity over time 108% >= 0%
Issue Engagement Issues with community engagement 0 >= 0
Code Reviews Code reviews given to others 423 >= 0
Merger Diversity Unique maintainers who merged PRs 2 >= 0
Repo History Merge Rate Merge rate in this repo 91% >= 0%
Repo History Min PRs Previous PRs in this repo 161 >= 0
Profile Completeness Profile richness (bio, followers) 90 >= 0
Suspicious Patterns Spam-like activity detection 1 N/A

Contributor Report evaluates based on public GitHub activity. Analysis period: 2025-03-19 to 2026-03-19

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 16

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_get_observation.json`:
- Around line 10-33: The posted mem_get_observation JSON Schema is too strict:
update the schema for the "memory_id" property to require a non-empty string
(e.g., add minLength: 1) to match runtime guarantees, and change the
"observation" property to accept any JSON value (remove the restrictive "type":
"object" and "additionalProperties": true and replace with a schema that allows
any JSON value) so it aligns with the runtime behavior that returns a raw JSON
value from the Cerebro tool code that produces observations.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json`:
- Around line 1-42: The JSON schema for mem_save_prompt advertises a working
tool but the tool currently returns CerebroError::NotImplemented; either
implement the mem_save_prompt handler in the tools module (replace the
NotImplemented return with the actual save flow that returns prompt_id and
status "saved" to match the schema) or mark the schema as
non-production/unimplemented (e.g., update the title/description to state
"draft/unimplemented" and remove/loosen the output contract) so users won’t
expect a working tool; reference mem_save_prompt and
CerebroError::NotImplemented when making the change so the schema and
implementation stay consistent.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save.json`:
- Around line 10-25: The mem_save schema currently allows empty strings for
"scope", "topic_key", and "observation.content"; update the mem_save JSON schema
to enforce non-empty runtime constraints by adding a minLength: 1 (or equivalent
non-empty string constraint) to the "scope" and "topic_key" properties and to
the nested "observation" → "content" property so the schema matches the
validation enforced in modules/cerebro/src/tools.rs.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_search.json`:
- Around line 3-35: The JSON schema for "mem_search" has English user-facing
description fields (the root "description" and property descriptions for
"query", "limit", "scope", "topic_key", "include_deleted"); update those strings
to Spanish translations or append a clear "pendiente de traducción" note so the
/es/ docs are not left in English; ensure you modify the root "description" and
each property's "description" value inside the "input" object (referenced by
property names query, limit, scope, topic_key, include_deleted) to maintain
EN/ES parity.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_end.json`:
- Around line 3-25: The JSON schema in this Spanish docs path uses English
user-facing text: translate the top-level "title" ("mem_session_end"),
"description" ("Mark an active session as completed.") and the field
descriptions for "session_id", "ended_at", and "metadata" into Spanish (or, if
translation is not ready, add a clear "pending translation" note in Spanish) so
EN/ES parity is preserved; update the strings for the properties inside the
"input" object (session_id, ended_at, metadata) accordingly in the
mem_session_end schema.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_start.json`:
- Around line 3-30: The schema file mem_session_start.json in the /es/ docs
currently contains English text for "title", "description" and field
descriptions (e.g., properties.input.session_id, properties.input.agent_id,
properties.input.started_at, properties.input.metadata); update those
user-facing strings to Spanish translations or add an explicit translation
status note indicating they are pending translation and must match the EN
version; ensure parity with the English schema (same keys and constraints) while
only changing the text values or adding a clear "translation_pending"
field/comment so reviewers know it's intentionally untranslated.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json`:
- Around line 1-79: The mem_session_summary schema documents a tool that
currently returns NotImplemented at runtime; either remove this schema from the
docs or implement the actual tool so the docs and runtime match. If removing,
delete or exclude the mem_session_summary JSON schema and any references to it
(search for "mem_session_summary") so users cannot call a non-existent endpoint;
if implementing, add a backend handler (service/function) that accepts the
documented input shape (session_id, summary, metadata), persists or processes
the summary, and returns the documented output (session_id, status
"summarized"), then update the docs to confirm the endpoint is functional and
remove the NotImplemented behavior. Ensure the JSON schema in
mem_session_summary.json remains accurate to the implemented contract and update
any tests or examples that reference it.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_suggest_topic_key.json`:
- Around line 1-46: The schema for mem_suggest_topic_key mismatches the
implementation: the schema defines output.candidates (array) and allows only
"scope" in allowed_arg_fields, but the runtime returns candidates_count
(integer) and requires/validates "seed"; update either side to match. Fix option
A: change the implementation to return the full "candidates" array (max 10
strings) and ensure it accepts/validates "seed" and optional "scope" as inputs;
ensure the output contains "topic_key" and "candidates". Or option B: update
this JSON schema (mem_suggest_topic_key) to replace output.candidates with an
integer "candidates_count", and update allowed_arg_fields to include "seed" (and
mark "scope" optional) so the schema reflects the actual implementation. Target
symbols: mem_suggest_topic_key, input.seed, input.scope, output.candidates,
output.candidates_count, allowed_arg_fields.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_timeline.json`:
- Around line 1-72: The schema file for "mem_timeline" contains English
descriptions but lives in the Spanish docs; either move this JSON to the English
docs or localize the descriptive text to Spanish — update the top-level
"description" and all property description strings under "input" (e.g.,
"memory_id", "before", "after", "include_deleted") and any human-facing text in
"output" (e.g., item "summary", top-level "center_id" description if added) to
Spanish so the content matches the /es/ directory, keeping the schema structure
("title": "mem_timeline", "input", "output", required/additionalProperties)
unchanged.
- Around line 27-30: Update the "description" for the include_deleted schema
property to state that returning deleted records requires audit permissions;
specifically edit the include_deleted object's description (the
"include_deleted" property) to mention the security constraint (e.g., "Requires
audit permissions") so API consumers know the backend enforces `"include_deleted
requires audit permissions"`.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json`:
- Around line 10-34: The JSON schema for mem_update is too strict: update it so
"observation" matches runtime (accept arbitrary JSON like serde_json::Value) and
enforce the runtime non-empty requirement for "memory_id". Specifically, change
the "observation" schema in mem_update.json to allow any JSON value (e.g.,
remove the fixed "properties" object and allow any type/additionalProperties or
use a polymorphic/any schema) so it aligns with modules/cerebro/src/tools.rs
which treats observation as serde_json::Value, and add a minLength: 1 constraint
to the "memory_id" string to match the runtime validation that memory_id cannot
be empty. Ensure the schema change keeps additionalProperties true where needed
to permit arbitrary payloads.

In `@clients/web/apps/docs/src/content/docs/es/guides/cerebro/migration.md`:
- Line 39: The doc text incorrectly names the env var as
CORVUS_CEREBRO_AUTH_TOKEN while the code reads CEREBRO_AUTH_TOKEN; update the
Markdown in migration.md (including the occurrences referenced at the other two
spots) to match the actual env var used by the code by replacing
CORVUS_CEREBRO_AUTH_TOKEN with CEREBRO_AUTH_TOKEN so the docs and the
std::env::var("CEREBRO_AUTH_TOKEN") call in the Cerebro config align.
- Line 63: The sentence saying "no se intenta ninguna alternativa con SurrealDB"
is misleading; update the text to state that Cerebro may fall back to a
configured storage fallback and that StorageFallback::RemoteSurreal is an
available option. Reference the configurable `storage_fallback` behavior and
mention `StorageFallback::RemoteSurreal` as a possible fallback so the doc
matches the implementation in the Storage module.

In `@clients/web/apps/docs/src/content/docs/guides/architecture.md`:
- Around line 36-58: The architecture doc currently claims "Via MCP (JSON-RPC)
from the runtime" without clarifying which MCP endpoints are implemented; update
the English and Spanish architecture pages where that phrase appears to either
list the implemented MCP tools (e.g., mem_save, mem_search, mem_stats,
mem_timeline, mem_suggest_topic_key) or add a short note that some endpoints
(mem_save_prompt, mem_session_start, mem_session_end, mem_session_summary,
mem_context) return NotImplemented and are planned/in-progress; ensure the text
change explicitly names those NotImplemented tools so readers know current vs
planned MCP functionality.

In `@modules/cerebro/README.md`:
- Around line 20-23: The README contains two broken relative links to the
Cerebro docs; update the link targets currently pointing to
"../../docs/guides/cerebro/migration.md" and
"../../docs/guides/cerebro/mcp-schema/" to the correct paths
"../../../clients/web/apps/docs/src/content/docs/guides/cerebro/migration.md"
and "../../../clients/web/apps/docs/src/content/docs/guides/cerebro/mcp-schema/"
respectively so the links resolve; locate and replace the two link strings in
modules/cerebro/README.md.

In `@README.md`:
- Around line 180-193: Update the README links that point to non-existent paths
(`docs/index.mdx` and `docs/guides/`) to the actual docs location
`clients/web/apps/docs/src/content/docs/` (or remove the broken links and use a
short reference), and add the missing local build instructions under the "You
can also build and view the full documentation site locally" section: include
the commands `make docs-dev` for running the local dev server and `make
docs-build` for building the documentation site so users know how to run and
build the docs locally.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8bd32a91-34dd-4621-b03a-af81fe8fd173

📥 Commits

Reviewing files that changed from the base of the PR and between 556a334 and d907a81.

📒 Files selected for processing (34)
  • CHANGELOG.md
  • CONTRIBUTING.md
  • README.md
  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
  • clients/web/apps/docs/src/content/docs/es/guides/architecture.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_context.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_delete.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_get_observation.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_search.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_end.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_start.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_stats.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_suggest_topic_key.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_timeline.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/migration.md
  • clients/web/apps/docs/src/content/docs/guides/architecture.md
  • modules/cerebro/README.md
  • modules/cerebro/src/lib.rs
  • modules/cerebro/src/main.rs
  • modules/cerebro/src/migration/mod.rs
  • modules/cerebro/src/storage/mod.rs
  • modules/cerebro/src/storage/surreal.rs
  • modules/cerebro/src/tools.rs
  • modules/cerebro/src/tui/mod.rs
  • modules/cerebro/tests/embedded_storage_test.rs
  • modules/cerebro/tests/migration_workflow_test.rs
  • modules/cerebro/tests/storage_config_test.rs
  • modules/cerebro/tests/tui_non_blocking_tests.rs
  • modules/cerebro/tests/tui_redaction_tests.rs
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: pr-checks
  • GitHub Check: sonar
  • GitHub Check: Cloudflare Pages
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{md,mdx}

⚙️ CodeRabbit configuration file

**/*.{md,mdx}: Verify technical accuracy and that docs stay aligned with code changes.
For user-facing docs, check EN/ES parity or explicitly note pending translation gaps.

Files:

  • CONTRIBUTING.md
  • modules/cerebro/README.md
  • clients/web/apps/docs/src/content/docs/guides/architecture.md
  • clients/web/apps/docs/src/content/docs/es/guides/architecture.md
  • README.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/migration.md
**/*

⚙️ CodeRabbit configuration file

**/*: Security first, performance second.
Validate input boundaries, auth/authz implications, and secret management.
Look for behavioral regressions, missing tests, and contract breaks across modules.

Files:

  • CONTRIBUTING.md
  • modules/cerebro/tests/tui_non_blocking_tests.rs
  • modules/cerebro/tests/tui_redaction_tests.rs
  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
  • modules/cerebro/src/tools.rs
  • modules/cerebro/src/main.rs
  • modules/cerebro/tests/storage_config_test.rs
  • modules/cerebro/tests/migration_workflow_test.rs
  • modules/cerebro/src/migration/mod.rs
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json
  • modules/cerebro/README.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_get_observation.json
  • clients/web/apps/docs/src/content/docs/guides/architecture.md
  • clients/web/apps/docs/src/content/docs/es/guides/architecture.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_start.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_stats.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_timeline.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_search.json
  • modules/cerebro/src/tui/mod.rs
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_delete.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_end.json
  • modules/cerebro/tests/embedded_storage_test.rs
  • modules/cerebro/src/storage/surreal.rs
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json
  • README.md
  • modules/cerebro/src/storage/mod.rs
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/migration.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_suggest_topic_key.json
  • modules/cerebro/src/lib.rs
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_context.json
**/*.rs

⚙️ CodeRabbit configuration file

**/*.rs: Focus on Rust idioms, memory safety, and ownership/borrowing correctness.
Flag unnecessary clones, unchecked panics in production paths, and weak error context.
Prioritize unsafe blocks, FFI boundaries, concurrency races, and secret handling.

Files:

  • modules/cerebro/tests/tui_non_blocking_tests.rs
  • modules/cerebro/tests/tui_redaction_tests.rs
  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
  • modules/cerebro/src/tools.rs
  • modules/cerebro/src/main.rs
  • modules/cerebro/tests/storage_config_test.rs
  • modules/cerebro/tests/migration_workflow_test.rs
  • modules/cerebro/src/migration/mod.rs
  • modules/cerebro/src/tui/mod.rs
  • modules/cerebro/tests/embedded_storage_test.rs
  • modules/cerebro/src/storage/surreal.rs
  • modules/cerebro/src/storage/mod.rs
  • modules/cerebro/src/lib.rs
clients/agent-runtime/src/tools/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

Implement Tool trait in src/tools/ with strict parameter schema, validate and sanitize all inputs, and return structured ToolResult without panics in runtime path

Files:

  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
clients/agent-runtime/src/{security,gateway,tools}/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

Treat src/security/, src/gateway/, src/tools/ as high-risk surfaces and never broaden filesystem/network execution scope without explicit policy checks

Files:

  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
clients/agent-runtime/src/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

clients/agent-runtime/src/**/*.rs: Never log secrets, tokens, raw credentials, or sensitive payloads in any logging statements
Avoid unnecessary allocations, clones, and blocking operations to maintain performance and efficiency

Files:

  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
clients/agent-runtime/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

Run cargo fmt --all -- --check, cargo clippy --all-targets -- -D warnings, and cargo test for code validation, or document which checks were skipped and why

Files:

  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
clients/agent-runtime/src/{security,gateway,tools,config}/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

Do not silently weaken security policy or access constraints; keep default behavior secure-by-default with deny-by-default where applicable

Files:

  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
Repo: dallay/corvus PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-17T07:28:38.934Z
Learning: Applies to .agents/AGENTS.md : Document agent configurations and capabilities in AGENTS.md
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/main.rs : Preserve CLI contract unless change is intentional and documented; prefer explicit errors over silent fallback for unsupported critical paths
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/{security,gateway,tools,config}/**/*.rs : Do not silently weaken security policy or access constraints; keep default behavior secure-by-default with deny-by-default where applicable
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/{security,gateway,tools}/**/*.rs : Treat `src/security/`, `src/gateway/`, `src/tools/` as high-risk surfaces and never broaden filesystem/network execution scope without explicit policy checks

Applied to files:

  • CONTRIBUTING.md
  • clients/agent-runtime/src/tools/shell.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/{security,gateway,tools,config}/**/*.rs : Do not silently weaken security policy or access constraints; keep default behavior secure-by-default with deny-by-default where applicable

Applied to files:

  • CONTRIBUTING.md
  • clients/agent-runtime/src/tools/shell.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/**/*.rs : Run `cargo fmt --all -- --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo test` for code validation, or document which checks were skipped and why

Applied to files:

  • CONTRIBUTING.md
  • modules/cerebro/tests/tui_redaction_tests.rs
  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
📚 Learning: 2026-02-17T07:28:38.934Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-17T07:28:38.934Z
Learning: Applies to .agents/AGENTS.md : Document agent configurations and capabilities in AGENTS.md

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/.github/**/*.{yml,yaml} : For workflow/template-only changes, ensure YAML/template syntax validity

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-02-17T07:28:38.934Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-17T07:28:38.934Z
Learning: Applies to .agents/AGENTS.md : Maintain comprehensive agent metadata including name, description, purpose, and capabilities

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/**/*.rs : Avoid unnecessary allocations, clones, and blocking operations to maintain performance and efficiency

Applied to files:

  • CONTRIBUTING.md
  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
📚 Learning: 2026-02-17T07:28:38.934Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-17T07:28:38.934Z
Learning: Applies to .agents/AGENTS.md : Include version information and compatibility details for agents

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Include threat/risk notes and rollback strategy for security, runtime, and gateway changes; add or update tests for boundary checks and failure modes

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/main.rs : Preserve CLI contract unless change is intentional and documented; prefer explicit errors over silent fallback for unsupported critical paths

Applied to files:

  • CONTRIBUTING.md
  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
  • modules/cerebro/src/tools.rs
  • modules/cerebro/src/migration/mod.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/tools/**/*.rs : Implement `Tool` trait in `src/tools/` with strict parameter schema, validate and sanitize all inputs, and return structured `ToolResult` without panics in runtime path

Applied to files:

  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
  • modules/cerebro/src/tools.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/main.rs : Keep startup path lean and avoid heavy initialization in command parsing flow

Applied to files:

  • clients/agent-runtime/src/tools/mcp/client.rs
  • clients/agent-runtime/src/tools/shell.rs
  • modules/cerebro/src/main.rs
🪛 LanguageTool
CONTRIBUTING.md

[uncategorized] ~267-~267: The official name of this software platform is spelled with a capital “H”.
Context: ...h trait to extend - Security: See .github/SECURITY.md for r...

(GITHUB)


[uncategorized] ~267-~267: The official name of this software platform is spelled with a capital “H”.
Context: ...- Security: See .github/SECURITY.md for responsible disclosure...

(GITHUB)

clients/web/apps/docs/src/content/docs/es/guides/architecture.md

[grammar] ~36-~36: Cambia la palabra o signo.
Context: ...s siguientes pilares: ### 1. Runtime Reactivo - Tecnología: Rust (Tokio/Async) - **Pro...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)


[grammar] ~38-~38: Elimina el sustantivo
Context: ...ares: ### 1. Runtime Reactivo - Tecnología: Rust (Tokio/Async) - Propósito: Eje...

(QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_NOUN)


[grammar] ~38-~38: Elimina el sustantivo
Context: ...** - Tecnología: Rust (Tokio/Async) - Propósito: Ejecución concurrente y de alto rendimi...

(QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_NOUN)


[grammar] ~39-~39: Cambia la palabra o signo.
Context: ...urrente y de alto rendimiento de agentes - Ubicación: Runtime del agente en `clients/agent-ru...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)


[grammar] ~40-~40: Elimina la preposición
Context: ...tes - Ubicación: Runtime del agente en clients/agent-runtime/ ### 2. Cerebro (Memoria a Largo Plazo) ...

(QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_ADPOSITION)


[grammar] ~42-~42: Corrige la mayúscula.
Context: ...-runtime/` ### 2. Cerebro (Memoria a Largo Plazo) - Tecnología: Rust + Surr...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)


[grammar] ~42-~42: Corrige la mayúscula.
Context: ...me/` ### 2. Cerebro (Memoria a Largo Plazo) - Tecnología: Rust + SurrealDB ...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)


[grammar] ~42-~42: Aquí puede haber un error.
Context: ...### 2. Cerebro (Memoria a Largo Plazo) - Tecnología: Rust + SurrealDB (Embebido...

(QB_NEW_ES)


[grammar] ~44-~44: Oración con errores
Context: ...** - Tecnología: Rust + SurrealDB (Embebido) - Propósito: Servicio de memoria c...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~44-~44: Oración con errores
Context: ...ecnología**: Rust + SurrealDB (Embebido) - Propósito: Servicio de memoria central...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~45-~45: Cambia la palabra o signo.
Context: ...iente del agente con soporte para grafos - Integración: Vía MCP (JSON-RPC) desde ...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)


[grammar] ~50-~50: Cambia la palabra o signo.
Context: ...Tecnología: Rust + Docker (opcional) - Propósito: Ejecución segura de código ...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)


[grammar] ~51-~51: Cambia la palabra o signo.
Context: ...o no confiable y operaciones del sistema - Comunicación: Gestionada por el runtim...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)


[grammar] ~54-~54: Cambia la palabra o signo.
Context: ...el runtime reactivo ### 4. Panel del Operador - Tecnología: Astro + Vue 3 - **Propósit...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)


[grammar] ~56-~56: Elimina la palabra o signo.
Context: ...ivo ### 4. Panel del Operador - Tecnología: Astro + Vue 3 - Propósito: Observab...

(QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_OTHER)


[grammar] ~56-~56: Cambia la palabra o signo.
Context: ...rador** - Tecnología: Astro + Vue 3 - Propósito: Observabilidad en tiempo real e interve...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)


[grammar] ~57-~57: Cambia la palabra o signo.
Context: ...dad en tiempo real e intervención manual - Ubicación: clients/web/ ## Lógica de Construcción (Plugins de Conve...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)

README.md

[style] ~193-~193: Using many exclamation marks might seem excessive (in this case: 22 exclamation marks for a text that’s 5977 characters long)
Context: ... Contributing Contributions are welcome! Please read our [CONTRIBUTING.md](CONTR...

(EN_EXCESSIVE_EXCLAMATION)

clients/web/apps/docs/src/content/docs/es/guides/cerebro/migration.md

[grammar] ~7-~7: Elimina la palabra o signo.
Context: ...consulta la especificación de Cerebro en https://github.com/dallay/corvus/blob/ma...

(QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_SPACE)


[grammar] ~116-~116: Cambia la palabra o signo.
Context: ...i.enabled(booleano, por defecto false) -tui.event_buffer` (tamaño del búfer de eventos acotado) - ...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)


[grammar] ~117-~117: Cambia la palabra o signo.
Context: ...r(tamaño del búfer de eventos acotado) -tui.refresh_ms(intervalo de refresco de la UI) -tui....

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)


[grammar] ~118-~118: Cambia la palabra o signo.
Context: ...esh_ms(intervalo de refresco de la UI) -tui.redact_fields` (lista de denegación para claves sensibl...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)


[grammar] ~119-~119: Cambia la palabra o signo.
Context: ...sta de denegación para claves sensibles) - tui.max_payload_bytes (límite de carga para datos redactados) ...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)


[grammar] ~120-~120: Aquí puede haber un error.
Context: ... (límite de carga para datos redactados) Notas de seguridad: - Los eventos de ll...

(QB_NEW_ES)


[grammar] ~141-~141: Cambia el sustantivo.
Context: ...ort.json \ --target ./cerebro.db ``` Flags opcionales: - --namespace / `--datab...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_NOUN)


[grammar] ~145-~145: Aquí puede haber un error.
Context: ...mbres embebido específico. - --dry-run para calcular recuentos/checksums sin re...

(QB_NEW_ES)


[grammar] ~145-~145: Corrige la minúscula.
Context: ...bres embebido específico. - --dry-run para calcular recuentos/checksums sin realiz...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_LOWERCASE)

🔇 Additional comments (36)
clients/agent-runtime/src/tools/mcp/client.rs (3)

341-341: Formatting-only refactor is safe here.

Line 341 and Lines 347-350 keep the same bounded-read behavior (take(limit + 1) + read_to_end) and preserve truncation detection semantics.

Also applies to: 347-350


381-383: Receiver timeout/destructuring change preserves runtime behavior.

Lines 381-383 only reflow the recv_timeout assignment; error propagation and timeout handling are unchanged.


394-395: UTF-8 conversion refactor is behaviorally equivalent.

Lines 394-395 retain the same UTF-8 validation and error context, with no contract change.

modules/cerebro/tests/migration_workflow_test.rs (1)

2-4: LGTM! Import reordering improves clarity.

The consolidation of migration imports and early placement of serde_json::Value and std::fs aligns with common Rust import organization patterns.

modules/cerebro/src/migration/mod.rs (4)

32-33: LGTM! Idiomatic inline error mapping.

The inline chained map_err is cleaner and more idiomatic than the multi-line closure format.


52-53: LGTM! Consistent error handling style.

Matches the formatting improvement in import_legacy_export for consistency.


116-122: LGTM! Formatting improves readability.

The function signature and insert statement formatting is clean and follows Rust conventions.


127-128: LGTM! Consistent with the file's formatting style.

The inline map_err chain maintains consistency with the other formatting improvements in this file.

clients/agent-runtime/src/tools/shell.rs (1)

450-453: LGTM: Formatting-only changes.

The reformatting to single-line expressions doesn't alter test behavior or security properties. The timeout validation logic remains intact.

clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_timeline.json (1)

15-25: The schema enforces a maximum of 100 for both before and after parameters, which matches the MAX_TIMELINE_ITEMS constant in the backend implementation.

modules/cerebro/src/lib.rs (1)

10-16: LGTM!

The re-export formatting changes are consistent and maintain the same public API surface.

modules/cerebro/src/tools.rs (2)

1-9: LGTM!

Import reordering maintains the same imports with improved readability.


376-384: LGTM!

The simplified error message construction maintains identical error content for not-implemented tools while improving readability.

modules/cerebro/src/storage/surreal.rs (2)

11-11: LGTM!

Import reordering maintains the same dependencies.


74-130: LGTM!

The formatting changes to UPSERT statements and error mapping maintain identical logic and error messages while improving readability.

modules/cerebro/src/storage/mod.rs (4)

12-12: LGTM!

Import reordering maintains the same dependencies.


138-141: LGTM!

The multi-line format! call maintains identical error message content with improved readability.


257-260: LGTM!

The reformatted predicate maintains identical logic with improved readability.


361-361: LGTM!

Function signature formatting maintains the same public contract.

modules/cerebro/tests/embedded_storage_test.rs (2)

2-2: LGTM!

Import reordering maintains the same test dependencies.


19-19: LGTM!

The single-line function call maintains identical test setup logic with improved readability.

modules/cerebro/tests/storage_config_test.rs (1)

139-142: LGTM!

The reformatted error mapping maintains identical error handling logic with improved readability.

clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_stats.json (1)

1-34: Schema correctly matches implementation; EN/ES versions exist.

The JSON schema accurately reflects the mem_stats implementation in modules/cerebro/src/tools.rs (lines 625-636). Both English and Spanish versions of the schema are present, maintaining documentation parity.

CONTRIBUTING.md (2)

267-267: Security policy path is correct. The .github/SECURITY.md file exists and the reference in CONTRIBUTING.md is valid.


63-64: Documentation paths are correctly referenced and exist in the repository with EN/ES parity maintained.

modules/cerebro/tests/tui_redaction_tests.rs (1)

35-35: LGTM - formatting change only.

The assertion was reformatted to a single line with no logic changes. The test behavior remains unchanged.

modules/cerebro/tests/tui_non_blocking_tests.rs (1)

67-72: LGTM - formatting improvements.

The start_tui_task invocation and shutdown_tx.send were reformatted to multi-line for improved readability. No logic changes.

Also applies to: 88-90

modules/cerebro/src/main.rs (1)

2-2: LGTM - formatting and import reordering only.

Import statements were reordered and the start_tui_task call was reformatted to single-line. No functional changes to the startup path or initialization logic.

Also applies to: 5-5, 37-37

clients/web/apps/docs/src/content/docs/guides/architecture.md (1)

36-58: Architecture changes align with codebase migration.

The pillar updates correctly reflect:

  • Rust-based reactive runtime (Tokio/Async) in clients/agent-runtime/
  • Cerebro long-term memory service in modules/cerebro/
  • Sandboxed tools with Docker support
  • Operator dashboard using Astro + Vue 3

These changes match the documented migration from Kotlin/Spring to Rust runtime. Based on learnings, ensure the Spanish version (docs/es/guides/architecture.md) maintains EN/ES parity.

modules/cerebro/src/tui/mod.rs (1)

10-10: Formatting-only Rust changes look safe.

These edits are non-functional (import/line-wrapping/readability) and do not alter control flow, error handling, or TUI behavior.

Also applies to: 57-57, 204-205, 403-409, 474-481

clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_delete.json (1)

1-58: Schema aligns with implementation.

The mem_delete schema correctly enforces the mutual-exclusivity pattern (oneOf for memory_id/topic_key) and matches the implementation's status enum values and output structure.

clients/web/apps/docs/src/content/docs/es/guides/cerebro/migration.md (3)

23-27: Transport security enforcement is accurately documented.

The secure-by-default transport policy (https/wss required, http/ws only for loopback) correctly reflects the implementation's scheme validation logic.


55-61: Tool mapping is accurate.

The legacy-to-MCP tool aliases (memory_storemem_save, memory_recallmem_search, memory_forgetmem_delete) are clearly documented for migration.


98-126: TUI operational details are well-documented.

The optional TUI configuration, security notes (redaction, backpressure), and no-network-ports guarantee provide clear operational guidance.

clients/web/apps/docs/src/content/docs/es/guides/architecture.md (1)

36-58: No action needed. EN/ES documentation parity is maintained. Both guides/architecture.md and es/guides/architecture.md have received equivalent updates reflecting the Rust/MCP-based architecture design, with matching section structures and content at the same line positions.

clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_context.json (1)

1-62: mem_context is not yet implemented—schema verification cannot be completed.

The mem_context tool explicitly returns NotImplemented in modules/cerebro/src/tools.rs (line 384). Since there is no implementation to validate against, the schema alignment with input/output contracts, timestamp format handling, and limit bounds validation cannot be verified. The schema itself is valid JSON, but aligns with a planned feature rather than an existing implementation.

			> Likely an incorrect or invalid review comment.

Comment thread clients/web/apps/docs/src/content/docs/es/guides/cerebro/migration.md Outdated
Comment thread clients/web/apps/docs/src/content/docs/es/guides/cerebro/migration.md Outdated
Comment thread clients/web/apps/docs/src/content/docs/guides/architecture.md
Comment thread modules/cerebro/README.md Outdated
Comment thread README.md Outdated
- Fix JSON schema constraints and descriptions for Spanish docs\n- Align mem_suggest_topic_key schema with runtime implementation\n- Translate remaining English strings in Spanish documentation\n- Update architecture overview with implemented vs planned tools\n- Fix environment variable name in migration guide\n- Repair broken links in root and module READMEs\n- Add local documentation build instructions
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 19, 2026

Deploying corvus with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0165430
Status: ✅  Deploy successful!
Preview URL: https://77654b99.corvus-42x.pages.dev
Branch Preview URL: https://docs-documentation-improveme.corvus-42x.pages.dev

View logs

@sentry
Copy link
Copy Markdown

sentry Bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

♻️ Duplicate comments (3)
clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json (1)

3-4: ⚠️ Potential issue | 🟠 Major

Draft label is good, but the schema still requires a success response for an unimplemented tool.

mem_save_prompt currently returns CerebroError::NotImplemented, yet this schema still mandates output.prompt_id and output.status="saved". That is still a contract mismatch for generated clients.

💡 Suggested patch
-  "description": "Save a prompt to Cerebro (NotImplemented returning CerebroError::NotImplemented).",
+  "description": "Borrador/no implementado: actualmente devuelve CerebroError::NotImplemented.",
@@
-  "required": ["input", "output"],
+  "required": ["input"],

As per coding guidelines, **/*: "Look for behavioral regressions, missing tests, and contract breaks across modules."

Also applies to: 30-41

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json`
around lines 3 - 4, The schema for mem_save_prompt conflicts with the
implementation that returns CerebroError::NotImplemented; update the JSON schema
for mem_save_prompt so it no longer requires a successful output with
output.prompt_id and output.status="saved" — either make those fields optional
or add an alternative error response variant that models
CerebroError::NotImplemented; ensure references to mem_save_prompt,
output.prompt_id, output.status and CerebroError::NotImplemented are handled so
generated clients won’t assume a guaranteed "saved" success.
clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json (1)

14-17: ⚠️ Potential issue | 🟠 Major

observation is still not modeled as raw JSON.

The handler accepts this field as arbitrary serde_json::Value, so arrays, strings, numbers, booleans, and null are valid inputs. Keeping "type": "object" still rejects payloads the runtime accepts.

Proposed fix
         "observation": {
-          "type": "object",
-          "description": "New observation payload (raw JSON). Replaces the existing one if provided."
+          "description": "Nuevo payload de observación (JSON arbitrario). Sustituye al existente si se envía."
         },

As per coding guidelines, **/*: Look for behavioral regressions, missing tests, and contract breaks across modules.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json`
around lines 14 - 17, The schema for the "observation" field currently restricts
it to "type": "object" but the runtime accepts arbitrary JSON
(serde_json::Value); update the mem_update.json "observation" schema (the
"observation" property) to allow any JSON value—for example replace the single
"type": "object" with a broader schema such as a oneOf/anyOf that includes
object, array, string, number, boolean and null (e.g., oneOf with types
"object","array","string","number","boolean","null") while keeping the existing
description.
clients/web/apps/docs/src/content/docs/guides/architecture.md (1)

47-48: ⚠️ Potential issue | 🟡 Minor

Move mem_timeline out of the NotImplemented list.

The backend dispatch already routes mem_timeline to a real handler, so listing it under Planned Tools (NotImplemented) is inaccurate. Please move it into the implemented list and mirror the same correction in clients/web/apps/docs/src/content/docs/es/guides/architecture.md.

Proposed fix
-  - **Implemented Tools**: `mem_save`, `mem_search`, `mem_delete`, `mem_get_observation`, `mem_update`, `mem_suggest_topic_key`, `mem_stats`.
-  - **Planned Tools (NotImplemented)**: `mem_save_prompt`, `mem_session_start`, `mem_session_end`, `mem_session_summary`, `mem_context`, `mem_timeline`.
+  - **Implemented Tools**: `mem_save`, `mem_search`, `mem_delete`, `mem_get_observation`, `mem_update`, `mem_suggest_topic_key`, `mem_stats`, `mem_timeline`.
+  - **Planned Tools (NotImplemented)**: `mem_save_prompt`, `mem_session_start`, `mem_session_end`, `mem_session_summary`, `mem_context`.

As per coding guidelines, **/*.{md,mdx}: Verify technical accuracy and that docs stay aligned with code changes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@clients/web/apps/docs/src/content/docs/guides/architecture.md` around lines
47 - 48, Move the mem_timeline entry out of the "Planned Tools (NotImplemented)"
list and add it to the "Implemented Tools" list (i.e., ensure the Implemented
Tools list includes mem_timeline alongside mem_save, mem_search, etc.); apply
the same change in the Spanish translation of the same architecture guide so
both docs reflect that mem_timeline is implemented and the two lists remain
properly formatted and punctuated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_get_observation.json`:
- Line 13: The JSON schema still contains English description strings (e.g.,
"Memory ID to retrieve.") that need Spanish localization; locate the description
values containing that exact text and the other two English description fields
in the same file and replace them with their Spanish equivalents (for example
"ID de la memoria a recuperar."), ensuring all "description" values in the
schema are translated consistently into Spanish.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_start.json`:
- Around line 3-4: Update the schema header for the mem_session_start endpoint
to mark it unimplemented so it matches runtime behavior; specifically change the
schema metadata for the "mem_session_start" endpoint (title "Inicio de sesión de
memoria") to use the same draft/unimplemented treatment used by
mem_session_summary (or remove the mem_session_start schema entirely) so the
header reflects that calls currently return
CerebroError::NotImplemented("mem_session_start").

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json`:
- Around line 3-4: The Spanish header is fine but the field descriptions for
session_id, summary, and metadata are still in English; update the user-facing
strings for the JSON fields "session_id", "summary", and "metadata" to full
Spanish translations (or replace each with a clear pending-translation note in
Spanish) so the /es/ schema is not mixed-language; also apply the same change to
the other occurrences of these field docs elsewhere in this file (the later
blocks noted in the review) to ensure consistency.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_suggest_topic_key.json`:
- Around line 15-17: The JSON docs incorrectly state that "scope" is used for
collision checks even though the suggestion handler derives suggestions from
"seed" only; update the schema/docs to mark "scope" as reserved/ignored (or
remove the collision-check description) OR implement scope-aware suggestion
logic in the suggestion handler so it actually reads "scope" when
generating/validating suggestions; ensure you update the "scope" field
description in mem_suggest_topic_key.json to reflect the chosen behavior and
keep the "seed" usage consistent with the handler that currently derives
suggestions from seed.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json`:
- Around line 26-29: The schema advertises input.metadata as mergeable but the
mem_update handler never reads input.metadata; update the mem_update
implementation to consume input.metadata from the request and merge it into the
existing memory's metadata (e.g., in the mem_update handler/function where you
locate the current memory by id), performing a shallow/deep merge consistent
with other metadata behavior and persisting the merged metadata, or if you
prefer not to support this yet, remove/mark the metadata property in
mem_update.json as unsupported/reserved and update any related docs/tests;
reference the mem_update handler, input.metadata, and the mem_update.json
metadata entry when making the change.

---

Duplicate comments:
In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json`:
- Around line 3-4: The schema for mem_save_prompt conflicts with the
implementation that returns CerebroError::NotImplemented; update the JSON schema
for mem_save_prompt so it no longer requires a successful output with
output.prompt_id and output.status="saved" — either make those fields optional
or add an alternative error response variant that models
CerebroError::NotImplemented; ensure references to mem_save_prompt,
output.prompt_id, output.status and CerebroError::NotImplemented are handled so
generated clients won’t assume a guaranteed "saved" success.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json`:
- Around line 14-17: The schema for the "observation" field currently restricts
it to "type": "object" but the runtime accepts arbitrary JSON
(serde_json::Value); update the mem_update.json "observation" schema (the
"observation" property) to allow any JSON value—for example replace the single
"type": "object" with a broader schema such as a oneOf/anyOf that includes
object, array, string, number, boolean and null (e.g., oneOf with types
"object","array","string","number","boolean","null") while keeping the existing
description.

In `@clients/web/apps/docs/src/content/docs/guides/architecture.md`:
- Around line 47-48: Move the mem_timeline entry out of the "Planned Tools
(NotImplemented)" list and add it to the "Implemented Tools" list (i.e., ensure
the Implemented Tools list includes mem_timeline alongside mem_save, mem_search,
etc.); apply the same change in the Spanish translation of the same architecture
guide so both docs reflect that mem_timeline is implemented and the two lists
remain properly formatted and punctuated.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a3054c71-3809-4215-92d6-e6454e8148b3

📥 Commits

Reviewing files that changed from the base of the PR and between d907a81 and 9dbad24.

📒 Files selected for processing (15)
  • README.md
  • clients/web/apps/docs/src/content/docs/es/guides/architecture.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_get_observation.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_search.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_end.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_start.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_suggest_topic_key.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_timeline.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/migration.md
  • clients/web/apps/docs/src/content/docs/guides/architecture.md
  • modules/cerebro/README.md
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: pr-checks
  • GitHub Check: sonar
  • GitHub Check: pr-checks
  • GitHub Check: Cloudflare Pages
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{md,mdx}

⚙️ CodeRabbit configuration file

**/*.{md,mdx}: Verify technical accuracy and that docs stay aligned with code changes.
For user-facing docs, check EN/ES parity or explicitly note pending translation gaps.

Files:

  • modules/cerebro/README.md
  • clients/web/apps/docs/src/content/docs/guides/architecture.md
  • README.md
  • clients/web/apps/docs/src/content/docs/es/guides/architecture.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/migration.md
**/*

⚙️ CodeRabbit configuration file

**/*: Security first, performance second.
Validate input boundaries, auth/authz implications, and secret management.
Look for behavioral regressions, missing tests, and contract breaks across modules.

Files:

  • modules/cerebro/README.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_timeline.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_end.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save.json
  • clients/web/apps/docs/src/content/docs/guides/architecture.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_get_observation.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json
  • README.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_start.json
  • clients/web/apps/docs/src/content/docs/es/guides/architecture.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_search.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_suggest_topic_key.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/migration.md
🧠 Learnings (6)
📚 Learning: 2026-02-17T07:28:38.934Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-17T07:28:38.934Z
Learning: Applies to .agents/AGENTS.md : Document agent configurations and capabilities in AGENTS.md

Applied to files:

  • modules/cerebro/README.md
📚 Learning: 2026-02-17T07:28:38.934Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-17T07:28:38.934Z
Learning: Applies to .agents/AGENTS.md : Include version information and compatibility details for agents

Applied to files:

  • modules/cerebro/README.md
📚 Learning: 2026-02-17T07:28:38.934Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-17T07:28:38.934Z
Learning: Applies to .agents/AGENTS.md : Maintain comprehensive agent metadata including name, description, purpose, and capabilities

Applied to files:

  • modules/cerebro/README.md
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/main.rs : Preserve CLI contract unless change is intentional and documented; prefer explicit errors over silent fallback for unsupported critical paths

Applied to files:

  • clients/web/apps/docs/src/content/docs/guides/architecture.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/tools/**/*.rs : Implement `Tool` trait in `src/tools/` with strict parameter schema, validate and sanitize all inputs, and return structured `ToolResult` without panics in runtime path

Applied to files:

  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/**/*.rs : Run `cargo fmt --all -- --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo test` for code validation, or document which checks were skipped and why

Applied to files:

  • README.md
🪛 LanguageTool
clients/web/apps/docs/src/content/docs/es/guides/architecture.md

[grammar] ~45-~45: Agrega una palabra o signo.
Context: ... MCP (JSON-RPC) desde el runtime. - Herramientas Implementadas: mem_save, `mem_searc...

(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_OTHER)


[grammar] ~45-~45: Corrige la mayúscula.
Context: ...C) desde el runtime. - Herramientas Implementadas: mem_save, mem_search, `mem_delet...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)


[grammar] ~46-~46: Corrige la mayúscula.
Context: ...c_key, mem_stats. - **Herramientas Planificadas (NotImplemented)**: mem_save_prompt`, ...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)


[grammar] ~47-~47: Elimina la puntuación
Context: ...eline`. - Almacenamiento: Soporte multi-modelo que incluye SurrealDB embebido, JSON en...

(QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_PUNCTUATION)

🔇 Additional comments (6)
modules/cerebro/README.md (1)

20-22: Integration links now point to the correct docs tree.

Nice fix—this aligns module docs with the current repository documentation layout.

README.md (1)

182-183: Documentation entry points and local docs commands look correct.

Good update: EN/ES links are explicit and the local docs workflow is now actionable.

Also applies to: 189-190

clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_end.json (1)

4-4: Spanish localization updates are clear and consistent.

This improves schema readability without altering validation behavior.

Also applies to: 14-14, 19-19, 23-23

clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_timeline.json (1)

29-29: Permission requirement for include_deleted is now documented.

Great improvement—this makes the auth expectation explicit for API consumers.

clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save.json (1)

12-12: Non-empty boundary constraints are correctly enforced.

This aligns the schema with stricter runtime expectations for required string inputs.

Also applies to: 17-17, 26-26

clients/web/apps/docs/src/content/docs/es/guides/cerebro/migration.md (1)

39-39: Migration guide now matches runtime config behavior.

The auth token naming and fallback explanation are aligned with the current implementation.

Also applies to: 44-44, 51-51, 63-63

- Implement metadata merging in mem_update runtime handler\n- Complete Spanish localization for all JSON schema descriptions\n- Mark mem_session_start as unimplemented (matches runtime)\n- Relax mem_save_prompt schema constraints to handle NotImplemented state\n- Mark mem_suggest_topic_key scope as reserved/ignored\n- Generalize mem_update observation schema to allow any JSON\n- Move mem_timeline to implemented tools list in all architecture docs
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_start.json (1)

46-52: ⚠️ Potential issue | 🟠 Major

Output contract still implies implemented behavior.

Line 46-Line 52 only permits status: "started" and requires session_id, which conflicts with the unimplemented state declared at Line 3-Line 4. This still documents a success-only response for an endpoint that returns NotImplemented.

Suggested schema adjustment
     "output": {
       "type": "object",
       "properties": {
         "session_id": {
           "type": "string",
           "minLength": 1,
           "maxLength": 128
         },
         "status": {
           "type": "string",
-          "enum": ["started"]
+          "enum": ["started", "unimplemented"]
         }
       },
-      "required": ["session_id", "status"],
       "additionalProperties": false
     }

As per coding guidelines, **/*: “Look for behavioral regressions, missing tests, and contract breaks across modules.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_start.json`
around lines 46 - 52, The schema currently requires "status" to be "started" and
mandates "session_id" which contradicts the endpoint being unimplemented; update
the JSON schema in mem_session_start.json so it models both the unimplemented
response and the started-success response — e.g., replace the flat enum/required
with a discriminated oneOf (or an if/then) that allows
{"status":"not_implemented"} (no session_id required) and
{"status":"started","session_id":<string>} for success, or at minimum add
"not_implemented" to the "status" enum and make "session_id" optional; adjust
"status", "required" and the surrounding schema accordingly to reflect both
behaviors.
clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json (1)

68-74: ⚠️ Potential issue | 🟠 Major

Success-only output conflicts with draft/unimplemented status.

Line 68-Line 74 still documents only status: "summarized" with required session_id, but the endpoint is declared unimplemented at Line 3-Line 4. This keeps the schema contract inconsistent with runtime behavior.

Suggested schema adjustment
         "status": {
           "type": "string",
-          "enum": ["summarized"]
+          "enum": ["summarized", "unimplemented"]
         }
       },
-      "required": ["session_id", "status"],
       "additionalProperties": false

As per coding guidelines, **/*: “Look for behavioral regressions, missing tests, and contract breaks across modules.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json`
around lines 68 - 74, The schema currently forces "status": "summarized" and
requires "session_id" which conflicts with the endpoint being
unimplemented/draft; update the mem_session_summary.json schema: expand the
"status" enum to include the unimplemented/draft sentinel values (e.g.,
"unimplemented" and/or "draft") and make "session_id" optional by removing it
from the "required" array (or otherwise conditionally require it if you add a
JSON Schema conditional), so responses from the unimplemented endpoint validate
against the contract while keeping "summarized" as a valid state.
♻️ Duplicate comments (1)
clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json (1)

10-12: ⚠️ Potential issue | 🟡 Minor

Add minLength: 1 to memory_id to match runtime validation.

The runtime calls require_non_empty("memory_id", ...) at tools.rs:547, but this schema allows empty strings. This was flagged in a prior review but remains unaddressed.

Proposed fix
         "memory_id": {
           "type": "string",
+          "minLength": 1,
           "description": "Identificador de memoria a actualizar."
         },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json`
around lines 10 - 12, The schema property "memory_id" currently allows empty
strings but runtime enforces non-empty via require_non_empty (tools.rs:547);
update the JSON schema for "memory_id" to add "minLength": 1 so the schema
matches runtime validation and rejects empty values—locate the "memory_id"
property in mem_update.json and add the minLength constraint to it.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_suggest_topic_key.json`:
- Around line 30-35: The schema currently documents "candidates_count" as an
integer but the runtime actually returns an array under the key "candidates"
(runtime returns { "topic_key": slug, "candidates": [] }); update the JSON
schema to replace the "candidates_count" property with a "candidates" property
of type "array" (with appropriate item schema, e.g., strings or objects as used
at runtime) and update the "required" array to include "candidates" instead of
"candidates_count"; reference the output keys "topic_key", "candidates", and the
transform utility "extract_safe_output" when making the change so the schema
matches the tool's actual return value.

In `@modules/cerebro/src/storage/surreal.rs`:
- Around line 393-421: The timeline method currently SELECTs all rows and slices
in memory which won't scale; change the implementation of timeline to first
query the anchor row's timestamp by ID (e.g., SELECT timestamp FROM memory WHERE
memory_id = $id) to get the anchor_ts, then perform a second parameterized query
to fetch only surrounding rows using a timestamp range and limits (e.g., SELECT
... FROM memory WHERE timestamp >= $anchor_ts - ? AND timestamp <= $anchor_ts +
? ORDER BY timestamp ASC LIMIT ?, ?), applying the include_deleted filter in the
WHERE clause and mapping the query result back to Vec<MemoryRecord>; ensure you
use parameterized queries via self.db.query and proper error mapping as in the
current function.

In `@modules/cerebro/src/tools.rs`:
- Around line 573-589: The current metadata merge silently drops metadata when
record.observation is not a JSON object; update the logic around
input.input.metadata and record.observation so it fails explicitly instead of
ignoring the update: detect when record.observation is not an object (i.e.,
observation.as_object_mut() returns None) and return an Err (or propagate a
Result failure) with a clear message (e.g., "cannot merge metadata: observation
is not an object") or log a warning and return a failure; ensure the branches
handling current_metadata and observation_obj still perform the same merging
(current_obj.insert(...) and observation_obj.insert("metadata", metadata)) and
only replace the silent else branches that set *current_metadata = metadata or
skipped insertion with an explicit error path.

---

Outside diff comments:
In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_start.json`:
- Around line 46-52: The schema currently requires "status" to be "started" and
mandates "session_id" which contradicts the endpoint being unimplemented; update
the JSON schema in mem_session_start.json so it models both the unimplemented
response and the started-success response — e.g., replace the flat enum/required
with a discriminated oneOf (or an if/then) that allows
{"status":"not_implemented"} (no session_id required) and
{"status":"started","session_id":<string>} for success, or at minimum add
"not_implemented" to the "status" enum and make "session_id" optional; adjust
"status", "required" and the surrounding schema accordingly to reflect both
behaviors.

In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json`:
- Around line 68-74: The schema currently forces "status": "summarized" and
requires "session_id" which conflicts with the endpoint being
unimplemented/draft; update the mem_session_summary.json schema: expand the
"status" enum to include the unimplemented/draft sentinel values (e.g.,
"unimplemented" and/or "draft") and make "session_id" optional by removing it
from the "required" array (or otherwise conditionally require it if you add a
JSON Schema conditional), so responses from the unimplemented endpoint validate
against the contract while keeping "summarized" as a valid state.

---

Duplicate comments:
In
`@clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json`:
- Around line 10-12: The schema property "memory_id" currently allows empty
strings but runtime enforces non-empty via require_non_empty (tools.rs:547);
update the JSON schema for "memory_id" to add "minLength": 1 so the schema
matches runtime validation and rejects empty values—locate the "memory_id"
property in mem_update.json and add the minLength constraint to it.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 377facb7-0564-4bf8-9a9f-a5462b743091

📥 Commits

Reviewing files that changed from the base of the PR and between 9dbad24 and 4be2d6a.

📒 Files selected for processing (11)
  • clients/web/apps/docs/src/content/docs/es/guides/architecture.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_get_observation.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_start.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_suggest_topic_key.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json
  • clients/web/apps/docs/src/content/docs/guides/architecture.md
  • modules/cerebro/src/storage/mod.rs
  • modules/cerebro/src/storage/surreal.rs
  • modules/cerebro/src/tools.rs
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: sonar
  • GitHub Check: pr-checks
  • GitHub Check: pr-checks
  • GitHub Check: Cloudflare Pages
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{md,mdx}

⚙️ CodeRabbit configuration file

**/*.{md,mdx}: Verify technical accuracy and that docs stay aligned with code changes.
For user-facing docs, check EN/ES parity or explicitly note pending translation gaps.

Files:

  • clients/web/apps/docs/src/content/docs/guides/architecture.md
  • clients/web/apps/docs/src/content/docs/es/guides/architecture.md
**/*

⚙️ CodeRabbit configuration file

**/*: Security first, performance second.
Validate input boundaries, auth/authz implications, and secret management.
Look for behavioral regressions, missing tests, and contract breaks across modules.

Files:

  • clients/web/apps/docs/src/content/docs/guides/architecture.md
  • modules/cerebro/src/tools.rs
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_get_observation.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json
  • modules/cerebro/src/storage/surreal.rs
  • modules/cerebro/src/storage/mod.rs
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_start.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_suggest_topic_key.json
  • clients/web/apps/docs/src/content/docs/es/guides/architecture.md
**/*.rs

⚙️ CodeRabbit configuration file

**/*.rs: Focus on Rust idioms, memory safety, and ownership/borrowing correctness.
Flag unnecessary clones, unchecked panics in production paths, and weak error context.
Prioritize unsafe blocks, FFI boundaries, concurrency races, and secret handling.

Files:

  • modules/cerebro/src/tools.rs
  • modules/cerebro/src/storage/surreal.rs
  • modules/cerebro/src/storage/mod.rs
🧠 Learnings (2)
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/main.rs : Preserve CLI contract unless change is intentional and documented; prefer explicit errors over silent fallback for unsupported critical paths

Applied to files:

  • clients/web/apps/docs/src/content/docs/guides/architecture.md
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/tools/**/*.rs : Implement `Tool` trait in `src/tools/` with strict parameter schema, validate and sanitize all inputs, and return structured `ToolResult` without panics in runtime path

Applied to files:

  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json
  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_session_summary.json
🪛 LanguageTool
clients/web/apps/docs/src/content/docs/es/guides/architecture.md

[grammar] ~45-~45: Agrega una palabra o signo.
Context: ... MCP (JSON-RPC) desde el runtime. - Herramientas Implementadas: mem_save, `mem_searc...

(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_OTHER)


[grammar] ~45-~45: Corrige la mayúscula.
Context: ...C) desde el runtime. - Herramientas Implementadas: mem_save, mem_search, `mem_delet...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)


[grammar] ~45-~45: Elimina la palabra o signo.
Context: ..., mem_suggest_topic_key, mem_stats, mem_timeline. - **Herramientas Planificadas (NotImplemente...

(QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_OTHER)


[grammar] ~46-~46: Corrige la mayúscula.
Context: ...ts, mem_timeline. - **Herramientas Planificadas (NotImplemented)**: mem_save_prompt`, ...

(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)


[grammar] ~47-~47: Elimina la puntuación
Context: ...ntext`. - Almacenamiento: Soporte multi-modelo que incluye SurrealDB embebido, JSON en...

(QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_PUNCTUATION)

🔇 Additional comments (10)
clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_get_observation.json (1)

10-33: LGTM — Schema now aligns with runtime behavior.

The minLength: 1 constraint on memory_id and the removal of the restrictive type: "object" on observation correctly reflect the runtime's non-empty validation and raw JSON return value. Spanish translations are in place.

clients/web/apps/docs/src/content/docs/guides/architecture.md (1)

45-49: LGTM — Implemented vs planned tools now clearly documented.

The tool inventory matches the runtime implementation in modules/cerebro/src/tools.rs. This addresses the prior concern about unclear MCP endpoint status.

clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_update.json (1)

33-36: Metadata merge is now implemented — documentation is accurate.

The tools.rs:573-589 merge logic correctly handles the metadata field as documented. The Spanish description "fusionar" is now valid.

clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_suggest_topic_key.json (1)

15-17: LGTM — scope correctly marked as reserved/ignored.

This addresses the prior concern about documenting behavior that doesn't exist.

modules/cerebro/src/tools.rs (1)

640-650: LGTM — mem_timeline now calls storage layer correctly.

The implementation validates inputs, checks audit permissions for include_deleted, and delegates to storage.timeline(). Return structure matches expected output.

modules/cerebro/src/storage/mod.rs (3)

75-81: LGTM — timeline trait method is well-defined.

The signature cleanly expresses the windowing semantics. All three implementations (InMemory, DiskBacked, Surreal) use consistent filter-then-slice logic.


243-265: LGTM — InMemoryStorage::timeline implementation is correct.

Filter → sort → locate anchor → saturating window slice. The empty Vec return for missing memory_id is appropriate.


386-408: LGTM — DiskBackedStorage::timeline mirrors InMemory correctly.

Identical logic ensures consistent behavior across storage backends.

clients/web/apps/docs/src/content/docs/es/guides/architecture.md (1)

43-47: LGTM — Spanish docs maintain parity with English.

Tool inventory matches both the English architecture doc and runtime implementation. The capitalization in markdown emphasis (**Herramientas Implementadas**) is intentional styling, not a grammar error.

clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_save_prompt.json (1)

3-4: Good alignment for unimplemented state.

Marking the endpoint as draft/unimplemented and allowing "unimplemented" in output.status fixes the prior docs/runtime mismatch directionally.

Also applies to: 34-34

Comment thread modules/cerebro/src/storage/surreal.rs
Comment thread modules/cerebro/src/tools.rs
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 19, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 3 file(s) based on 3 unresolved review comments.

Files modified:

  • clients/web/apps/docs/src/content/docs/es/guides/cerebro/mcp-schema/mem_suggest_topic_key.json
  • modules/cerebro/src/storage/surreal.rs
  • modules/cerebro/src/tools.rs

Commit: 016543086dc890dce2dc0a9acfa281d5de43dbc9

The changes have been pushed to the docs/documentation-improvement branch.

Time taken: 7m 58s

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
27.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Fixed 3 file(s) based on 3 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@yacosta738 yacosta738 merged commit c7225cd into main Mar 19, 2026
15 of 16 checks passed
@yacosta738 yacosta738 deleted the docs/documentation-improvement branch March 19, 2026 21:40
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.

1 participant