Skip to content

docs(adr): constrain semantic memory backends - #616

Merged
delete-cloud merged 1 commit into
mainfrom
docs/adr-0072-semantic-backend-constraints
Jun 24, 2026
Merged

delete-cloud merged 1 commit into
mainfrom
docs/adr-0072-semantic-backend-constraints

Conversation

@delete-cloud

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

Copy link
Copy Markdown
Owner

Summary

  • updates ADR-0072 with semantic memory backend constraints for future pluggable vector backends
  • keeps AgentKit provider-agnostic and places backend config, sync, schema, and retrieval policy in Coding Agent
  • adds executable acceptance-criteria names for schema identity, scoped deletion, sync/rebuild, rehydration, additive ranking, and backend contract tests

Verification

  • git diff --check
  • uv run pytest tests/coding_agent/test_semantic_tape_index.py tests/coding_agent/test_memory_switch.py -q (25 passed, warnings only)
  • local read-only review gate: initial P2 fixed, re-review APPROVE_NO_P1_P2

Notes

  • PR0 only: ADR update, no production code changes.
  • Local main has unrelated WIP and is behind remote; this PR was created from a clean worktree based on origin/main.

Summary by CodeRabbit

  • Documentation
    • Expanded the semantic indexing specification with clearer rules for how indexed results are handled and displayed.
    • Added stricter safety and validation requirements for hybrid search, scoring, and identity checks.
    • Clarified configuration behavior for enabling semantic indexing without affecting existing memory settings.
    • Added more acceptance criteria covering indexing scope, rebuild behavior, stale-result handling, and rendering safety.

Verification:\n- git diff --check\n- uv run pytest tests/coding_agent/test_semantic_tape_index.py tests/coding_agent/test_memory_switch.py -q\n- local read-only review gate: APPROVE_NO_P1_P2
@coderabbitai

coderabbitai Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6ea80c95-51f7-46e1-862c-214725e9c732

📥 Commits

Reviewing files that changed from the base of the PR and between 4fc354a and 656af27.

📒 Files selected for processing (1)
  • coding-agent/docs/adr/0072-tape-memory-semantic-index-and-enable-switch.md

📝 Walkthrough

Walkthrough

ADR-0072 is revised to tighten the semantic vector index specification: it redefines the index as a derived layer requiring authoritative-source rehydration before rendering, introduces nested [memory.semantic] config (default-disabled), strengthens hybrid merge/dedup and score-normalization rules, mandates backend schema-identity persistence with mismatch/rebuild behavior, and significantly expands the acceptance criteria checklist with new repository-gate test requirements.

Changes

ADR-0072 Semantic Index Spec Revision

Layer / File(s) Summary
Core semantic index requirements rewrite
coding-agent/docs/adr/0072-tape-memory-semantic-index-and-enable-switch.md
Rewrites requirements lines 85–152: adds derived-layer authority constraint, rehydration-only rendering, stale-hit drop/deletion scheduling, nested [memory.semantic] default-disabled config, forbidden-text guard on embeddings/queries, indexing scope limits (finalized summaries + accepted reviewed memories), backend schema-identity persistence with mismatch/rebuild rules, updated hybrid merge dedup by stable memory identity, "high-is-better" score normalization, closed-grammar validation, and scoped deletion isolation. Removes the prior TopicRangeIndex tie-break ordering text.
Acceptance criteria checklist expansion
coding-agent/docs/adr/0072-tape-memory-semantic-index-and-enable-switch.md
Adds ~20 new test bullets (lines 189–209) for semantic-index gate tests: hybrid merging determinism, schema identity mismatch behavior, disabling behavior, grammar/scope validation, stale-hit dropping, rehydration/rendering safety, additive/refill ranking, score normalization, sync scope (finalized/accepted only), manifest cache non-authority, full rebuild idempotency, sync trigger contract sharing, and backend contract test suite.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • delete-cloud/Coding-Agent-Loop#613: Modifies the same ADR-0072 document on tape-native memory's semantic index v0 and [memory] enable-switch behavior; the current PR directly revises and expands the semantics established there.

Poem

A rabbit hops through memory lanes,
Where vectors bloom and index refrains —
Rehydrate hits, drop the stale,
No score shall let determinism fail.
"High-is-better!" the schema sings,
And acceptance tests guard all the things. 🐇✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/adr-0072-semantic-backend-constraints

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.

@delete-cloud
delete-cloud marked this pull request as ready for review June 24, 2026 10:51
@delete-cloud
delete-cloud merged commit fb06514 into main Jun 24, 2026
2 checks passed
@delete-cloud
delete-cloud deleted the docs/adr-0072-semantic-backend-constraints branch June 24, 2026 11:14
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