Skip to content

Fix CSA index-aligned state drift#49

Merged
isty2e merged 1 commit into
mainfrom
fix/csa-index-aligned-state
Jul 2, 2026
Merged

Fix CSA index-aligned state drift#49
isty2e merged 1 commit into
mainfrom
fix/csa-index-aligned-state

Conversation

@isty2e

@isty2e isty2e commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

CSA keeps several projections aligned to the bank entry order: cluster labels, seed-selection state, stage masks, and refresh masks. Some bank mutations updated those projections under different index assumptions.

This PR fixes two cases:

  • Near cluster replacement now assigns the admitted candidate to the nearest entry's cluster, even when the removed entry comes from a different cluster.
  • Energy-cut removal now remaps selection state and progression masks after first applying update invalidation in the pre-removal index space.

The shared CSA index-remap helper keeps the removal shift rule in one place instead of duplicating it across selection and progression state objects.

Fixes #33

Validation

  • uv run --python 3.11 --extra test pytest tests -q
  • uv run --python 3.11 --extra test ruff check pyproject.toml src tests
  • uv run --python 3.11 --extra test basedpyright src tests
  • git diff --check

@isty2e isty2e marked this pull request as ready for review July 2, 2026 20:24
@isty2e isty2e merged commit 71bdde0 into main Jul 2, 2026
3 checks passed
@isty2e isty2e deleted the fix/csa-index-aligned-state branch July 2, 2026 20:24
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.

[Medium] CSA bank-entry removal and far-cluster admission desync progression masks and labels

1 participant