feat(plugins): accept slot owner records#87086
Conversation
|
Thanks for the contribution. I reviewed the branch, and this PR is not a good landing base for OpenClaw. This branch should not remain open as a landing candidate: the slot-owner normalization idea is useful, but the live PR surface is dirty/unmergeable and includes unrelated release, dependency, workflow, and broad runtime churn that would require rebuilding or cherry-picking the useful work onto a fresh branch. So I’m closing this PR rather than keeping an unmergeable branch open. A new narrow PR that carries only the useful part is welcome. Review detailsBest possible solution: Close this branch as a landing candidate and accept a fresh narrow PR, or maintainer cherry-pick, that contains only the slot-owner schema/helper/consumer/docs/tests with real behavior proof and no dependency, workflow, changelog, or release-version churn. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this is a new config/API shape, and current main source confirms the existing slot contract is string-only. Is this the best way to solve the issue? No; the narrow slot-owner design may be reasonable, but this branch is not the best way to solve it because the landing surface is polluted by unrelated release, dependency, workflow, and runtime changes. Security review: Security review needs attention: The branch introduces concrete security and supply-chain review blockers through dependency graph, shrinkwrap/lockfile, and CodeQL workflow changes unrelated to the stated feature.
AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 9a00d740447b. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
27585fb to
e08bd34
Compare
027eef9 to
4c28504
Compare
4c28504 to
ef64e0f
Compare
14f164b to
4e91055
Compare
4bda98d to
0a436b0
Compare
Resolve raw plugin config environment references before plugin discovery and validation, while preserving the existing single-pass behavior for configs already loaded through config IO. The loader now resolves raw config opt-ins with config.env vars included, bypasses active/cache reuse for that mode, and redacts plugin entry config from raw-mode cache keys so resolved secrets do not enter registry keys or reentry errors. Verification: - OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/plugins/loader.test.ts src/plugins/loader.runtime-registry.test.ts - autoreview --mode branch --base origin/main - pnpm check:changed on Blacksmith Testbox tbx_01ksw36bp7zygwxgq3jcsvjv3b / GitHub Actions run 26680322889 - PR CI green on facb776 Co-authored-by: Peter Lindsey <[email protected]> (cherry picked from commit 6b41a06)
Keep session lock cleanup from removing live OpenClaw-owned locks solely because they are old. Cleanup now reports age-only stale locks without deleting them, while still removing dead, orphaned, recycled, malformed-old, and non-OpenClaw-owned locks. Update doctor docs and regression coverage for the cleanup/repair contract. Refs openclaw#87779
Fixes openclaw#87438. Bound unset heartbeat run timeouts so background heartbeat turns no longer inherit the built-in 48-hour interactive agent default. Timeout precedence is explicit heartbeat timeout, explicit global agent timeout, then heartbeat cadence capped at 600 seconds. Verification: - git diff --check - Testbox tbx_01kstna69zvznn4fq7zrqr04a1: corepack pnpm test src/infra/heartbeat-runner.model-override.test.ts -- --reporter=verbose passed 13 tests - Direct node --import tsx runtime probe verified 300s, 600s, 60s, and 45s timeout precedence cases - Autoreview clean Known CI state: - PR CI run 26661465248 has failures matching latest main CI run 26661386468 at a7820b2; failures are outside this six-file heartbeat/docs diff.
…w#84535) * fix(gateway): resolve message action config from runtime snapshot * fix(gateway): preserve runtime config matching through auto-enable * fix(gateway): preserve auto-enabled message action fallback * fix(gateway): use canonical runtime snapshot for message actions * fix(discord): route credential actions through gateway --------- Co-authored-by: Merlin <[email protected]> Co-authored-by: joshavant <[email protected]>
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes are blockedOpenClaw does not accept dependency graph changes through PRs unless security explicitly authorizes the current head SHA. Dependency updates are generated internally by maintainers so external PRs cannot change the resolved graph. Detected dependency graph changes:
Auto-scrub was not attempted because this PR changes package manifest dependency graph fields:
Dependency graph changes must be reviewed by security or handled by maintainers internally. Please remove lockfile changes manually if they are not needed. To remove lockfile changes, restore them from the target branch: git fetch origin
git checkout 'origin/main' -- 'extensions/feishu/npm-shrinkwrap.json' 'npm-shrinkwrap.json' 'pnpm-lock.yaml'
git commit -m 'chore: remove dependency lockfile change'
git pushIf this PR intentionally needs a dependency graph change, ask a member of The action will approve the current head SHA ( |
|
ClawSweeper applied the proposed close for this PR.
|
Closing this stale release-base PR. The branch is being kept in the fork for local release-line testing, and any upstream work will be reopened later as a fresh, clean PR. |
Summary
This PR implements the read-side normalization layer proposed in #70823:
plugins.slots.memoryandplugins.slots.contextEnginecan now be read as either a bare plugin id string or an object-form ownership record with anownerfield.What problem does this PR solve?
plugins.slots.memory = "memory-core".plugins.slots.<slot>.owner#70823: recording slot ownership provenance without breaking existing configs.What changes?
PluginSlotOwnerRecordandPluginSlotValueconfig types.plugins.slots.memoryandplugins.slots.contextEngineaccept either"plugin-id"or{ "owner": "plugin-id", ...metadata }.resolvePluginSlotOwner(value)as the shared read-side helper for slot owner normalization.ownerfield.What is intentionally out of scope?
{ owner, claimed_at, claimed_by_version }records in this PR.--forcebehavior. Silent overwrite prevention remains a follow-up to RFC: machine-readable memory-slot ownership —plugins.slots.<slot>.owner#70823.memoryandcontextEngineslots.Intended outcome:
Linked context
Closes #70823.
Directly related work:
Supporting related PRs and issues:
Problem / Root Cause
Before this change, slot readers commonly assumed
plugins.slots.<slot>was a string. That assumption is exactly what #70823 needs to retire.The problem is not just schema shape. If only the schema accepts object-form records, but runtime paths keep reading raw values directly, then object-form configs fail in subtle places:
legacy;none;This PR makes the read-side contract real by routing those consumers through one shared helper.
What Changed
src/config/types.plugins.tsPluginSlotOwnerRecord.PluginSlotValue = string | PluginSlotOwnerRecord.plugins.slots.memoryandplugins.slots.contextEngine.src/config/zod-schema.tsowner.src/plugins/slots.tsresolvePluginSlotOwner(value).noneas the slot-disabled sentinel.Runtime/config consumers now normalize slot owners before comparison:
Documentation now states that slot values may be string ids or
{ owner: "<plugin-id>" }records.Merge-Order Compatibility
This PR is deliberately a groundwork PR, not a competing architecture.
If this lands before #86210:
PluginSlotsConfig/schema withmemory.recall,memory.compaction,memory.capture,memory.dreaming, andmemory.userModelusing the samePluginSlotValueshape.resolvePluginSlotOwner()at new role-slot read sites instead of adding new local normalization.If #86210 lands before this:
memoryandcontextEngine.If #83637 lands before or after this:
contextEngineownership where it reads that slot, without changing per-agent compaction semantics.Follow-up intended after this PR:
Real behavior proof
plugins.slots.memoryandplugins.slots.contextEnginerecords should behave the same as bare string slot owners across config parsing, validation, doctor checks, startup planning, runtime memory/context-engine resolution, provider auth trust checks, plugin lifecycle cleanup, and plugin ID migration./home/kklouzal/.openclaw/workspace/repos/openclaw; branchfeat/plugin-slot-owner-records; head27585fb987df8d6c68886566a6280e755a507456; local Node/Vitest/OpenClaw repo toolchain.nonebehavior, participate in context-engine and memory runtime resolution, validate missing plugin references correctly, trust selected workspace context-engine plugins for provider auth only when the normalized owner matches, reset/update selected slots during uninstall/update, and preserve extra object metadata when plugin ID migration only changesowner.plugins.slots.<slot>.owner#70823 documents the pre-change limitation: slot ownership was only machine-readable through direct string comparison, leaving no durable place for ownership provenance and forcing each consumer/plugin to repeat brittle raw-slot checks.Tests and validation
Commands run:
Regression coverage added or updated:
none.memoryandcontextEngine.contextEngine.memory.owner.Compatibility and Risk
Backward compatibility:
"none"memory-slot behavior remains valid.memory-core; context engine defaults tolegacy.Compatibility changes reviewers should inspect:
Primary risks:
plugins.slots.<slot>.owner#70823.Risk mitigation:
Current Branch State
mainfeat/plugin-slot-owner-records27585fb987df8d6c68886566a6280e755a507456feat(plugins): accept slot owner recordsorigin/mainby 1Current Review State
Next action:
feat/plugin-slot-owner-recordsafter approval.openclaw/openclaw:main.Still waiting on: