Skip to content

feat(memory): make keyed remember_memory writes idempotent - #2583

Open
Doar999 wants to merge 55 commits into
oceanbase:masterfrom
Doar999:feat/2521-idempotent-remember-memory
Open

Doar999 wants to merge 55 commits into
oceanbase:masterfrom
Doar999:feat/2521-idempotent-remember-memory

Conversation

@Doar999

@Doar999 Doar999 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Closes #2521.

Rationale for this change

A client that times out on remember_memory cannot tell whether the write was committed, and a blind retry creates a duplicate memory. An optional idempotency key lets the caller retry the same creation safely. The receipt table is added in the shared migration draft 000, immediately after the frozen v1_6_0 baseline.

What changes are included in this PR?

  • remember_memory accepts an optional idempotency_key (^[!-~]{1,256}$, compared byte for byte). The same rule applies over HTTP and the in-process SDK.
  • A retry with the same key and equivalent stored content replays the original creation: revision 1 with its creation-time state and changed: true. Replays are re-authorized and do not extend the key.
  • The same key with different content returns 409 idempotency_conflict with details.kind = "memory_idempotency_key" and writes nothing.
  • Keys are scoped per Scope and per principal (one shared namespace per Scope when access control is off) and live for a fixed 24 hours on the database clock. An expired key behaves as unused.
  • The receipt is written in the same transaction as the creation. Only SHA-256 digests of the namespace and of the RFC 8785 content are stored. Expired receipts are removed in bounded batches of 32 after commit.
  • The shared migration draft 000 adds pc_atomic_memory_idempotency for SQLite and the MySQL dialect. Both dialects declare v1_6_0 as the predecessor. The source manifests, final SQLite fingerprints, readiness registrations and upgrade policy reflect that chain. Frozen migration resources and fingerprints are preserved.
  • OpenAPI, generated HTTP models, the Python client, MCP tool description, Desktop generated bindings, the shared Skill guidance, and English and Chinese docs describe the field. The Dify plugin keeps it hidden.
  • A failed cleanup is logged as atomic_memory.idempotency.cleanup_failed and never changes the write result.

Out of scope: deduplication across different keys, changes to expected_revision, automatic client retries, and a general idempotency framework.

Are there any user-facing changes?

Yes, additive. remember_memory gains an optional idempotency_key, and a new 409 idempotency_conflict response applies only to keyed requests. Requests without a key behave as before. The idempotency table is added in the shared draft 000 after the frozen v1_6_0 baseline. The schema change rewrites no existing data. Release preparation freezes 000 under the declared release revision. Development databases and plans from the prior unpublished v1_5_2_001 revision must be rebuilt.

How was this change tested?

The combined tree includes master 0b60e52acfcefe2fe64cca52249db83c98d9a3ba. Merge commit 0d1bfe33a reconciles all historical Desktop qualification records and regenerates the contract bindings. 79daca289 registers the tested product artifact.

  • Linux container: 93 tests passed across API/JavaScript contracts, keyed Memory HTTP/SDK creation, authorization, concurrent replay and portable migrations. The four Desktop contract tests passed separately.
  • Desktop: 86 UI tests, TypeScript checking, generation checking and nine native session tests passed.
  • All Linux pre-commit hooks and ty check passed. Frozen migration history matches master; the single draft head remains 000. The upgrade-policy digest check passed.
  • Real SQLite Server processes passed the native Desktop probe in anonymous loopback, static Bearer, HTTPS with custom CA/base path and enforced Provider fixture modes. Product profile sqlite-memory-1-6-0d1bfe33-v1 covers all thirteen Desktop operations.
  • Wheel powercontext-1.5.3.dev651+g0d1bfe33a-py3-none-any.whl: SHA-256 0480c6c1cb945cc6908bca03b4c11b99903438da19f19f4f58bc53401b19af1d. All 848 packaged runtime files match commit 0d1bfe33a3b894086b9c6e5c324b70f85df7cb73. OpenAPI SHA-256: 727649c606e096a92d88e56959e24e751df9398fd90175464b59f44b98cd40b6.
  • The privacy regression retains its five-second timeout and every cache-removal assertion. It uses one input change per field instead of unrelated per-character typing. In sequential Linux runs limited to 0.5 CPU, stale-context duration decreased from 3796 to 2784 ms and forbidden duration from 2086 to 1289 ms. Both original cases timed out under a stricter 0.25 CPU limit; this stress reproduction does not establish the macOS Intel runner's precise cause.

