Skip to content

test(approvals): fix project_id mismatch in clear-approvals --global test - #2297

Merged
max-sixty merged 1 commit into
mainfrom
approvals-location
Apr 18, 2026
Merged

max-sixty merged 1 commit into
mainfrom
approvals-location

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Follow-up to #2293. test_clear_approvals_global_with_approvals had the same fabricated format!("{}/origin", root) project_id, but its snapshot didn't surface the bug because --global clears every project regardless of ID. The test was exercising the global-flag branch only by coincidence, not by design.

Replaced with repo.project_id(). Snapshot unchanged — purely a test-correctness fix.

This was written by Claude Code on behalf of @max-sixty

…test

`test_clear_approvals_global_with_approvals` fabricated
`format!("{}/origin", root)` as the project_id. The test still
passed because `--global` clears every project regardless of ID, but
the manually-written approval was stored under the wrong key — so
the test was exercising the global-flag branch only by coincidence,
not by design.

Replaced with `repo.project_id()`. Snapshot is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 0cc401f into main Apr 18, 2026
25 checks passed
@max-sixty
max-sixty deleted the approvals-location branch April 18, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants