Skip to content

Renames root library module to altk_evolve#138

Merged
illeatmyhat merged 5 commits into
mainfrom
rename
Apr 3, 2026
Merged

Renames root library module to altk_evolve#138
illeatmyhat merged 5 commits into
mainfrom
rename

Conversation

@illeatmyhat
Copy link
Copy Markdown
Collaborator

@illeatmyhat illeatmyhat commented Apr 3, 2026

Summary by CodeRabbit

  • New Features

    • Added Claude Code tutorial demonstrating persistent learning across sessions.
    • Added Claude Code Plugin Marketplace installation support.
    • New macOS-specific EXIF extraction guidelines in demo workspace.
  • Refactor

    • Package renamed from evolve to altk-evolve across all modules and documentation.
  • Chores

    • Updated project configuration and build workflows.
    • Updated documentation examples and navigation.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 3, 2026

Warning

Rate limit exceeded

@illeatmyhat has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 6 minutes and 0 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 6 minutes and 0 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e8bf55cd-91a9-4f8f-9dc6-3b68e89e0aae

📥 Commits

Reviewing files that changed from the base of the PR and between f9edb82 and 41155f3.

📒 Files selected for processing (11)
  • tests/e2e/test_mcp.py
  • tests/unit/test_cli.py
  • tests/unit/test_client.py
  • tests/unit/test_clustering.py
  • tests/unit/test_combine_tips.py
  • tests/unit/test_conflict_resolution.py
  • tests/unit/test_mcp_server.py
  • tests/unit/test_milvus_backend.py
  • tests/unit/test_phoenix_sync.py
  • tests/unit/test_postgres_backend.py
  • tests/unit/test_tracing.py
📝 Walkthrough

Walkthrough

This pull request performs a comprehensive package namespace rename from evolve to altk_evolve throughout the entire codebase, updating imports, packaging configuration, documentation, and tests to reflect the new package name and structure.

Changes

Cohort / File(s) Summary
Package Metadata & Build Configuration
pyproject.toml, MANIFEST.in, .github/workflows/check-code.yaml
Updated package name from evolve to altk-evolve in distribution metadata, setuptools discovery patterns, and CI workflow paths. Package entry point updated to reference altk_evolve.cli.cli:app. Frontend build directories and Jinja2 template includes redirected to altk_evolve.
Repository Metadata
.secrets.baseline, AGENTS.md
Updated timestamp in secrets baseline and adjusted environment variable config path reference from ./evolve/config to ./altk_evolve/config in setup guidance.
Primary Documentation
README.md, docs/guides/*.md, docs/reference/policies.md
Updated all module/import path references and MCP server startup commands to point to altk_evolve package namespace. Added installation section for Claude Code Plugin Marketplace.
Tutorial & Example Documentation
docs/examples/hello_world/*, docs/installation/index.md, mkdocs.yaml
Added new Claude Code example documentation, updated tutorial navigation entries, and expanded installation guidance with plugin marketplace integration.
Core Backend Implementations
altk_evolve/backend/*.py
Updated imports across base.py, filesystem.py, milvus.py, postgres.py to source schema, configuration, and utility types from altk_evolve package namespace.
CLI & Frontend API Layer
altk_evolve/cli/cli.py, altk_evolve/frontend/api/routes.py, altk_evolve/frontend/client/evolve_client.py, altk_evolve/frontend/mcp/*
Updated imports for client implementations, configuration, schema types, and backend routing to reference altk_evolve modules. Internal imports for tip clustering and MCP routes adjusted accordingly.
LLM & Schema Modules
altk_evolve/llm/**/*.py, altk_evolve/schema/*.py, altk_evolve/db/sqlite_manager.py
Updated all fact extraction, conflict resolution, tips clustering, and schema-related imports to use altk_evolve namespace. Created new __init__.py exports in altk_evolve.llm for public API surface.
Sync & Auto-Instrumentation
altk_evolve/sync/*.py, altk_evolve/auto/__init__.py
Updated Phoenix sync and auto-tracing module imports to reference altk_evolve. Added PhoenixSync to sync package exports via __init__.py.
Deprecated Legacy Package Exports
evolve/llm/__init__.py, evolve/sync/__init__.py
Removed exports of ExtractedFact, extract_facts_from_messages from evolve.llm and PhoenixSync from evolve.sync, effectively deprecating these re-export paths.
Example Scripts
examples/low_code/*.py
Updated tracing and configuration imports across litellm_demo.py, openai_agents_demo.py, simple_openai.py, smolagents_demo.py to use altk_evolve modules. Calls to altk_evolve.auto.flush_traces() updated accordingly.
Integration & E2E Tests
tests/e2e/test_e2e_pipeline.py, tests/e2e/test_mcp.py
Updated imports and module references to target altk_evolve package for settings, client, and MCP server components.
Unit Tests
tests/unit/test_*.py
Updated all test file imports for backend implementations, schema types, client, conflict resolution, tips, tracing, and policy modules to reference altk_evolve namespace. Test monkeypatch targets and runtime imports aligned with new package structure.
Demo Workspace Entities
demo/workspace/.evolve/entities/guideline/*
Added two new macOS EXIF extraction guideline documents with metadata, triggers, and rationale sections.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • Rename Kaizen to Evolve #108: Large-scale package namespace rename (kaizen → evolve) with corresponding import path and documentation updates, sharing the same pattern and scope as this PR's evolve → altk_evolve transition.

Suggested reviewers

  • vinodmut
  • visahak
  • gaodan-fang

Poem

🐰 From evolve to altk_evolve we bound,
Through every import, we've spun back around,
With packages renamed from ground to the sky,
The refactoring's complete—now watch your code fly! 🚀
Sixty files dancing to the new namespace's song,
A migration so thorough, it just can't go wrong! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 65.85% 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Renames root library module to altk_evolve' directly and clearly describes the main change: a comprehensive module renaming from 'evolve' to 'altk_evolve' across the entire codebase.

✏️ 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 rename

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.

Copy link
Copy Markdown

@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: 7

Caution

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

⚠️ Outside diff range comments (10)
tests/unit/test_milvus_backend.py (3)

80-81: ⚠️ Potential issue | 🔴 Critical

Patch target uses stale evolve namespace.

Update to altk_evolve.backend.milvus.SQLiteManager.

🐛 Proposed fix
-    with patch("evolve.backend.milvus.SQLiteManager", return_value=db_manager):
+    with patch("altk_evolve.backend.milvus.SQLiteManager", return_value=db_manager):
         result = milvus_backend.create_namespace(namespace_id=namespace_id)

Apply the same fix to all other occurrences at lines 87, 108, 127, and 145.

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

In `@tests/unit/test_milvus_backend.py` around lines 80 - 81, The test patch is
targeting the old module path "evolve.backend.milvus.SQLiteManager"; update the
patch target string to "altk_evolve.backend.milvus.SQLiteManager" wherever
SQLiteManager is patched in tests/unit/test_milvus_backend.py (the with
patch(...) calls around the milvus_backend.create_namespace and related tests),
and apply the same replacement for the other occurrences mentioned (the other
patch calls in this file).

19-21: ⚠️ Potential issue | 🔴 Critical

Patch targets use stale evolve namespace — fixture will not mock correctly.

The patches reference evolve.backend.milvus.MilvusClient and evolve.backend.milvus.SentenceTransformer, but the module is now altk_evolve.backend.milvus. The real classes will be instantiated instead of mocks.

🐛 Proposed fix
 `@pytest.fixture`(scope="module")
 def milvus_backend() -> MilvusEntityBackend:
     """Create a MilvusEntityBackend instance for testing."""
-    with patch("evolve.backend.milvus.MilvusClient"), patch("evolve.backend.milvus.SentenceTransformer"):
+    with patch("altk_evolve.backend.milvus.MilvusClient"), patch("altk_evolve.backend.milvus.SentenceTransformer"):
         backend = MilvusEntityBackend()
         return backend
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/unit/test_milvus_backend.py` around lines 19 - 21, The test patch
targets are using the old module path; update the mock targets so the fixtures
actually patch the classes used by MilvusEntityBackend: change the patch calls
that reference "evolve.backend.milvus.MilvusClient" and
"evolve.backend.milvus.SentenceTransformer" to the current module path
"altk_evolve.backend.milvus.MilvusClient" and
"altk_evolve.backend.milvus.SentenceTransformer" so that creating
MilvusEntityBackend() within the test uses the mocked MilvusClient and
SentenceTransformer.

172-174: ⚠️ Potential issue | 🔴 Critical

Patch target uses stale evolve namespace.

Update to altk_evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts.

🐛 Proposed fix
-    with patch("evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts", resolve_conflicts):
+    with patch("altk_evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts", resolve_conflicts):
         entities = [Entity(type=entity_update.type, content=entity_update.content, metadata={"key": "value"})]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/unit/test_milvus_backend.py` around lines 172 - 174, The test patches
the wrong import path for resolve_conflicts—update the patch target string in
the with patch(...) call from
"evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts" to
"altk_evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts" so
the mocked function actually overrides resolve_conflicts used by
milvus_backend.update_entities (refer to the resolve_conflicts symbol and the
with patch(...) block surrounding the call to milvus_backend.update_entities).
tests/unit/test_conflict_resolution.py (1)

250-250: ⚠️ Potential issue | 🔴 Critical

Patch target uses stale evolve namespace — tests will fail.

The @patch decorator still references evolve.llm.conflict_resolution.conflict_resolution.completion, but the module has been renamed to altk_evolve. This will cause the patch to target a non-existent module, and the actual completion function will not be mocked.

This same issue occurs at lines 311, 354, and 401.

🐛 Proposed fix
-@patch("evolve.llm.conflict_resolution.conflict_resolution.completion")
+@patch("altk_evolve.llm.conflict_resolution.conflict_resolution.completion")
 def test_resolve_conflicts_event_types(

Apply the same fix to:

  • Line 311: test_resolve_conflicts_response_parsing
  • Line 354: test_resolve_conflicts_retry_logic
  • Line 401: test_resolve_conflicts_edge_cases
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/unit/test_conflict_resolution.py` at line 250, Update the `@patch` target
strings to use the new module namespace: replace
"evolve.llm.conflict_resolution.conflict_resolution.completion" with
"altk_evolve.llm.conflict_resolution.conflict_resolution.completion" in the
decorator on the test function where it appears, and apply the same replacement
for the other occurrences used by test_resolve_conflicts_response_parsing,
test_resolve_conflicts_retry_logic, and test_resolve_conflicts_edge_cases so the
completion function is mocked from the correct module.
tests/unit/test_tracing.py (2)

106-107: ⚠️ Potential issue | 🟡 Minor

Module cache reset uses old namespace key.

This block should clear altk_evolve.auto; currently it clears evolve.auto, which can leave stale state between tests.

🔧 Suggested fix
-        if "evolve.auto" in sys.modules:
-            del sys.modules["evolve.auto"]
+        if "altk_evolve.auto" in sys.modules:
+            del sys.modules["altk_evolve.auto"]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/unit/test_tracing.py` around lines 106 - 107, The module cache reset in
tests/unit/test_tracing.py currently removes "evolve.auto" from sys.modules but
should remove the actual package key "altk_evolve.auto"; update the cleanup
block that checks sys.modules (the if/ del logic) to test for and delete
"altk_evolve.auto" (and optionally both keys if you want backward compatibility)
so tests clear the correct module namespace and avoid stale state between tests.

214-218: ⚠️ Potential issue | 🟠 Major

enable_tracing call uses an unsupported frameworks argument.

Based on the current altk_evolve.auto.enable_tracing signature, this kwarg is invalid and can raise TypeError.

🔧 Suggested fix
                 tracer = enable_tracing(
                     project="integration-test",
                     endpoint="http://test:8080/traces",
-                    frameworks=[],  # Empty list to skip framework instrumentation
                 )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/unit/test_tracing.py` around lines 214 - 218, The test calls
enable_tracing with an unsupported kwarg "frameworks", which will raise a
TypeError; update the test to remove the frameworks=... argument and call
enable_tracing(project="integration-test", endpoint="http://test:8080/traces")
(i.e., use the supported signature of enable_tracing) so the call matches the
altk_evolve.auto.enable_tracing function and no invalid keyword is passed.
tests/unit/test_postgres_backend.py (2)

21-23: ⚠️ Potential issue | 🟠 Major

Patch targets still reference deprecated evolve.* modules.

After migrating imports to altk_evolve.*, these patches are now mis-targeted and can make tests fail or become ineffective.

🔧 Suggested patch target updates
-        patch("evolve.backend.postgres.psycopg") as mock_psycopg,
-        patch("evolve.backend.postgres.register_vector"),
-        patch("evolve.backend.postgres.SentenceTransformer") as mock_transformer,
+        patch("altk_evolve.backend.postgres.psycopg") as mock_psycopg,
+        patch("altk_evolve.backend.postgres.register_vector"),
+        patch("altk_evolve.backend.postgres.SentenceTransformer") as mock_transformer,

-        patch("evolve.backend.postgres.SQLiteManager", return_value=db_manager),
-        patch("evolve.backend.postgres.sql.Literal", side_effect=lambda value: original_literal(value)) as mock_literal,
+        patch("altk_evolve.backend.postgres.SQLiteManager", return_value=db_manager),
+        patch("altk_evolve.backend.postgres.sql.Literal", side_effect=lambda value: original_literal(value)) as mock_literal,

-        patch("evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts", resolve_conflicts),
+        patch("altk_evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts", resolve_conflicts),

Also applies to: 92-94, 128-130, 155-157, 185-187, 223-223, 251-251, 275-275, 305-305

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

In `@tests/unit/test_postgres_backend.py` around lines 21 - 23, Update all test
patch targets that still reference the old "evolve.*" import path to the new
"altk_evolve.*" path so the mocks actually target the migrated modules;
specifically replace occurrences like patch("evolve.backend.postgres.psycopg"),
patch("evolve.backend.postgres.register_vector"), and
patch("evolve.backend.postgres.SentenceTransformer") (and the other listed
occurrences at ~lines 92-94, 128-130, 155-157, 185-187, 223, 251, 275, 305) with
patch("altk_evolve.backend.postgres.psycopg"),
patch("altk_evolve.backend.postgres.register_vector"), and
patch("altk_evolve.backend.postgres.SentenceTransformer") respectively so the
tests mock the correct modules.

1-401: ⚠️ Potential issue | 🟠 Major

Ruff formatting check is currently failing for this test file.

Please run ruff format tests/unit/test_postgres_backend.py (or ruff format .) to satisfy CI.

As per coding guidelines, **/*.py: Use Ruff for linting and formatting (configured in pyproject.toml).

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

In `@tests/unit/test_postgres_backend.py` around lines 1 - 401, The test file
fails Ruff formatting; run ruff format on the test file (or the repo) to
auto-format it, save the resulting edits, and commit the changes so CI passes;
locate the file by looking for the test functions such as test_ready,
test_postgres_backend_initialization_ensures_extension_before_registering_vector,
test_create_namespace, and test_update_entities to confirm formatting was
applied and that only whitespace/style changes were made before pushing.
tests/e2e/test_mcp.py (1)

187-187: ⚠️ Potential issue | 🔴 Critical

Patch target still uses the old evolve.* module path.

The @patch decorator targets "evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts", but the module has been renamed to altk_evolve. This patch will not intercept the actual function call, causing the test to invoke the real LLM-based conflict resolution instead of the mock.

🐛 Proposed fix
-        patch_target = "evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts"
+        patch_target = "altk_evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/e2e/test_mcp.py` at line 187, The patch target string is using the old
module path
"evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts" so the
`@patch` in tests/e2e/test_mcp.py doesn't intercept calls; update patch_target to
the new module path (replace the leading "evolve" with "altk_evolve") so it
points to
"altk_evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts"
(i.e., ensure the string used in the `@patch` decorator matches the current module
where resolve_conflicts is defined).
tests/unit/test_client.py (1)

187-187: ⚠️ Potential issue | 🔴 Critical

monkeypatch.setattr targets still use the old evolve.* module path.

The monkeypatch targets "evolve.frontend.client.evolve_client.extract_facts_from_messages", but the module has been renamed to altk_evolve.frontend.client.evolve_client. These patches will fail to intercept the actual function call, causing tests to:

  1. Invoke the real extract_facts_from_messages (LLM call) in test_store_user_facts_uses_trimmed_message
  2. Fail the assertion in test_store_user_facts_skips_none_empty_or_whitespace because the function won't be patched
🐛 Proposed fix
-    monkeypatch.setattr("evolve.frontend.client.evolve_client.extract_facts_from_messages", fail_extract)
+    monkeypatch.setattr("altk_evolve.frontend.client.evolve_client.extract_facts_from_messages", fail_extract)
-    monkeypatch.setattr("evolve.frontend.client.evolve_client.extract_facts_from_messages", extract)
+    monkeypatch.setattr("altk_evolve.frontend.client.evolve_client.extract_facts_from_messages", extract)

Also applies to: 212-212

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

In `@tests/unit/test_client.py` at line 187, Update the monkeypatch targets to use
the renamed module path so the patch actually replaces
extract_facts_from_messages: change any monkeypatch.setattr calls that reference
"evolve.frontend.client.evolve_client.extract_facts_from_messages" to
"altk_evolve.frontend.client.evolve_client.extract_facts_from_messages" (both
occurrences around the test functions test_store_user_facts_uses_trimmed_message
and test_store_user_facts_skips_none_empty_or_whitespace) so the fail_extract
stub is applied instead of calling the real function.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/examples/hello_world/claude.md`:
- Around line 35-37: Several fenced code blocks in the Claude example are
unlabeled (e.g., the blocks containing "where was the photo `@sample.jpg` taken?
use exif metadata.", "summarize what steps you took, including tool calls,
failed attempts, and reasoning guidelines.", "/evolve-lite:learn", "/clear", and
"what focal length was used to take the photo `@sample.jpg`? use exif metadata")
which triggers MD040; fix by adding a language identifier (e.g., change each
opening ``` to ```text) for those exact fenced blocks so they become labeled
code fences (use "text" unless another language is appropriate).

In `@docs/guides/low-code-tracing.md`:
- Line 10: Update the remaining prose and diagram labels that still mention the
old module name "evolve.auto" so they match the code snippets' new name
"altk_evolve.auto"; specifically replace occurrences in diagram labels (e.g.,
A1["import altk_evolve.auto"]) and any troubleshooting/table rows or inline
prose that reference "evolve.auto" so they read "altk_evolve.auto", ensuring all
mentions across the guide are consistent with the updated import.

In `@README.md`:
- Around line 56-60: Update the remaining outdated module paths in README.md so
startup commands are consistent: replace occurrences of the old module path
fragment like "evolve.frontend.mcp..." with the new "altk_evolve/frontend/ui"
style used in the diff, ensuring the npm commands and cd targets in the startup
sections (around the blocks spanning 63-74 and 80-84) all point to
altk_evolve/frontend/ui; search for any other references to
"evolve.frontend.mcp" or similar and standardize them to the new path string
used in the snippet.

In `@tests/e2e/test_e2e_pipeline.py`:
- Line 9: Remove the unused import phoenix_settings from the top-level import
list in the test (the import statement "from altk_evolve.config.phoenix import
phoenix_settings"); delete that name or the entire import line so the symbol is
not referenced, then run the linter/formatter (Ruff) to verify the F401 warning
is resolved.

In `@tests/unit/test_cli.py`:
- Around line 9-12: The tests import CLI and schema from altk_evolve but the
mock targets still reference the old evolve.* module path; update every
unittest.mock.patch string in tests/unit/test_cli.py (all patch(...) and
`@patch`(...) usages) to use the new altk_evolve.* import path so the patch
targets match symbols like app, Namespace, RecordedEntity, EntityUpdate and the
exception classes now imported from altk_evolve.

In `@tests/unit/test_mcp_server.py`:
- Around line 6-7: The test's mock.patch targets were left pointing at the old
evolve namespace and therefore don't intercept the imported save_trajectory and
create_entity symbols; update the mock.patch targets to the new altk_evolve
namespace (e.g., patch "altk_evolve.frontend.mcp.mcp_server.save_trajectory" and
"altk_evolve.frontend.mcp.mcp_server.create_entity" for the patches at the two
locations mentioned) so the test mocks the actual imported functions (also
update any other patch targets in the same test that refer to the old evolve.*
path to altk_evolve.*).

In `@tests/unit/test_tracing.py`:
- Line 65: The tests are patching the wrong module path; replace all patch
targets that use "evolve.auto.is_already_instrumented" with
"altk_evolve.auto.is_already_instrumented" so the code under test is actually
affected—update every occurrence in tests/unit/test_tracing.py (e.g., the patch
call at the lines referencing is_already_instrumented around the blocks at the
original 65, 74, 88, and 210) to point to
altk_evolve.auto.is_already_instrumented.

---

Outside diff comments:
In `@tests/e2e/test_mcp.py`:
- Line 187: The patch target string is using the old module path
"evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts" so the
`@patch` in tests/e2e/test_mcp.py doesn't intercept calls; update patch_target to
the new module path (replace the leading "evolve" with "altk_evolve") so it
points to
"altk_evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts"
(i.e., ensure the string used in the `@patch` decorator matches the current module
where resolve_conflicts is defined).

In `@tests/unit/test_client.py`:
- Line 187: Update the monkeypatch targets to use the renamed module path so the
patch actually replaces extract_facts_from_messages: change any
monkeypatch.setattr calls that reference
"evolve.frontend.client.evolve_client.extract_facts_from_messages" to
"altk_evolve.frontend.client.evolve_client.extract_facts_from_messages" (both
occurrences around the test functions test_store_user_facts_uses_trimmed_message
and test_store_user_facts_skips_none_empty_or_whitespace) so the fail_extract
stub is applied instead of calling the real function.

In `@tests/unit/test_conflict_resolution.py`:
- Line 250: Update the `@patch` target strings to use the new module namespace:
replace "evolve.llm.conflict_resolution.conflict_resolution.completion" with
"altk_evolve.llm.conflict_resolution.conflict_resolution.completion" in the
decorator on the test function where it appears, and apply the same replacement
for the other occurrences used by test_resolve_conflicts_response_parsing,
test_resolve_conflicts_retry_logic, and test_resolve_conflicts_edge_cases so the
completion function is mocked from the correct module.

In `@tests/unit/test_milvus_backend.py`:
- Around line 80-81: The test patch is targeting the old module path
"evolve.backend.milvus.SQLiteManager"; update the patch target string to
"altk_evolve.backend.milvus.SQLiteManager" wherever SQLiteManager is patched in
tests/unit/test_milvus_backend.py (the with patch(...) calls around the
milvus_backend.create_namespace and related tests), and apply the same
replacement for the other occurrences mentioned (the other patch calls in this
file).
- Around line 19-21: The test patch targets are using the old module path;
update the mock targets so the fixtures actually patch the classes used by
MilvusEntityBackend: change the patch calls that reference
"evolve.backend.milvus.MilvusClient" and
"evolve.backend.milvus.SentenceTransformer" to the current module path
"altk_evolve.backend.milvus.MilvusClient" and
"altk_evolve.backend.milvus.SentenceTransformer" so that creating
MilvusEntityBackend() within the test uses the mocked MilvusClient and
SentenceTransformer.
- Around line 172-174: The test patches the wrong import path for
resolve_conflicts—update the patch target string in the with patch(...) call
from "evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts" to
"altk_evolve.llm.conflict_resolution.conflict_resolution.resolve_conflicts" so
the mocked function actually overrides resolve_conflicts used by
milvus_backend.update_entities (refer to the resolve_conflicts symbol and the
with patch(...) block surrounding the call to milvus_backend.update_entities).

In `@tests/unit/test_postgres_backend.py`:
- Around line 21-23: Update all test patch targets that still reference the old
"evolve.*" import path to the new "altk_evolve.*" path so the mocks actually
target the migrated modules; specifically replace occurrences like
patch("evolve.backend.postgres.psycopg"),
patch("evolve.backend.postgres.register_vector"), and
patch("evolve.backend.postgres.SentenceTransformer") (and the other listed
occurrences at ~lines 92-94, 128-130, 155-157, 185-187, 223, 251, 275, 305) with
patch("altk_evolve.backend.postgres.psycopg"),
patch("altk_evolve.backend.postgres.register_vector"), and
patch("altk_evolve.backend.postgres.SentenceTransformer") respectively so the
tests mock the correct modules.
- Around line 1-401: The test file fails Ruff formatting; run ruff format on the
test file (or the repo) to auto-format it, save the resulting edits, and commit
the changes so CI passes; locate the file by looking for the test functions such
as test_ready,
test_postgres_backend_initialization_ensures_extension_before_registering_vector,
test_create_namespace, and test_update_entities to confirm formatting was
applied and that only whitespace/style changes were made before pushing.

In `@tests/unit/test_tracing.py`:
- Around line 106-107: The module cache reset in tests/unit/test_tracing.py
currently removes "evolve.auto" from sys.modules but should remove the actual
package key "altk_evolve.auto"; update the cleanup block that checks sys.modules
(the if/ del logic) to test for and delete "altk_evolve.auto" (and optionally
both keys if you want backward compatibility) so tests clear the correct module
namespace and avoid stale state between tests.
- Around line 214-218: The test calls enable_tracing with an unsupported kwarg
"frameworks", which will raise a TypeError; update the test to remove the
frameworks=... argument and call enable_tracing(project="integration-test",
endpoint="http://test:8080/traces") (i.e., use the supported signature of
enable_tracing) so the call matches the altk_evolve.auto.enable_tracing function
and no invalid keyword is passed.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: b9ca9247-a276-425d-b0d9-31601a3727b2

📥 Commits

Reviewing files that changed from the base of the PR and between 427e99d and f9edb82.

⛔ Files ignored due to path filters (3)
  • altk_evolve/frontend/ui/package-lock.json is excluded by !**/package-lock.json
  • docs/assets/sample.jpg is excluded by !**/*.jpg
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (112)
  • .github/workflows/check-code.yaml
  • .secrets.baseline
  • AGENTS.md
  • MANIFEST.in
  • README.md
  • altk_evolve/__init__.py
  • altk_evolve/auto/__init__.py
  • altk_evolve/backend/__init__.py
  • altk_evolve/backend/base.py
  • altk_evolve/backend/filesystem.py
  • altk_evolve/backend/milvus.py
  • altk_evolve/backend/postgres.py
  • altk_evolve/cli/__init__.py
  • altk_evolve/cli/cli.py
  • altk_evolve/config/__init__.py
  • altk_evolve/config/evolve.py
  • altk_evolve/config/filesystem.py
  • altk_evolve/config/llm.py
  • altk_evolve/config/milvus.py
  • altk_evolve/config/phoenix.py
  • altk_evolve/config/postgres.py
  • altk_evolve/db/__init__.py
  • altk_evolve/db/sqlite_manager.py
  • altk_evolve/frontend/__init__.py
  • altk_evolve/frontend/api/__init__.py
  • altk_evolve/frontend/api/routes.py
  • altk_evolve/frontend/client/__init__.py
  • altk_evolve/frontend/client/evolve_client.py
  • altk_evolve/frontend/mcp/__init__.py
  • altk_evolve/frontend/mcp/__main__.py
  • altk_evolve/frontend/mcp/mcp_server.py
  • altk_evolve/frontend/ui/.gitignore
  • altk_evolve/frontend/ui/README.md
  • altk_evolve/frontend/ui/eslint.config.js
  • altk_evolve/frontend/ui/index.html
  • altk_evolve/frontend/ui/package.json
  • altk_evolve/frontend/ui/setupTests.ts
  • altk_evolve/frontend/ui/src/App.tsx
  • altk_evolve/frontend/ui/src/components/ConfirmDialog.tsx
  • altk_evolve/frontend/ui/src/components/CreateEntityModal.tsx
  • altk_evolve/frontend/ui/src/components/Dashboard.tsx
  • altk_evolve/frontend/ui/src/components/EntityDetailModal.tsx
  • altk_evolve/frontend/ui/src/components/EntityExplorer.test.tsx
  • altk_evolve/frontend/ui/src/components/EntityExplorer.tsx
  • altk_evolve/frontend/ui/src/components/EntityTable.tsx
  • altk_evolve/frontend/ui/src/components/Namespaces.test.tsx
  • altk_evolve/frontend/ui/src/components/Namespaces.tsx
  • altk_evolve/frontend/ui/src/hooks/useApi.ts
  • altk_evolve/frontend/ui/src/hooks/useDebounce.ts
  • altk_evolve/frontend/ui/src/index.css
  • altk_evolve/frontend/ui/src/main.tsx
  • altk_evolve/frontend/ui/tsconfig.app.json
  • altk_evolve/frontend/ui/tsconfig.json
  • altk_evolve/frontend/ui/tsconfig.node.json
  • altk_evolve/frontend/ui/vite.config.ts
  • altk_evolve/llm/__init__.py
  • altk_evolve/llm/conflict_resolution/__init__.py
  • altk_evolve/llm/conflict_resolution/conflict_resolution.py
  • altk_evolve/llm/conflict_resolution/prompts/conflict_resolution.jinja2
  • altk_evolve/llm/conflict_resolution/prompts/default_conflict_resolution.jinja2
  • altk_evolve/llm/fact_extraction/__init__.py
  • altk_evolve/llm/fact_extraction/categorization.py
  • altk_evolve/llm/fact_extraction/fact_extraction.py
  • altk_evolve/llm/fact_extraction/prompts/fact_extraction.jinja2
  • altk_evolve/llm/fact_extraction/prompts/fact_extraction_predefined.jinja2
  • altk_evolve/llm/tips/__init__.py
  • altk_evolve/llm/tips/clustering.py
  • altk_evolve/llm/tips/prompts/combine_tips.jinja2
  • altk_evolve/llm/tips/prompts/generate_tips.jinja2
  • altk_evolve/llm/tips/tips.py
  • altk_evolve/schema/__init__.py
  • altk_evolve/schema/conflict_resolution.py
  • altk_evolve/schema/core.py
  • altk_evolve/schema/exceptions.py
  • altk_evolve/schema/policy.py
  • altk_evolve/schema/tips.py
  • altk_evolve/sync/__init__.py
  • altk_evolve/sync/phoenix_sync.py
  • altk_evolve/utils/__init__.py
  • altk_evolve/utils/utils.py
  • demo/workspace/.evolve/entities/guideline/on-macos-use-mdls-as-the-primary-tool-for-extracting-image.md
  • demo/workspace/.evolve/entities/guideline/when-running-exif-extraction-commands-use-a-fallback-chain.md
  • docs/examples/hello_world/bob.md
  • docs/examples/hello_world/claude.md
  • docs/guides/configuration.md
  • docs/guides/low-code-tracing.md
  • docs/guides/phoenix-sync.md
  • docs/installation/index.md
  • docs/reference/policies.md
  • evolve/llm/__init__.py
  • evolve/sync/__init__.py
  • examples/low_code/litellm_demo.py
  • examples/low_code/openai_agents_demo.py
  • examples/low_code/simple_openai.py
  • examples/low_code/smolagents_demo.py
  • mkdocs.yaml
  • pyproject.toml
  • tests/e2e/test_e2e_pipeline.py
  • tests/e2e/test_mcp.py
  • tests/llm/test_long_conflict_resolution.py
  • tests/unit/test_cli.py
  • tests/unit/test_client.py
  • tests/unit/test_clustering.py
  • tests/unit/test_combine_tips.py
  • tests/unit/test_conflict_resolution.py
  • tests/unit/test_mcp_server.py
  • tests/unit/test_milvus_backend.py
  • tests/unit/test_phoenix_sync.py
  • tests/unit/test_policy_schema.py
  • tests/unit/test_postgres_backend.py
  • tests/unit/test_tips.py
  • tests/unit/test_tracing.py
💤 Files with no reviewable changes (2)
  • evolve/sync/init.py
  • evolve/llm/init.py

Comment on lines +35 to +37
```
where was the photo @sample.jpg taken? use exif metadata.
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add language identifiers to fenced code blocks (MD040).

These fences are currently unlabeled and trigger markdownlint warnings.

🔧 Suggested markdown fix
-```
+```text
 where was the photo `@sample.jpg` taken? use exif metadata.

- +text
summarize what steps you took, including tool calls, failed attempts, and reasoning guidelines.


-```
+```text
/evolve-lite:learn

- +text
/clear


-```
+```text
what focal length was used to take the photo `@sample.jpg`? use exif metadata
</details>



Also applies to: 41-43, 48-50, 55-57, 60-62

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.22.0)</summary>

[warning] 35-35: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/examples/hello_world/claude.md around lines 35 - 37, Several fenced
code blocks in the Claude example are unlabeled (e.g., the blocks containing
"where was the photo @sample.jpg taken? use exif metadata.", "summarize what
steps you took, including tool calls, failed attempts, and reasoning
guidelines.", "/evolve-lite:learn", "/clear", and "what focal length was used to
take the photo @sample.jpg? use exif metadata") which triggers MD040; fix by
adding a language identifier (e.g., change each opening totext) for
those exact fenced blocks so they become labeled code fences (use "text" unless
another language is appropriate).


</details>

<!-- fingerprinting:phantom:poseidon:hawk:cc388200-6596-4b0b-aec2-6279934273e3 -->

<!-- This is an auto-generated comment by CodeRabbit -->

flowchart TB
subgraph Agent["Your Agent"]
A1["import evolve.auto"]
A1["import altk_evolve.auto"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Complete the module-name rename in surrounding prose/diagram.

The code snippets are updated, but the guide still references evolve.auto in non-snippet text (e.g., diagram label and troubleshooting row). Please align those to altk_evolve.auto as well.

Suggested fix
-    subgraph Evolve["evolve.auto Module"]
+    subgraph Evolve["altk_evolve.auto Module"]

-| `ModuleNotFoundError: evolve.auto` | Install: `pip install -e path/to/evolve_repo` or add to PYTHONPATH |
+| `ModuleNotFoundError: altk_evolve.auto` | Install: `pip install -e path/to/evolve_repo` or add to PYTHONPATH |

Also applies to: 52-53, 80-81, 102-103, 131-132, 153-154

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

In `@docs/guides/low-code-tracing.md` at line 10, Update the remaining prose and
diagram labels that still mention the old module name "evolve.auto" so they
match the code snippets' new name "altk_evolve.auto"; specifically replace
occurrences in diagram labels (e.g., A1["import altk_evolve.auto"]) and any
troubleshooting/table rows or inline prose that reference "evolve.auto" so they
read "altk_evolve.auto", ensuring all mentions across the guide are consistent
with the updated import.

Comment thread README.md
Comment on lines +56 to +60
> cd altk_evolve/frontend/ui
> npm ci && npm run build
> cd ../../../
> ```
> See `evolve/frontend/ui/README.md` for more frontend development details.
> See `altk_evolve/frontend/ui/README.md` for more frontend development details.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix remaining old module paths in startup commands.

The section now references altk_evolve paths, but Line 65 and Line 73 still use evolve.frontend.mcp.... This leaves README instructions inconsistent.

Suggested fix
-uv run python -m evolve.frontend.mcp
+uv run python -m altk_evolve.frontend.mcp

-uv run uvicorn evolve.frontend.mcp.mcp_server:app --host 127.0.0.1 --port 8000
+uv run uvicorn altk_evolve.frontend.mcp.mcp_server:app --host 127.0.0.1 --port 8000

Also applies to: 63-74, 80-84

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

In `@README.md` around lines 56 - 60, Update the remaining outdated module paths
in README.md so startup commands are consistent: replace occurrences of the old
module path fragment like "evolve.frontend.mcp..." with the new
"altk_evolve/frontend/ui" style used in the diff, ensuring the npm commands and
cd targets in the startup sections (around the blocks spanning 63-74 and 80-84)
all point to altk_evolve/frontend/ui; search for any other references to
"evolve.frontend.mcp" or similar and standardize them to the new path string
used in the snippet.

Comment thread tests/e2e/test_e2e_pipeline.py Outdated
Comment thread tests/unit/test_cli.py
Comment thread tests/unit/test_mcp_server.py
Comment thread tests/unit/test_tracing.py Outdated
@illeatmyhat illeatmyhat merged commit a26429d into main Apr 3, 2026
16 checks passed
vinodmut added a commit to vinodmut/kaizen that referenced this pull request Apr 3, 2026
Dir was accidentally committed in a26429d (AgentToolkit#138). Expand .gitignore
pattern from /.evolve to .evolve so it is ignored in subdirs too.
illeatmyhat pushed a commit that referenced this pull request Apr 3, 2026
)

Dir was accidentally committed in a26429d (#138). Expand .gitignore
pattern from /.evolve to .evolve so it is ignored in subdirs too.
@visahak visahak deleted the rename branch April 7, 2026 13:29
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