Required CI has been triggered on 79daca289. macOS Intel/arm64 validation, native backend acceptance and the complete selected installed-release upgrade matrix remain pending; local Linux tests do not replace those gates. Installed WebView and platform keyring qualification remain separate.

Merge coordination

This PR targets 1.6.2 and includes release preparation #2917, merged as 25f300ad0. That release sets API metadata to 1.6.1 and retains v1_6_0 as the last frozen database revision. Both registered source paths therefore continue as v1_6_0 -> 000 for keyed Memory receipts. Release preparation for 1.6.2 freezes the shared draft under the declared release revision.

The merged tree preserves #2935's removal of historical alias recall. Draft 000 contains only the receipt table and expiry index, with synchronized SQLite/MySQL resources, registrations, fingerprints, recovery layouts and persistence digest.

The tree includes the replacement Desktop from #2730. Its generated bindings and product compatibility catalog reflect the combined contract. Required CI and installed-release upgrade acceptance must pass on the current branch before merge.

AI usage statement

Claude Code (Claude Fable 5.2) assisted with the implementation, design analysis, tests and documentation. OpenAI Codex assisted with migration dependency reconciliation, conflict resolution, regression tests, generated contracts and real-Server Desktop protocol qualification.

Add an optional idempotency_key to remember_memory. A retry with the same
key and content replays the original creation; different content returns
409 idempotency_conflict. Keys live 24 hours on the database clock in a
per-Scope, per-principal namespace and are stored as digests only.

Adds migration v1_5_2_001 for SQLite and MySQL-dialect backends, exposes
the field over HTTP, the SDK, and MCP, keeps it hidden in Dify, and
documents the behavior in both locales.

Closes oceanbase#2521

@hidb4ai hidb4ai 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.

The keyed in-process SDK path can replay a creation after scope contribution has been revoked. Please apply the required current authorization before receipt lookup; the inline comment includes a reproduced case.

An in-process keyed create returned a replay or a conflict before the
caller's creation authority was checked. Require it before the receipt
lookup so a revoked contributor learns nothing from an old key.
raise InvalidBaseAccessRequestError(
"idempotency_key", "must be 1 to 256 printable ASCII characters, no spaces"
)
principal = None if context is None or context.principal is None else context.principal

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P2] Share the SDK key namespace when access control is disabled

This branch includes the principal from a valid ArtifactSearchExecutionContext(principal=alice, trusted_local=True) despite its absent access service, so submitting the same key/content without context and retrying with that context selects different receipts and creates duplicate memories, contrary to RFC 1809. Use an empty namespace principal whenever access control is disabled.

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.

Verified on 79daca2: _create_keyed now selects an absent principal whenever the execution context has no access service. The public SDK regression creates without a context and retries with a trusted-local principal, returning the same original creation. The per-principal and revoked-contributor regressions also pass. This finding no longer reproduces.

@AlexStocks AlexStocks added the 1.5.2 v1.5.2 release tracking label Nov 12, 2026
A context that named a principal without an access service put that
principal into the key namespace, so the same key and content created
a second memory. Use the empty principal unless access is enforced.

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • CI failed: CI result (failure).
  • CI failed: Upgrade release gate (failure).
  • CI failed: CI preflight (failure).
  • CI failed: Main (failure). Failed steps: CI preflight / Check OpenAPI contract; Upgrade release gate / Require the selected parallel acceptance workflow; CI result / Require successful selected checks.

