Skip to content

Guard CharBoard placements against invalid indexes#10

Draft
RainRat wants to merge 1 commit intomasterfrom
codex/validate-indices-in-set_piece-method
Draft

Guard CharBoard placements against invalid indexes#10
RainRat wants to merge 1 commit intomasterfrom
codex/validate-indices-in-set_piece-method

Conversation

@RainRat
Copy link
Owner

@RainRat RainRat commented Sep 20, 2025

Summary

  • add bounds validation to CharBoard::set_piece and surface failures to callers
  • reject overflowing file counters in fill_char_board before attempting to write
  • exercise malformed FEN rows with excessive empty counts in the Python tests

Testing

  • python3 test.py (fails: ModuleNotFoundError: No module named 'pyffish')
  • python3 -m pip install . (fails: blocked from downloading build dependencies in this environment)

https://chatgpt.com/codex/tasks/task_e_68ce1a571db48330a1210bf7db6d89d2

@RainRat
Copy link
Owner Author

RainRat commented Sep 21, 2025

@codex Please fix the build test

@chatgpt-codex-connector
Copy link

Summary

  • Exposed the complete set of FEN validation error codes (including the board-geometry failure) through the pyffish module so Python callers can assert on the precise validation outcome. src/pyffish.cppL464-L479

Testing

  • python3 test.py

View task →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant