Skip to content

refactor(core): simplify v0.23 lifecycle and vector surfaces - #1162

Merged
phernandez merged 2 commits into
mainfrom
codex/v0.23-cleanup
Jul 27, 2026
Merged

refactor(core): simplify v0.23 lifecycle and vector surfaces#1162
phernandez merged 2 commits into
mainfrom
codex/v0.23-cleanup

Conversation

@phernandez

@phernandez phernandez commented Jul 27, 2026

Copy link
Copy Markdown
Member

Why

The v0.23 release adds lifecycle-envelope capture and first-party Milvus support. Before
shipping those features, this removes compatibility layers and policy surfaces that are not
part of the intended product contract:

  • lifecycle envelopes should be small local records, not a second configurable redaction system
  • Claude and Codex should have the same default-on capture behavior
  • semantic vector configuration should select supported backends, not arbitrary Python entry points

This keeps the useful features while reducing accidental complexity before their first stable release.

What Changed

  • Keep lifecycle-envelope capture, inbox/archive processing, status, and flush, but limit captured
    payloads to bounded lifecycle metadata.
  • Make Claude envelope capture default on, matching Codex; an explicit JSON boolean false remains
    the opt-out.
  • Remove hook-specific redaction, redactKeys / redactPaths, the detect-secrets dependency, and
    the retired projector compatibility shim.
  • Preserve the separate credential-redaction utility used by configuration and diagnostics.
  • Remove dynamic semantic-vector entry-point discovery and arbitrary provider names.
  • Keep sqlite-vec automatic for SQLite and retain first-party pgvector and Milvus support.
  • Update release notes, semantic-search documentation, Claude plugin guidance and validation, and
    focused regression coverage.

Implementation Details

basic_memory hook now uses one shared default-on capture policy for Claude and Codex. Envelope
creation copies only the lifecycle fields consumed by archive tooling, and malformed or non-boolean
settings fail closed instead of enabling capture accidentally. Claude's example settings and setup
guidance expose the explicit false opt-out without carrying redaction policy.

The hook-local Redactor, its detect-secrets integration, configuration plumbing, and tests were
deleted. Automatic extractive checkpoints now preserve captured transcript and repository context
verbatim. The unrelated general-purpose credential redaction module remains unchanged.

Semantic-vector configuration is now typed as Literal["pgvector", "milvus"] for external stores.
The factory handles sqlite-vec, pgvector, and the built-in Milvus adapter directly. The generic
factory protocol, Python entry-point loader, stale extension-package contract, and their tests were
removed.

The patch removes 1,116 net lines across 27 files.

Testing

Automated

  • Changed-file uv run ruff check ...: passed.
  • Changed-file uv run ruff format --check ...: passed for all 13 Python files.
  • BASIC_MEMORY_ENV=test LOGFIRE_IGNORE_NO_CONFIG=1 uv run pytest -q tests/hooks tests/cli/test_hook_command.py tests/repository/test_semantic_vector_index.py tests/repository/test_milvus_index.py tests/test_codex_plugin_package.py: 208 passed.
  • BASIC_MEMORY_ENV=test LOGFIRE_IGNORE_NO_CONFIG=1 uv run pytest -q tests/cli/test_hook_command.py tests/hooks: 165 passed after the malformed-Claude-settings fail-closed review fix.
  • just typecheck: passed with nine pre-existing Python 3.14 event-loop deprecation warnings.
  • just package-check: passed Claude strict validation, Codex validation, all shared skills,
    Hermes tests/coverage, and OpenClaw typecheck/lint/build/tests/package dry-run.
  • just doctor: passed the end-to-end file, database, search, and status flow.
  • git diff --check: passed.

Manual

  • Verified the staged patch recognizes tests/hooks/test_projector.py to
    tests/hooks/test_archive.py as a pure rename.
  • Verified the user-owned untracked .codex/ directory is not included.
  • Verified the dynamic vector-entry-point and hook-redaction symbols have no remaining code
    references.

Risks / Follow-ups

  • Claude installations that omit captureEvents will begin recording bounded local lifecycle
    envelopes. Set captureEvents to the JSON boolean false to opt out.
  • Unsupported arbitrary semantic-vector provider names now fail configuration validation. This is
    intentional; sqlite-vec, pgvector, and first-party Milvus remain supported.
  • Two unrelated pre-existing Ruff formatting drifts and nine event-loop deprecation warnings remain
    separate cleanup candidates; they are not introduced or modified here.

Signed-off-by: phernandez <paul@basicmachines.co>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10fd06baa4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/basic_memory/cli/commands/hook.py
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: b5f4ab444e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@phernandez
phernandez merged commit 040b26c into main Jul 27, 2026
34 checks passed
@phernandez
phernandez deleted the codex/v0.23-cleanup branch July 27, 2026 16:54
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