@@ -1,5 +1,5 @@
{
"contractSha256": "e1ff2e3ad1d6a09a9288c4c66e111a54c4979026e29806ff70543988b8e29220",
"contractSha256": "36eb4ebc989a34be1872cd220c5289df81d690ea57d9e5565d50d06046ac9a81",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P1] Register qualification for the new Desktop contract

The new bundled digest matches neither a profile nor an authenticated-client mapping in compatibility.json, so check_expected disables business operations on saved connections and connect_local rejects local setup with CompatibilityUnverified. Qualify this exact contract and register its evidence so Desktop connection workflows remain usable.

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.

Still open on 6224c9fd.

  • desktop/src-tauri/src/transport/operations.json carries contractSha256 = 71296c61a668467c03235d1dd2395ef69ac7f60476c8de0987eec455f1c72e75.
  • desktop/src-tauri/src/connections/compatibility.json holds 74 records and none carries that digest. The two closest, sqlite-memory-idempotency-df79da6b-v1 (e0e147b6…) and sqlite-memory-idempotency-bc11d08e-v1 (36eb4ebc…), qualify earlier contract revisions only.
  • tests/test_desktop_contract.py::test_bundled_desktop_contract_has_a_qualified_business_profile fails the same way on an exact-head mirror and on CI: make contract-test stops at tests/test_desktop_contract.py:70 with AssertionError: The bundled Desktop contract has no qualified profile for save, search and exact reads (Makefile:174, job 131807510532, 1 failed, 67 passed).

The managed digest is not implicated: scripts/upgrade_release_gate.py::managed_digest recomputes to the declared value on this head, and the Upgrade release gate failure is only the downstream SCOPE_RESULT=failure propagation from this job.

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.

当前 head 6dce4701 上本条已闭合,给一份可复算的核对结果。

契约摘要一致

  • desktop/src-tauri/src/transport/operations.json 现为 contractSha256 = f41106d8716b5acc5212afcf515b45d58f963d6b10c0c158b85afe54a7acd731。
  • 我用 tests/test_desktop_contract.py:36-48 的同一算法(sha256(openapi/powercontext.yaml 字节,CRLF→LF))对 head 的契约实算:文件 513499 字节、不含 CRLF,得到 f41106d8…,与声明值逐字节相同。

资格记录已存在且覆盖所需操作

  • compatibility.json 现有 90 条记录,命中该摘要的是 sqlite-memory-release-efd4be07-v1(serverCommit=efd4be0731bc4683be4e2a66fc045cd808d00eb8),其 operations 含 remember_memory、search_memory、get_artifact_revision。
  • tests/test_desktop_contract.py::test_bundled_desktop_contract_has_a_qualified_business_profile 的三项必需操作(save / search / exact reads)因此都能被同一 profile 满足。

也就是说上一轮"bundled digest 无资格记录"的路径不再成立,本线程按已修复处理。

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.

在 head b89e2d81 上复核,这条 P1 的前提已经不再成立。可复算的四点:

  • head 的 openapi/powercontext.yaml sha256 = afa4523d92f32dc64a39e5b455214c1cf93172f9a696301331407dcf94bb8f19(516393 字节)。
  • desktop/src-tauri/src/connections/compatibility.json 的新增记录 sqlite-memory-1-6-3db8c17d-v1:serverCommit = 3db8c17d45a73dd07df989c00c2101f18b6a1c77、contractSha256 = afa4523d92f32dc64a39e5b455214c1cf93172f9a696301331407dcf94bb8f19、artifactSha256 = fbd66f53e645ecfaee171e6e3498f20a5078a44183c4329b81f607ae69d9a8f4,其中 contractSha256 与上面的 openapi 摘要逐字相等,operations 覆盖 remember_memory、search_memory 等十三项。
  • 该记录的 evidence 是 desktop/VALIDATION.md#server-3db8c17d-16-and-keyed-memory-protocol-qualification,对应小节 ## Server 3db8c17d 1.6 and keyed Memory protocol qualification 在 head 上存在(VALIDATION.md 第 4435 行起)。
  • head 上 scripts/upgrade_release_gate.py 退出码 0,scripts/generate_api.py --check、scripts/generate_js_operations.py --check 均退出码 0。

所以“新的 bundled digest 既不对应 profile 也不对应 authenticated-client 映射”在当前 head 不再成立。如果仍看到不匹配,请附上核对用的 head 与摘要值。

The creation preflight skipped authorization whenever a context had no
access service, so an explicit untrusted context could tell an occupied
key from a free one through the conflict error. Only an absent context
now skips the check; the domain policy decides the rest.
Bind the bundled Desktop contract to Server source bc11d08 and its
built wheel after the native probe passed all four connection modes.

@hidb4ai hidb4ai 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.

Re-reviewed 6224c9fd. The revoked-contributor and untrusted-context cases in my earlier authorization thread are fixed; I am resolving that thread.

The remaining blocker is the existing Desktop contract qualification finding, which I independently reproduced on this head. The current bundled contract has no matching qualification or authenticated-client mapping, so the native connection checks cannot enable business operations or accept local setup. Please qualify the current contract and register its evidence, then rerun the contract checks. The upgrade-gate failure is downstream of the preflight failure, not a separate reproduced migration defect.

@Doar999

Doar999 commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

@Doar999 plz fix the file confliction. @Doar999 请修复文件冲突的问题。

done

@hidb4ai hidb4ai 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.

Re-reviewed d47074dd550f2875634d17ba7ee157b52281df39. The previous Desktop contract/qualification and shared-000 findings are resolved.

One integration blocker remains against the newer master a137123c663307d16721625601bc602360ff0f62: git merge-tree --write-tree a137123c d47074dd exits 1 with a single conflict in release/upgrade-support.json. The combined tree's managed persistence inputs are byte-identical to this PR head, so their expected digest is still 6fb6f854b5e0ad5955e4e253b4df004abc94062787a95322aad41aebaddbb6b8. Please reconcile the policy while preserving both change rationales, then run the upgrade-policy check and CI on the combined result. No migration reordering or new revision is needed; the current functional results apply to this PR head.

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • Resolve merge conflicts with the target branch.

@AlexStocks AlexStocks added 1.6.2 v1.6.2 release tracking and removed 1.6.1 v1.6.1 release tracking labels Nov 30, 2026
# limitations under the License.

"""Register the disposable historical Atomic Memory alias projection."""
"""Add the historical Atomic Memory alias projection and keyed creation receipts."""

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.

[P2] 本 PR 改的是共享草稿 000,而 #2917 正在把同一个 000 冻结成 v1_6_1;合入顺序会决定这次改动是否落地

本 PR 对 server_resources/versions/000.py 只改 docstring(加 keyed creation receipts),对 schemas/sqlite-000.json / mysql-000.json 与 manifest.json 追加语句和校验和;基 blob 是 648a1fb034。

同时在飞的 #2917(release 1.6.1)从同一个 648a1fb034 把该文件重命名为 versions/v1_6_1.py,并把 revision = "000" 改成 v1_6_1、资源路径改成 schemas/sqlite-v1_6_1.json(mysql 侧与 schemas 同步重命名)。也就是说两份分支都从同一起点改 000,只是 #2917 还改了文件名。

若 #2917 先合入,本 PR 的 rebase 会按旧路径把 versions/000.py 重新创建出来,down_revision 仍是 v1_6_0 —— 与已冻结的 v1_6_1 形成两个 head,schema_release.py check 与 Upgrade release gate 会直接红;schemas/sqlite-000.json 同样会被复活。若本 PR 先合入,#2917 的冻结需要带上这些 DDL 与校验和(它当前的重命名树并不包含本 PR 的 receipt 语句)。

建议:明确两者的合入顺序并写进 PR 描述。若 #2917 先走,本 PR rebase 后应把 docstring、schema 语句和 manifest 校验和全部落到 v1_6_1(manifest.json 的键也从 000 改成 v1_6_1);若本 PR 先走,请在 #2917 里补一条说明,确认冻结树包含这些语句。

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.

Coordination note for 97f81fb45: the current v1_6_0 -> 000 chain is valid against master 246f70beb; #2917 is still open. The release-first remedy above needs one correction: the repository migration policy forbids adding this PR's DDL to an already frozen v1_6_1.

This is merge-order coordination, not a demonstrated two-head defect in the current PR tree. See the migration policy.

@hidb4ai hidb4ai 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.

Re-reviewed 97f81fb45 against master 246f70beb; the previous merge conflict is resolved. Required CI validation is still incomplete: Python 3.11 E2E shard 0 failed test_default_recorder_write_contention_is_bounded_and_does_not_break_later_operations because the contended statistics write took 1.069 seconds against its 1-second bound. The selected installed-release upgrade jobs were then skipped, so the upgrade gate and aggregate CI result also failed.

The individual test passes locally on both this head and its base, and the base's corresponding CI shard passed. That does not establish the cause of the runner failure. Please diagnose it and obtain successful required CI, including the selected upgrade acceptance, on the up-to-date merge result before merging. Local functional checks do not replace that missing matrix.

The failing Python 3.11 shard starts 32 xdist workers. In a four-CPU container, repeated write-contention cases fail 10/30 at 32 workers and 2/30 at 16 workers, while 8 workers pass 30/30 and the focused suite passes 287 tests. Bound E2E workers to 8, matching the unit job, to reduce scheduling contention while retaining the existing write-time assertions. The exact original 1.069-second failure remains unproven locally.
Qualify Server deedec9 against all thirteen Desktop operations in anonymous loopback, static Bearer, HTTPS with CA/base path, and Provider modes. All 842 packaged runtime files match the source. Native sessions pass 9 tests, IPC generation matches, and the replacement UI passes 86 tests. Record exact contract and wheel digests in the product catalog.

@hidb4ai hidb4ai 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.

Re-reviewed 9747f0867. The previous Python 3.11 E2E failure and selected SQLite installed-release upgrade checks are now green. Two integration gates remain:

  • Merging this head with current master edd90eb85 produces content conflicts in desktop/src-tauri/src/connections/compatibility.json, desktop/src-tauri/src/transport/operations.json, and desktop/ui/src/generated/operations.ts. GitHub also reports CONFLICTING / DIRTY. Reconcile the compatibility entries and regenerate the contract artifacts from the combined OpenAPI source, then validate that merged result.
  • Required CI is incomplete: macOS Intel Desktop validation times out after 5000 ms in removes cached private Memory results after a stale_context read failure (desktop/ui/tests/app.test.tsx:150), and the macOS arm64 managed-resource candidate is cancelled. These leave aggregate CI failed. The timed-out test and Desktop application code are unchanged from the PR base, and the other Desktop platforms pass; this does not establish a PR regression. Please diagnose the Intel runner failure without weakening the privacy assertion and complete the required checks on the updated merge result.

@hidb4ai hidb4ai added module:core Core: PR changes under src/ module:desktop Primary module: desktop app and platform integration labels Dec 2, 2026
@hireview001

Copy link
Copy Markdown
Collaborator

The affected modules are Core, Desktop. @hidb4ai, please coordinate follow-up. Core: @hidb4ai @frf12 @Fengzdadi @beatenevo; Desktop: @PsiACE @knqiufan. Please coordinate the review of the affected changes.

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • Resolve merge conflicts with the target branch.

@hidb4ai hidb4ai 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.

Reviewed 79daca2. Keyed creation, authorization and original-result replay are consistent with the contract; the old SDK namespace finding is fixed. The receipt table is correctly in the cumulative 000 after v1_6_0, with frozen history preserved. Actual 1.6.1-to-000 upgrades on SQLite and OceanBase preserved existing data and added only the receipt table. Keyed replay survived restart; six concurrent OceanBase requests created one memory. SQLite additionally passed real embedding, generation and recall. Merge score: 75/100. No approval because this adds a database table. Resolve the current Desktop test conflict and validate the merged result before merging. The fixed Python worker count also needs the evidence requested below.

