Skip to content

Make scoped memory writes, retrieval and workspace processing reliable - #201

Merged
Coding-Dev-Tools merged 10 commits into
mainfrom
codex/reliable-agent-memory
Sep 5, 2026
Merged

Make scoped memory writes, retrieval and workspace processing reliable#201
Coding-Dev-Tools merged 10 commits into
mainfrom
codex/reliable-agent-memory

Conversation

@Coding-Dev-Tools

@Coding-Dev-Tools Coding-Dev-Tools commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Description

Repairs cases where distinct evidence disappeared during packing, independent engines accepted duplicate writes, stale indexes missed canonical memories, and dashboard search or temporal filtering disagreed with the engine.

  • Make resolution and canonical persistence atomic across processes, keep native batch publication inside the transaction, and add durable external-index repair with canonical fallback.
  • Acknowledge confirmed repair generations, serialize external erasure against repair, preserve compensation after rollback, and rebuild recreated same-identity indexes while keeping healthy startup incremental.
  • Preserve factual and conditional evidence during packing. Deduplicate reordered bare environment labels only for identical content; retain relationships expressed in titles and bodies.
  • Add complete server-side Library search and pagination, canonical temporal browsing, independent Ask states, truthful diagnostics, and preserved installation capabilities.
  • Require explicit workspace approval for readable managed processing, enforce the operator veto before Cloud calls and local approval, and bind acknowledgement to the current policy revision. Encrypted sync has separate controls.
  • Generate the MCP contract consumed by Pi and Prime, normalize runtime-dependent description indentation, and align Pro and Team trial contracts.

The findings register, compatibility decisions, remaining backlog, migration and rollback instructions, and reproducible evidence are in docs/RELIABILITY_PROGRAM.md and docs/evidence/reliability/. The review includes the original four unmerged feature commits and existing local edits. Historical branches and the stash were reconciled separately; no unique recovery patch was missing.

Type

  • Bug fix
  • New feature
  • Documentation
  • CI/CD

Verification

Four bounded internal reviewers returned their findings; the parent reviewed and integrated the changes.

  • Final repair, recall, service, secret-hygiene, batch and native-vector tests: 281 passed, 1 Windows symlink skip.
  • Final resolver and engine tests: 185 passed, 2 Windows symlink skips.
  • Editable update and installation-profile tests: 64 passed, including 18 capability-preservation scenarios.
  • MCP contract tests: 7 passed on each of Python 3.12.10, 3.13.13 and 3.14.7, with matched MCP/Pydantic versions and byte-identical exports.
  • All seven required offline evaluation gates and two resolver evaluations passed. The real-write fixture has 12 cases with zero false invalidations, false NOOPs or lost distinct facts; it is not an independent held-out quality study.
  • Operator-policy, cloud-feature and dashboard regressions: 124 passed, including nine new veto/disable cases; an independent security review also passed all 23 policy tests.
  • The reproduced physics test passed eight repetitions with two Chromium workers and zero retries, using completed-frame observations and every original assertion. Failure-trace retention was added to CI; its existing infrastructure suite passed 22 tests.
  • Ruff, Pyright, generated MCP contract, commercial manifest, strict-CSP asset and whitespace checks passed.

pr-review-followup.json, operator-policy-review.json and browser-followup-review.json pin the reviewed source bytes and exact validation boundaries.

Final GitHub validation at e577ea33bf18e25df56c9212530d68ba0890602c: all 23 checks passed. The complete CI run passed 4,825 tests with 16 skips on Python 3.12, 3,877 tests with 117 skips on the Python 3.9 floor, and all 112 browser scenarios, with 85.07% coverage. The supported Python 3.10–3.14 jobs, security, packaging, Docker and integration checks are green. Automated review completed on this head without additional findings; the six addressed earlier threads remain open for reviewer confirmation.

Local, remote and fetched PR heads agree, and the locally computed merge tree matches GitHub's merge tree. Earlier failed and successful checkpoints remain preserved in the evidence directory rather than being relabeled as final-head results.

Compatibility and rollout

Schema 17 requires the documented backup and recovery path. Its repair-order index is added idempotently when an existing version-17 database reopens. External-index erasure must own its transaction, so callers must finish a manually opened transaction before erasing; this prevents a later rollback from discarding repair debt after provider deletion.

Roll out the compatible cloud policy migration and services before this client. Existing readable uploads remain paused until explicit workspace approval.

The twelve storage/index benchmark cells remain historical measurements at their recorded source hashes. Store and schema changed after measurement; those timings do not describe this final head or prove the full 100,000-memory coding-agent target. Production restore, independent task-quality evidence and paid model evaluations remain separate gates.

This PR does not authorize merge, deployment, credential rotation or paid evaluation. Review threads are retained for reviewer confirmation.

…ng, gist format, schema indexes

- Add DeterministicContextPacker with inter-candidate clause redundancy pruning,
  score-elbow gating, and ContextPackResult NamedTuple API
- Vectorize personalized_pagerank with NumPy (np.add.at scatter, vectorized
  dangling mass, L1 convergence) for graph performance on large stores
- Add early-return guard when incidence_memory_ids is empty in recall pipeline
- Reduce list_memory_ids candidate limit 12000 to 500 for lower latency
- Add 4 schema indexes: entities workspace_created, edge dst_visibility,
  mem_links a_valid and b_valid for graph/link traversal performance
- Add format='gist' to engraphis_recall_context and smart_recall_context
  for 60-80% token savings with one-line memory summaries
- Add diagnostics pruning: strip verbose default-valued fields when
  diagnostics=False for cleaner MCP responses
- Export ContextPackResult, DeterministicContextPacker, pack_context from
  engraphis.core public API
- Add 29 tests for context packer and 2 tests for MCP gist/diagnostics
… format param in skills

- Defer idx_mem_links_b_valid creation in Store._apply_schema alongside idx_mem_links_temporal to preserve legacy v5 migration compatibility
- Document format parameter for engraphis_recall_context in portable skill reference and MCP_TOOLS.md
- Refresh .claude-plugin/skill-assets.sha256 digest
… and add multi-mode slider test tool

- Direct cross-encoder reranker config to ~/.engraphis/config.env rather than CWD .env
- Soften security disclosure phrasing in CHANGELOG.md
- Add multi-mode slider regression harness tools/galaxy_mode_test.js
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T11:48:22.692581Z e577ea3 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

ℹ️ 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 engraphis/core/schema.py
Comment thread engraphis/core/engine.py
Comment thread scripts/update.py

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

ℹ️ 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 engraphis/core/engine.py
Comment thread engraphis/core/resolve.py Outdated

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

ℹ️ 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 engraphis/routes/v2_api.py
@Coding-Dev-Tools
Coding-Dev-Tools merged commit 550602d into main Sep 5, 2026
23 checks passed
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