Repository navigation
fix(integrations): detect Memory protocol mismatches across hosts - #2495
Conversation
Refs #2491. Preserve legacy Memory errors and recovery across host adapters; distinguish protocol compatibility from health and registration.
hidb4ai
left a comment
There was a problem hiding this comment.
Two correctness blockers remain at this head: authenticated setup/Doctor fails during contract discovery (confirmed in the existing thread), and Desktop rejects the new diagnostic fields. The new Desktop regression is detailed inline.
hireview001
left a comment
There was a problem hiding this comment.
- CI failed: CI result (failure).
- CI failed: Upgrade release gate (failure).
- CI failed: tests (3.12, e2e) (failure).
- CI failed: Main (failure). Failed steps: tests (3.12, e2e) / Run end-to-end tests; Upgrade release gate / Require the selected parallel acceptance workflow; CI result / Require successful selected checks.
knqiufan
left a comment
There was a problem hiding this comment.
The existing authentication and Desktop diagnostic projection findings still apply at this head. The authenticated WorkBuddy setup regression was reproduced locally; please address the existing threads.
hidb4ai
left a comment
There was a problem hiding this comment.
Re-reviewed 4477db71970e0ba3e41a19b11b8b96d92b603ba4: the previously reported authenticated-discovery and Desktop diagnostic-projection regressions are fixed. I found no additional correctness blocker in the focused re-review.
Merge validation is still incomplete: the e2e job was cancelled, upgrade acceptance and Desktop validation were skipped, and the Upgrade release gate and CI result remain failed. The upgrade gate explicitly reports UPGRADE_SELECTED=true with UPGRADE_RESULT=skipped. Please complete the required CI checks for this head before merging.
… plugin Merging master brought oceanbase#2495, which verifies the installed plugin's declared Memory protocol on every `setup dsh` and fails the command when the `powercontext-dsh` bundle does not declare `atomic-artifact-v1`. The runtime include-tree fixture impersonates that bundle without the declaration, so the expected-success phase of "setup validates native include trees" exited 1 with `plugin_memory_protocol: unverified` before it could assert anything — the `dsh-package` job fails the same way on the merged tree (master cannot see this yet because its own job stops at an earlier step). Declare the contract on the fixture, as the real plugin's package.json does. The fixture keeps its third-party shape otherwise; oceanbase#2495's policy — setup and doctor fail on an unverified or incompatible PowerContext plugin — is unchanged and still covered by the unit tests in `tests/test_dsh_cli.py`. Verified locally: the failing scenario passes, and the full `node --test --test-concurrency=1 setup.test.mjs runtime.test.mjs` suite is 19/19 green.
…ture
The `dsh-package` job reached "Verify DSH setup with customized profiles" for
the first time on this branch and failed one case:
tests/test_dsh_transport.py::
test_explicit_web_doctor_does_not_read_desktop_environment_profile
`doctor dsh --profile web` verifies the installed plugin's declared Memory
protocol (oceanbase#2495). The fixture's Web profile was an empty `bundles: []`, so
`read_dsh_settings(..., require_installed=True)` could not resolve a plugin,
the compatibility diagnostic degraded to `unverified`, and the command exited
1 before the assertion about profile selection ran. Master never observed it
because its own `dsh-package` run stopped at an earlier JS step; current master
(oceanbase#2306) fixes the same fixture by installing a bundle that declares the
contract.
Give the Web profile a resolvable `powercontext-dsh` bundle whose manifest
declares `atomic-artifact-v1`, then assert the diagnostic reports that exact
protocol. The Desktop profile keeps its empty bundle list and its own baseUrl,
so the original point of the test still holds: if doctor read the Desktop
profile selected by the DSH_PROFILE environment variable, the check would
degrade rather than pass. Upstream's policy (setup/doctor fail on an unverified
or incompatible plugin) is unchanged.
Verified locally with the real DSH runtime and config boot:
`uv run pytest tests/test_dsh_transport.py --require-dsh-runtime
--require-dsh-config-runtime` -> 109 passed. `ruff check`, `ruff format
--check` and `ty check` all pass.
Which issue or RFC does this PR close?
Closes #2491.
Rationale for this change
After upgrading Server 1.2.0 to 1.5.0 while retaining the old DSH plugin, health checks and
/pc doctorreport success even though exact Memory reads and mutations fail. The plugin also replaceslegacy_memory_operation_unsupportedwithinvalid_request, hiding the recovery action. Plugin package versions alone cannot identify the supported Memory contract.What changes are included in this PR?
legacy_memory_operation_unsupportedwith safe recovery instructions across these adapters and Server HTTP/MCP responses: update the client/plugin, repeat setup for the affected profile, restart, rerun diagnostics and obtain current Atomic references. Preserve CAS; never automatically replay writes. DSH results remain valid JSON when no request ID is available.Host audit follows
integrations/capabilities.toml: DSH, Pi, OpenCode, OpenClaw and Hermes have local HTTP adapters; Codex, Claude Code, WorkBuddy, ZCode and experimental Kimi Code use shared Server-native MCP. Cindy, MiniMax and portable-plugin paths were also inspected. Shared MCP rejection/readback is covered without claiming individual acceptance of every host.Are there any user-facing changes?
Doctor exposes separate
server_memory_protocol/plugin_memory_protocolresults. Contract discovery uses the selected host’s URL-bound stored authorization, or MiniMax’s native headers, without forwarding credentials through redirects. When discovery requires authorization and no credential is available, it remains visibly skipped and does not independently fail setup or Doctor; rejected configured credentials remain degraded. Desktop accepts both checks while projecting only allowlisted field names and statuses. Older packages without a declaration, including previously compatible packages, require an update before this check can establish compatibility. Already running historical plugins cannot acquire this fix from a Server-only upgrade; restart the actual host/profile after setup.Package declarations attest to installed support, not a running process or successful writes. Discovery failures remain distinct from health failures. No database tables, HTTP endpoints or generated HTTP schemas change; diagnostic output, plugin metadata and recovery messages are additive.
How was this change tested?
make check: passed, including pre-commit, Python type checks, generated-contract checks and integration manifest validation.pnpm test/pnpm build: 455 tests passed and bundle rebuilt. One full-suite attempt encountered an existing HTTP fixture's ephemeral-portfetch: bad portfailure; the unchanged rerun passed. The new request-ID-absent regression failed before the fix and passes afterward.pnpm test/pnpm typecheck: 162 passed; OpenCodepnpm test/pnpm typecheck/pnpm build: 113 passed; OpenClaw equivalent checks: 99 passed (Node 22.22.3).uv run pytest tests/integrations/test_hermes_provider.py -q: 103 passed. CLI, authorization, MiniMax HTTP and real WorkBuddy service-chain regressions: 311 passed, 42 conditional skips. This includes discovery with a saved credential after its setup environment has been removed, missing/rejected/URL-mismatched credentials, and redirect refusal. Native MCP regression verifies the original error/recovery and an empty Memory inventory after rejected legacy CAS.The real DSH runs use scripted loopback model responses. Desktop UI, external-model quality, non-SQLite backends and full model sessions for every host were not exercised. Other-host evidence consists of adapter/CLI regressions, Pi package loading, OpenClaw package/Skill discovery and shared MCP tests. DSH's supported test/build workflow passes; an additional raw
tsc --noEmitprobe encounters existing.tsimport and test typing configuration errors.AI usage statement
OpenAI Codex (GPT-6) assisted with reproduction, implementation, code review, tests and this PR description.