env:
PYTEST_ADDOPTS: --require-dsh-config-runtime --require-claude-code-python-floor
# Limit contention for tests that spawn subprocesses with fixed deadlines.
PYTEST_WORKERS: "8"

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.

Design note (non-blocking): this fixes both unit and E2E concurrency at eight workers for every Python runner. The repository CI policy requires measured sizing rather than a precautionary fixed cap. The PR description reports CPU measurements for the Desktop UI test, which do not establish the Python runner limit. Please include the relevant runner CPU/memory and subprocess-contention measurements that justify eight, or retain the existing worker selection and isolate the demonstrated deadline-sensitive case. The same point applies to the E2E override below.

@happy-v587 happy-v587 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed independently (branch @ 79daca2, full clone, real runs on macOS):

Verified green locally

  • tests/e2e/test_remember_memory_idempotency.py + tests/test_mcp.py: 32 passed — covers replay-equality, creation-state replay after later changes, 409-without-write on content mismatch, invalid keys rejected before any write, expiry + bounded cleanup (32), in-process and multiprocessing concurrency (exactly-once, winner replays, losers 409 with details.kind = memory_idempotency_key), per-principal namespaces under enforced access, re-authorization on replay, and the untrusted-context key-probe denial.
  • Migration suites (test_full_server_migrations, test_portable_storage_migration, test_migration_revision_names, test_managed_atomic_maintenance, test_mysql_migration_runner, test_managed_processing_maintenance, test_registered_source_maintenance_cli): 81 passed / 80 skipped (MySQL/SeekDB need the dedicated backend env). Draft 000 adds only pc_atomic_memory_idempotency + expiry index; SQLite and MySQL resources are synchronized on the same v1_6_0 predecessor, frozen fingerprints preserved.
  • CI on this head: 74 checks pass, 0 fail.

Design review: sound.

  • Authorize-before-lookup ordering means a replay/conflict is never disclosed to a caller who lost create authority; replays re-authorize and re-read the exact revision with current authz.
  • Receipt binding commits in the same transaction as the creation; concurrent claims resolved via the primary key (IntegrityError → re-lookup → replay), verified by both barrier tests.
  • Only SHA-256 digests of namespace and RFC 8785 content are persisted — no raw key, principal, or body; digest_version gates future digest evolution (request_digest returns None for unknown versions, so cross-version binaries fail closed rather than silently mismatching... worth confirming that a mixed-fleet 24h window can't loop-conflict, but version bumps are opt-in and none exist yet).
  • Expired-key replacement deletes only rows still expired at the write, so a concurrently committed live key is never clobbered; failed cleanup is logged content-free and never changes the write result.
  • HTTP 409 mapping goes through BaseValueConflictError("memory_idempotency_key") → idempotency_conflict; the OpenAPI description, generated clients, Desktop bindings, MCP description, and Skill guidance are all updated; Dify keeps it hidden as stated.

Non-blocking observations:

  1. create_keyed_atomic_memory runs request_digest(command) eagerly for validation but discards the value; bind_receipt recomputes it inside the transaction. Harmless double-compute; a comment or reuse would be marginally cleaner.
  2. The e2e suite doesn't exercise a digest_version ≠ 1 row (the fail-closed path is only visible via unit-level reading). Fine while version 1 is the only version.
  3. The PR is marked dirty on GitHub right now — git merge-tree shows conflict against current master (likely in release/upgrade-support.json/shared draft files touched by the 1.6.2 line). Same reconciliation round as #2894; needs one more merge pass against the current base before the final CI gate.

No correctness blockers from me.

@happy-v587 happy-v587 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verified locally in my earlier review (full clone + real test runs, see my COMMENTED review below): all relevant suites pass, no blockers. Approving as confirmed by the project owner.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.6.2 v1.6.2 release tracking module:core Core: PR changes under src/ module:desktop Primary module: desktop app and platform integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(memory): define and implement idempotent remember_memory writes

5 participants