[BUG] apm approve <key> for a bundle saves the grant, then exits 1 when another trust layer still denies it
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start in src/apm_cli/commands/approve.py, the bundle-only path where the grant is written before the remaining denial from another trust layer is reported. Use the ordering fix in PR #4928 (refuse before writing apm.yml) as the pattern to follow, and check which approval state is saved before the exit. Done when a bundle-only approve that is still denied exits 1 with the same message and leaves the approvals and apm.yml bytes unchanged, shown by a test that fails before the change.
Written by the indexing model from the issue text.
Description
Summary
apm approve <key> for a local bundle saves the approval and only then exits 1 with "still denied by another trust layer". A failed command changes durable state, which breaks invariant I7 (a failed command changes nothing).
Details
#4923 (PR #4928) makes apm approve refuse an org-denied package before writing apm.yml. The bundle-only path in src/apm_cli/commands/approve.py has the same ordering problem: it records the grant, then reports the remaining denial from another trust layer.
Expected
When another trust layer will still deny the item, apm approve <key> refuses before any write: exit 1, the same message, and approvals and apm.yml bytes unchanged.
Acceptance
A failing-before cell: a bundle-only approve that is still denied by another layer exits 1 and leaves the approvals and apm.yml bytes unchanged.
Source: out-of-scope finding while fixing #4923 (PR #4928).
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 430
- Avg merge
- 19h 38m
- Merged PRs (30d)
- 637
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/apm
-
bug status/accepted type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
microsoft/apm#4925 · 1 comment ·
Maintainers usually reply within 1 day
-
[DOCS] Document Mode B waiver formatting/merge-queue requirements and post-approval issue editsOpenstatus/triage-pending type/docs
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
microsoft/apm#4719 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement status/accepted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
microsoft/apm#4075 · 4 comments ·
Maintainers usually reply within 1 day
-
[BUG] Claude command transform drops frontmatter keys Claude Code supports on commandsPossibly taken @abhishekacharya200 claimed this 7 days ago. Openarea/multi-target status/accepted theme/portability triage/recommended type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/apm#3067 · 2 comments ·
Maintainers usually reply within 1 day
-
needs-design
Difficulty 5/5 Over a week Newbie friendliness 15/100
Maintainers usually reply within 1 day
Similar issues
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 62/100
DaoCloud/DaoCloud-docs#7839 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
sav-oss-org/ptusa_main#1610 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sagemathinc/sagebrush#1701 ·
Maintainers usually reply within 1 day
-
reasons-gate
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
benthomasson/reasonsforge#100 ·
Maintainers usually reply within 1 day