Исправить effects/chain.go: Remove panics on out-of-bounds index #15

Closed
opened 2026-10-25 00:32:59 +05:00 by hamyack · 0 comments
Owner

Контекст

effects/chain.go: Remove(index) делает c.effects[:index] без проверки bounds — паника при index < 0 или index >= len(c.effects).

Что сделать

  • Добавить bounds checking в Remove(index)
  • Вернуть ошибку или panic с понятным сообщением
  • Добавить RemoveAt(index) с валидацией
  • Добавить Clear() для удаления всех эффектов
  • Добавить GetEffects() для инспектирования

Критерии приёмки

  • Remove на invalid index не паникует
  • Clear() очищает chain

Оценка

S

## Контекст effects/chain.go: Remove(index) делает `c.effects[:index]` без проверки bounds — паника при index < 0 или index >= len(c.effects). ## Что сделать - [ ] Добавить bounds checking в Remove(index) - [ ] Вернуть ошибку или panic с понятным сообщением - [ ] Добавить RemoveAt(index) с валидацией - [ ] Добавить Clear() для удаления всех эффектов - [ ] Добавить GetEffects() для инспектирования ## Критерии приёмки - [ ] Remove на invalid index не паникует - [ ] Clear() очищает chain ## Оценка S
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hamyack/rzr#15
No description provided.