Skip to content

fix(pool): keep label key and value identities distinct - #29

Closed
xiehuanyi wants to merge 1 commit into
cased:mainfrom
xiehuanyi:fix/pool-label-keys
Closed

xiehuanyi wants to merge 1 commit into
cased:mainfrom
xiehuanyi:fix/pool-label-keys

Conversation

@xiehuanyi

Copy link
Copy Markdown

The pool indexes labels as key:value strings, so {"scope:project": "a"} and {"scope": "project:a"} become the same key. find_by_labels() returns the wrong sandbox, and acquire() can reuse it for a different label set.

Use (key, value) pairs as the internal index keys for creation, lookup and removal. Public label dictionaries and subset matching retain their existing interface.

Validation: the new regression fails on main because the distinct labels match the first sandbox. It now proves separate allocation and correct lookups for both label sets. All 209 offline tests pass (1 credential-dependent skip, 30 integration tests deselected), and full Ruff/Black pass. Mypy retains the unchanged base's 57 advisory diagnostics. No cloud sandbox was created.

AI assistance: implemented and tested with Codex.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 16:52

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@xiehuanyi xiehuanyi closed this Oct 10, 2026
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