Skip to content

[Nightly][anolisa] bug: agent-memory RPM spec missing Provides: anolisa-component(agent-memory), causing install INVALID_ARGUMENT and adapter scan empty #2559

Description

@zhangtaibo

Component

agent-memory (RPM package agent-memory, spec file src/agent-memory/agent-memory.spec.in)

Bug Description

The agent-memory RPM spec file is missing the Provides: anolisa-component(agent-memory) virtual provide line. All other ANOLISA-managed RPM components that ship OpenClaw adapters declare this virtual provide:

  • src/agentsight/agentsight.spec.in:20Provides: anolisa-component(agentsight)
  • src/copilot-shell/copilot-shell.spec.in:18Provides: anolisa-component(cosh)
  • src/cosh-ng/cosh-ng.spec.in:21Provides: anolisa-component(cosh-ng)
  • src/skillfs/skillfs.spec.in:26Provides: anolisa-component(skillfs)

But src/agent-memory/agent-memory.spec.in has no Provides: line at all (confirmed: grep -c Provides agent-memory.spec.in = 0).

The repo-side component index (src/anolisa/manifests/components-v2.toml) declares provides = "anolisa-component(agent-memory)" for the agent-memory component, but the actual RPM spec never emits this provide. When the components-v2.toml URL (http://mirrors.cloud.aliyuncs.com/anolisa/generic/anolisa/v1/components-v2.toml) returns HTTP 404 and no package_map entry exists in repo.toml, the RPM resolver (resolution.rs:resolve_rpm(), line 307-324) falls through all three resolution paths — package_map, component_index, and rpm_package_provides_component — returning an empty candidates list, which triggers INVALID_ARGUMENT at dispatch.rs:1116-1122.

Steps to Reproduce

  1. On an ANOLISA-managed ECS with agent-memory RPM installed:

    dnf remove -y agent-memory

    (This removes the RPM, including the adapter resource directory /usr/share/anolisa/adapters/agent-memory/openclaw/)

  2. Attempt to reinstall via ANOLISA:

    anolisa --json install agent-memory --backend rpm --package agent-memory

    (This returns INVALID_ARGUMENT: component 'agent-memory' is not an ANOLISA RPM component)

  3. Run adapter scan:

    anolisa --json adapter scan

    (The adapters list is empty for agent-memory because the RPM — and its adapter resources — were removed by dnf remove and the install failed)

Actual Behavior

Step 2 fails with:

{
  "ok": false,
  "schema_version": 1,
  "command": "install agent-memory",
  "warnings": [],
  "error": {
    "code": "INVALID_ARGUMENT",
    "reason": "component 'agent-memory' is not an ANOLISA RPM component; use the ANOLISA component name and configure the repo-side component index or publish Provides: anolisa-component(agent-memory)"
  }
}

Step 3 returns ok: true but the adapters list has no entry for agent-memory (the adapter resource directory was removed by dnf remove and never restored because install failed).

RPM provides for agent-memory (before fix):

agent-memory = 0.2.6-1.alnx4
agent-memory(x86-64) = 0.2.6-1.alnx4

(missing anolisa-component(agent-memory))

Expected Behavior

Per components-v2.toml (src/anolisa/manifests/components-v2.toml), the agent-memory component declares:

[[components.backends]]
kind = "rpm"
package = "agent-memory"
provides = "anolisa-component(agent-memory)"

The RPM spec should emit Provides: anolisa-component(agent-memory) so that the ANOLISA RPM resolver can discover the package via rpm_package_provides_component() (resolution.rs:648-654) when the component index is unavailable.

After the fix, rpm -qp --provides agent-memory-*.rpm should include anolisa-component(agent-memory), and anolisa install agent-memory --backend rpm --package agent-memory should succeed (or trigger the adopt fallback), allowing adapter scan to list the agent-memory/openclaw adapter.

Root Cause

File: src/agent-memory/agent-memory.spec.in (missing Provides: line)
Commit: add5cb7c — "feat(memory): add anolisa-cli adapter contract via component.toml" (Jun 30, 2026, Shile Zhang) — this commit added component.toml install to the spec but forgot to add the Provides: anolisa-component(agent-memory) line, unlike the parallel commits for agentsight (07a58557) and copilot-shell (e85098fd) which both included it.
Classification: by-design omission (not a regression) — the Provides line was never present in agent-memory.spec.in history.

The same issue affects 4 other components whose spec files also lack Provides: anolisa-component(<name>): os-skills, tokenless, ws-ckpt, agent-sec-core.

Suggested Fix

Add Provides: anolisa-component(agent-memory) to src/agent-memory/agent-memory.spec.in, after the BuildRequires section and before %description:

--- a/src/agent-memory/agent-memory.spec.in
+++ b/src/agent-memory/agent-memory.spec.in
@@ -37,6 +37,13 @@ BuildRequires:  jq
 BuildRequires:  systemd-devel
 BuildRequires:  systemd-rpm-macros
 
+# Virtual provide for ANOLISA component identity resolution.
+Provides:       anolisa-component(agent-memory)
+
 %description

Verified on ECS: with this patch, bash scripts/rpm-build.sh agent-memory produces a RPM that includes anolisa-component(agent-memory) in its provides, and anolisa adapter scan correctly lists the agent-memory/openclaw adapter after install.

Environment

  • OS: Alinux 4 (alinux, kernel 6.6.102-6.alnx4.x86_64)
  • anolisa: 0.3.1 (commit c122a0a)
  • agent-memory RPM: 0.2.6-1.alnx4
  • Test ECS: 8.217.123.80
  • Test run: nightly-20260814-170909

Metadata

Metadata

Labels

component:memorysrc/memorypriority:p1High: blocks the current release or key user experiencetype:bugA confirmed defect or incorrect behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions