[BUG] Global install of a changed local package skips its newly added dependencies until the next install
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 70/100
Hướng nghiên cứu
Start by tracing the global apm install flow that resolves a local package and refreshes its copy under ~/.apm/apm_modules/_local/; the issue identifies stale package metadata as a likely cause. Reproduce with the provided steps using a local package whose apm.yml gains a remote dependency. Done means the first install after that change resolves and deploys the dependency.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
When a local package that is already installed at user scope adds an APM dependency to its apm.yml, the next apm install --global <path> re-integrates the package's own skills but does not resolve or install the new dependency. A second install picks it up (step 3 below).
It looks like the dependency graph is built from the stale copy of the package in ~/.apm/apm_modules/_local/, which is only refreshed afterwards: deleting ~/.apm/apm_modules/_local/ before step 2 makes it resolve the new dependency on the first try.
We hit this in a container init step that runs apm install --global once per deploy, so a newly added third-party skill silently only arrives one deploy later.
To Reproduce
mkdir -p pkg/skills/hello
printf -- '---\nname: hello\ndescription: Test skill\n---\nHello\n' > pkg/skills/hello/SKILL.md
printf 'name: pkg\nversion: 1.0.0\ndependencies:\n apm: []\n' > pkg/apm.yml
apm install --global "$PWD/pkg" --target claude # 1
printf 'name: pkg\nversion: 1.0.0\ndependencies:\n apm:\n - caldoai/skills/skills/untangle-codebase#f3cf47774975a7d9fca45730babf4ff7ad765ada\n' > pkg/apm.yml
apm install --global "$PWD/pkg" --target claude # 2
apm install --global "$PWD/pkg" --target claude # 3
printf 'name: pkg\nversion: 1.0.0\ndependencies:\n apm: []\n' > pkg/apm.yml
apm install --global "$PWD/pkg" --target claude # 4
apm install --global "$PWD/pkg" --target claude # 5
Output (trimmed to the resolve and summary lines, plus ls ~/.claude/skills after each step):
# 1. install
[>] Resolving /tmp/tmp.CwmQeN2R8y/pkg...
[*] Installed 1 APM dependency in 0.2s.
~/.claude/skills: hello
# 2. add dep, install
[*] Installed 1 APM dependency in 0.2s.
~/.claude/skills: hello
# 3. install again
[>] Resolving skills-untangle-codebase...
[*] Installed 2 APM dependencies in 0.7s.
~/.claude/skills: hello untangle-codebase
# 4. drop dep, install
[*] Installed 1 APM dependency in 0.2s.
~/.claude/skills: hello untangle-codebase
# 5. install again
[*] Installed 1 APM dependency in 0.2s.
~/.claude/skills: hello untangle-codebase
The bug is step 2: it reports success, but untangle-codebase is not resolved or deployed until step 3. (Steps 4 and 5 are a separate bug, #3502.)
Expected behavior
Step 2 resolves and deploys the dependency the package now declares.
Environment
- OS: Linux (Debian, kernel 6.8)
- APM Version: 0.35.0 (17a2fc4), standalone release binary installed through mise
Additional context
Possibly related to #2815 (a relative local transitive dependency silently omitted on global install), but here the dependency is a remote one and it shows up on the next run.
- Ngôn ngữ chính
- Python
- Star
- 4.2k
- Fork
- 412
- Merge trung bình
- 23 giờ 11 phút
- Pull request đã merge (30 ngày)
- 63
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/apm
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Lockfile spec examples show bare-hex deployed_file_hashes, but APM writes sha256:<hex>Đang mởtype/bug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[DOCS] Add a public maintainer roster while preserving author attributionCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởstatus/accepted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
microsoft/apm#3488 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type/automation type/performance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Global Codex instruction compilation ignores CODEX_HOMECó thể đã có người làm @xubenqiang đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/apm
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
cunla/fakeredis-py#636 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
opensafely-core/job-server#6180 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:models enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
newrelic/newrelic-python-agent#1913 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày