Skip to content

test(memory): cover sqlite semantic recall path - #636

Merged
delete-cloud merged 2 commits into
mainfrom
test/sqlite-semantic-recall-e2e
Jun 27, 2026
Merged

delete-cloud merged 2 commits into
mainfrom
test/sqlite-semantic-recall-e2e

Conversation

@delete-cloud

@delete-cloud delete-cloud commented Jun 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add a bounded task packet for the SQLite durable semantic recall proof slice
  • add a product-level regression covering SQLite durable TopicStore -> semantic rebuild -> later build_context recall
  • verify recall renders the authoritative durable topic summary instead of raw semantic backend hit text

Tests

  • uv run pytest tests/ui/test_session_manager_runtime.py::test_sqlite_durable_semantic_rebuild_recalled_by_later_build_context_without_backend_hit_text -q
  • uv run pytest tests/coding_agent/test_semantic_maintenance.py tests/coding_agent/plugins/test_semantic_memory.py -q
  • uv run pytest tests/ui/test_session_manager_runtime.py -k "selected_topic_store or semantic_topic_store or semantic_memory" -q
  • uv run pytest tests/coding_agent/test_sqlite_local_durable_fencing.py -k "selected_topic_store or topic_store or semantic" -q
  • uv run pytest tests/coding_agent/test_semantic_recall.py tests/coding_agent/test_semantic_sync.py tests/coding_agent/test_semantic_tape_index.py -q
  • uv run ruff check tests/ui/test_session_manager_runtime.py && uv run ruff format --check tests/ui/test_session_manager_runtime.py

Review

  • local subagent review: No P1/P2 findings

Summary by CodeRabbit

  • Bug Fixes

    • Improved reliability when recalling previously finalized conversation context, helping ensure later responses use saved durable memory instead of stale backend text.
  • Tests

    • Added end-to-end coverage for semantic memory rebuild and recall behavior to prevent regressions.

Add a bounded task packet and product-level regression for the local SQLite durable semantic memory path: durable topic creation/finalization, semantic rebuild, and later build_context recall from authoritative topic data.

Verification:

- uv run pytest tests/ui/test_session_manager_runtime.py::test_sqlite_durable_semantic_rebuild_recalled_by_later_build_context_without_backend_hit_text -q

- uv run pytest tests/coding_agent/test_semantic_maintenance.py tests/coding_agent/plugins/test_semantic_memory.py -q

- uv run pytest tests/ui/test_session_manager_runtime.py -k 'selected_topic_store or semantic_topic_store or semantic_memory' -q

- uv run pytest tests/coding_agent/test_sqlite_local_durable_fencing.py -k 'selected_topic_store or topic_store or semantic' -q

- uv run pytest tests/coding_agent/test_semantic_recall.py tests/coding_agent/test_semantic_sync.py tests/coding_agent/test_semantic_tape_index.py -q

- uv run ruff check tests/ui/test_session_manager_runtime.py && uv run ruff format --check tests/ui/test_session_manager_runtime.py
@coderabbitai

coderabbitai Bot commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@delete-cloud, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 26 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: debe4f33-b80a-40ec-acdb-032b062ad1c1

📥 Commits

Reviewing files that changed from the base of the PR and between 21f897c and 629d1ec.

📒 Files selected for processing (1)
  • coding-agent/tests/ui/test_session_manager_runtime.py
📝 Walkthrough

Walkthrough

Adds an end-to-end task packet for durable SQLite semantic-memory recall and a runtime test that creates a durable topic, rebuilds semantic context, and checks later recall renders the durable summary instead of backend sentinel text.

Changes

SQLite semantic recall regression

Layer / File(s) Summary
Task packet
coding-agent/.opencode/prompts/tasks/tape-memory-sqlite-recall-e2e-task-packet.md
Defines the SQLite durable semantic-memory regression flow, required assertions, target pytest commands, scope boundaries, and stop conditions.
Runtime test
coding-agent/tests/ui/test_session_manager_runtime.py
Adds imports and a new async UI/runtime test that enables semantic memory, finalizes a durable topic, rebuilds context with PipelineContext, and asserts durable summary recall while excluding backend sentinel text.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

A bunny thumps by moonlit code,
Through SQLite trails of memory gold.
Durable crumbs stay snug and true,
While backend whispers hop on through.
🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: added coverage for the SQLite semantic memory recall path.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/sqlite-semantic-recall-e2e

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@coding-agent/tests/ui/test_session_manager_runtime.py`:
- Line 301: The negative check for "stale backend value" in the session manager
runtime test is vacuous because that text is never inserted anywhere, so it
cannot validate rendering behavior. Update the test around the rendered
assertion in test_session_manager_runtime to either remove this unused check or
first upsert a distinct stale value through the same backend document path
before recall so the assertion meaningfully verifies that the output is not
stale or mutated. Keep the existing backend_sentinel coverage and make the new
assertion target a value actually introduced by the test setup.
🪄 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 Plus

Run ID: ee31eb62-0b1f-4922-bd2e-bd62d11bd897

📥 Commits

Reviewing files that changed from the base of the PR and between 3204108 and 21f897c.

📒 Files selected for processing (2)
  • coding-agent/.opencode/prompts/tasks/tape-memory-sqlite-recall-e2e-task-packet.md
  • coding-agent/tests/ui/test_session_manager_runtime.py

Keep the meaningful backend_sentinel check and drop the unused stale backend string assertion flagged by review.

Verification:

- uv run pytest tests/ui/test_session_manager_runtime.py::test_sqlite_durable_semantic_rebuild_recalled_by_later_build_context_without_backend_hit_text -q

- uv run ruff check tests/ui/test_session_manager_runtime.py

- git diff --check
@delete-cloud
delete-cloud merged commit 6947471 into main Jun 27, 2026
2 checks passed
@delete-cloud
delete-cloud deleted the test/sqlite-semantic-recall-e2e branch June 27, 2026 03:04
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