Skip to content

[Nightly][anolisa] bug: anolisa upgrade blocked — 5 spec.in files missing Provides: anolisa-component(<name>) #2575

Description

@zhangtaibo

Component

anolisa (CLI: anolisa upgrade → RPM component resolution via ComponentResolver)

Bug Description

anolisa upgrade --assume-yes returns ok: false with status: blocked because 5 of 6 default profile components (os-skills, sec-core, tokenless, ws-ckpt, agent-memory) have RPM spec files that are missing the Provides: anolisa-component(<name>) virtual provide. When the repo-side components-v2.toml is unavailable (HTTP 404) and no package_map entry exists in repo.toml, the resolver falls through to RPM Provides — but finds no anolisa-component(...) capability for these 5 packages, causing upgrade to block with "cannot resolve RPM package for default component '<name>': no package mapping or provider found".

This issue was discovered by AgenticOS Nightly on 2026-08-14 (run nightly-20260814-170909, anolisa main commit a50e34d).

Steps to Reproduce

  1. Install anolisa 0.3.1 on a fresh ALinux 4 ECS:

    # anolisa 0.3.1 binary (from nightly build or release)
    anolisa --version
    # anolisa 0.3.1
  2. Ensure managed component RPMs are installed (from the alibaba/anolisa yum repo):

    rpm -q ws-ckpt agent-memory os-skills tokenless agent-sec-core
    # ws-ckpt-0.4.2-1.alnx4.x86_64
    # agent-memory-0.2.6-1.alnx4.x86_64
    # os-skills-0.6.1-1.alnx4.noarch
    # tokenless-0.7.3-1.alnx4.x86_64
    # agent-sec-core-0.9.0-1.alnx4.x86_64
  3. Verify none of these RPMs declare anolisa-component() provides:

    for pkg in ws-ckpt agent-memory os-skills tokenless agent-sec-core; do
      rpm -q --provides $pkg | grep anolisa-component || echo "$pkg: NO anolisa-component provides"
    done
    # All 5 print "NO anolisa-component provides"
  4. Run upgrade:

    anolisa --json upgrade --assume-yes

Actual Behavior

{
  "ok": false,
  "schema_version": 1,
  "command": "upgrade",
  "data": {
    "status": "blocked",
    "errors": [
      {"name": "os-skills", "reason": "cannot resolve RPM package for default component 'os-skills': no package mapping or provider found"},
      {"name": "sec-core", "reason": "cannot resolve RPM package for default component 'sec-core': no package mapping or provider found"},
      {"name": "tokenless", "reason": "cannot resolve RPM package for default component 'tokenless': no package mapping or provider found"},
      {"name": "ws-ckpt", "reason": "cannot resolve RPM package for default component 'ws-ckpt': no package mapping or provider found"},
      {"name": "agent-memory", "reason": "cannot resolve RPM package for default component 'agent-memory': no package mapping or provider found"}
    ]
  }
}

Exit code: 1

Expected Behavior

anolisa upgrade --assume-yes should return ok: true with status: up-to-date (no-op when all components are current). The ComponentResolver should be able to find the RPM package for each default component via one of three resolution paths: component index, package_map, or RPM Provides: anolisa-component(<name>).

Root Cause

The root cause is in src/anolisa/crates/anolisa-cli/src/commands/tier1/update/check.rs:804-834 (resolve_default_install_package). This function delegates to ComponentResolver which checks:

  1. Component index (components-v2.toml / components.toml) — currently returning HTTP 404 (not published to mirror yet, see anolisa: component index resolution fails - v2 index not published (404), v1 fallback removed #2569/anolisa: component index resolution fails - v2 index not published (404), v1 fallback removed #2570)
  2. package_map in repo.toml — no entry for these components
  3. RPM Provides (anolisa-component(<name>)) — not declared in 5 spec.in files

All three paths fail, so the resolver returns ResolutionSet::None and the error message is emitted.

The 5 spec files missing Provides::

The resolution contract was introduced in commit e85098fd (feat(cosh): add anolisa component contract) but the spec files for these 5 components were not updated at that time.

Suggested Fix

Add Provides: anolisa-component(<name>) to each of the 5 spec.in files. The fix is already implemented in 4 open PRs:

Component PR Branch
agent-memory #2560 fix/agent-memory-missing-provides
agent-sec-core #2563 fix/agent-sec-core-missing-provides
os-skills #2567 fix/os-skills-missing-provides
tokenless + ws-ckpt #2568 fix/ws-ckpt-tokenless-missing-provides

Verified on ECS: applying the combined patch and rebuilding os-skills RPM produces a package with anolisa-component(os-skills) in its provides, and rpm-build.sh os-skills exits 0.

+Provides:       anolisa-component(agent-memory)    # src/agent-memory/agent-memory.spec.in
+Provides:       anolisa-component(sec-core)         # src/agent-sec-core/agent-sec-core.spec.in
+Provides:       anolisa-component(os-skills)        # src/os-skills/os-skills.spec.in
+Provides:       anolisa-component(tokenless)        # src/tokenless/tokenless.spec.in
+Provides:       anolisa-component(ws-ckpt)          # src/ws-ckpt/ws-ckpt.spec.in

After merging these PRs and rebuilding RPMs, anolisa upgrade --assume-yes should return ok: true.

Environment

  • ALinux 4 ECS (cn-hongkong)
  • anolisa 0.3.1
  • anolisa main: a50e34d
  • RPMs: ws-ckpt-0.4.2, agent-memory-0.2.6, os-skills-0.6.1, tokenless-0.7.3, agent-sec-core-0.9.0

Related Issues

Additional Context

Discovered by AgenticOS Nightly (nightly-20260814-170909). The test tests/test_upgrade.py::test_upgrade_preserves_repo_toml_hash (ANL-022-09) asserts r.ok after anolisa upgrade --assume-yes and fails because upgrade is blocked. Same root cause affects 4 other upgrade tests and all anolisa install tests.

Metadata

Metadata

Labels

component:anolisasrc/anolisapriority: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