Skip to content

fix(memory): add missing Provides: anolisa-component(agent-memory) to RPM spec - #2560

Merged
kongche-jbw merged 1 commit into
alibaba:mainfrom
zhangtaibo:fix/agent-memory-missing-provides
Aug 15, 2026
Merged

fix(memory): add missing Provides: anolisa-component(agent-memory) to RPM spec#2560
kongche-jbw merged 1 commit into
alibaba:mainfrom
zhangtaibo:fix/agent-memory-missing-provides

Conversation

@zhangtaibo

Copy link
Copy Markdown
Collaborator

Summary

Fixes #2559

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

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

Commit add5cb7c added component.toml install to agent-memory.spec.in but forgot the Provides: line — unlike the parallel commits for agentsight (07a58557) and copilot-shell (e85098fd).

Impact

Without this provide, when the repo-side components-v2.toml URL returns HTTP 404 and no package_map entry exists in repo.toml, the ANOLISA RPM resolver falls through all three resolution paths and returns INVALID_ARGUMENT. This causes:

  • anolisa install agent-memory --backend rpm --package agent-memory → fails with INVALID_ARGUMENT
  • After dnf remove + failed install, anolisa adapter scan returns empty list for agent-memory (adapter resources removed by dnf, never restored)
  • Nightly test test_scan_lists_adapter_for_installed_component[agent-memory] fails

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

Fix

Add Provides: anolisa-component(agent-memory) after the BuildRequires section, before %description.

Verification

  • bash scripts/rpm-build.sh agent-memory on ECS: exit 0, RPM built successfully
  • rpm -qp --provides agent-memory-0.2.6-1.alnx4.x86_64.rpm now includes anolisa-component(agent-memory)
  • Functional test: after dnf remove + dnf install new RPM, anolisa adapter scan correctly lists agent-memory/openclaw adapter with resource_present=true, driver_available=true, framework_detected=true
  • anolisa install agent-memory --backend rpm --package agent-memory now hits the adopt fallback instead of INVALID_ARGUMENT

Test plan

  • verify-build green on ECS (8.217.123.80)
  • rpm -qp --provides confirms anolisa-component(agent-memory) present
  • anolisa adapter scan lists agent-memory/openclaw adapter after install
  • GitHub CI Test agent-memory job passes

@github-actions github-actions Bot added the component:memory src/memory label Aug 14, 2026

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

  • [P2] agent-memory.spec.in 中新增 Provides 注释过于细节化,可压缩为简短原因说明以保持 spec 文件简洁。

本次审查范围内未发现其他需要修改的问题。


🤖 Generated by QoderView workflow run

Comment thread src/agent-memory/agent-memory.spec.in Outdated
zhangtaibo added a commit to zhangtaibo/anolisa that referenced this pull request Aug 14, 2026
…kills, tokenless, ws-ckpt, agent-sec-core spec files

Four RPM spec files were missing the 'Provides: anolisa-component(<name>)'
virtual provide line that agentsight, copilot-shell, cosh-ng, and skillfs
already declare. When the repo-side components-v2.toml is unavailable
(HTTP 404) and no package_map entry exists in repo.toml, the ANOLISA RPM
resolver falls through all three resolution paths and returns empty
candidates, causing 'INVALID_ARGUMENT: not an ANOLISA RPM component'.

Fixes alibaba#2559 (same root cause, covers os-skills/tokenless/ws-ckpt/sec-core).
Complements PR alibaba#2560 (agent-memory spec).

Verified on ECS: with this patch, rpm-build.sh produces RPMs that include
the anolisa-component provides, and 'anolisa adapter scan' correctly lists
the component adapters after install+adopt.

@Forrest-ly Forrest-ly 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.

Code review 通过(APPROVE)。

审查结论

变更最小且正确:仅 src/agent-memory/agent-memory.spec.in +7 行,补齐 Provides: anolisa-component(agent-memory)。已逐项核实:

  1. capability 字符串正确:resolver 以 format!("anolisa-component({component})") 构造能力名(src/anolisa/crates/anolisa-cli/src/resolution.rs:645),且 src/anolisa/manifests/components-v2.toml:89 声明 provides = "anolisa-component(agent-memory)" — 与本 PR 添加的值完全一致。
  2. 格式与位置符合既有惯例:与 agentsight.spec.in:20copilot-shell.spec.in:18cosh-ng.spec.in:21skillfs.spec.in:26 逐字符对齐(tag 列宽、preamble 区、%description 之前)。agent-memory 无运行时 Requires,放在 BuildRequires 块之后合理,RPM preamble 对 tag 顺序无要求。
  3. root cause 属实add5cb7c(feat(memory): add anolisa-cli adapter contract)添加了 component.toml 安装但遗漏 Provides 行,与 agentsight/copilot-shell 的平行提交不一致,本 PR 补齐。
  4. 注释中的 UTF-8 em-dash 无碍:整行 # 注释,且 spec 的 Summary 已含同类字符。
  5. 无需 %changelog 条目:changelog 与版本 bump 对应,同类 Provides 变更(agentsight/skillfs 等)也未单独记录。

非阻塞备注(不影响合并)

  • 关于 qoderai 的 P2(注释偏长):该注释解释了"为什么不能缺这一行"(缺失曾导致 #2559 回归),且 PR #2561 已把此注释风格作为其余 4 个组件的参照模板,保留现状是合理的;如维护者偏好精简可后续统一收敛。
  • Release 未 bump:重建后的仓库产物对全新安装即生效(nightly 的 remove+reinstall 流程可命中),但已安装旧 0.2.6-1 的主机在下次版本 bump 前不会通过 dnf update 获得该 Provides。仓库主流惯例(agentsight/skillfs/copilot-shell)对此类变更不 bump release(cosh-ng 的 bump 属于身份重命名场景),故不阻塞;如发布流程要求可区分产物,可在后续发布时一并处理。

zhangtaibo added a commit to zhangtaibo/anolisa that referenced this pull request Aug 14, 2026
…ec files

Four RPM spec files were missing the 'Provides: anolisa-component(<name>)'
virtual provide line that agentsight, copilot-shell, cosh-ng, and skillfs
already declare. When the repo-side components-v2.toml is unavailable
(HTTP 404) and no package_map entry exists in repo.toml, the ANOLISA RPM
resolver falls through all three resolution paths and returns empty
candidates, causing 'INVALID_ARGUMENT: not an ANOLISA RPM component'.

Fixes alibaba#2559 (same root cause, covers os-skills/tokenless/ws-ckpt/sec-core).
Complements PR alibaba#2560 (agent-memory spec).

Verified on ECS: with this patch, rpm-build.sh produces RPMs that include
the anolisa-component provides, and 'anolisa adapter scan' correctly lists
the component adapters after install+adopt.
@kongche-jbw
kongche-jbw force-pushed the fix/agent-memory-missing-provides branch from 3de5651 to 9945f30 Compare August 15, 2026 02:29
… RPM spec

Signed-off-by: kongche-jbw <kongche.jbw@alibaba-inc.com>
@kongche-jbw
kongche-jbw force-pushed the fix/agent-memory-missing-provides branch from 9945f30 to 5c7f2cb Compare August 15, 2026 02:43

@Forrest-ly Forrest-ly 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.

Code review 通过(APPROVE)— head 5c7f2cb

审查结论

变更最小且正确:仅 src/agent-memory/agent-memory.spec.in +3 行,在 preamble(BuildRequires 块之后、%description 之前)补上 Provides: anolisa-component(agent-memory) 及一行简短注释。已逐项核实:

  1. capability 字符串正确src/anolisa/manifests/components-v2.toml:89 声明 provides = "anolisa-component(agent-memory)",resolver 以 format!("anolisa-component({component})") 构造能力名(src/anolisa/crates/anolisa-cli/src/resolution.rs:645)— 与本 PR 添加值逐字符一致。
  2. 格式与位置符合既有惯例:tag 列宽、preamble 位置与 agentsight.spec.in:20skillfs.spec.in:26 等完全一致;agent-memory 无运行时 Requires,放在 BuildRequires 之后合理。
  3. 上一轮意见已处理:相比旧 head 3de5651(+7 行),新版把注释收缩为一行 # Required for ANOLISA RPM component identity resolution.,直接解决了 qoderai 的 P2(注释偏长、带实现细节)。
  4. 作者验证充分:PR 描述记录了 ECS 上 rpm -qp --provides 确认虚拟 provide 存在、dnf remove+重装后 anolisa adapter scan 正常列出 adapter 的功能验证。

备注(不阻塞)

  • 本轮 review 时 CI Test agent-memory 仍在运行,其余 check(Commit Message Lint / CLA / PR Checks / Detect Changes)均已通过;该 job 为 GitHub 合并门禁,按仓库流程走即可。
  • 注:本 review issue 标题记录的是 9945f30,PR 在其后再次 amend 至 5c7f2cb(diff 内容不变,仍为上述 3 行),本次审查以 5c7f2cb 为准。

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants