Skip to content

Conversation

@MagellaX
Copy link

@MagellaX MagellaX commented Nov 19, 2025

Summary

  • Clamp requested board sizes (3–8) and include a note when inputs are coerced
  • wrap the setup call in a lightweight HUD trace and return both the ASCII board and a JSON payload of the initial game state
  • add async regression tests that stub telemetry and verify valid/invalid sizes via the underlying tool function

Note

Adds board-size validation/clamping, lightweight telemetry tracing, and returns both ASCII and JSON state; includes async tests covering outputs and bounds.

  • text-2048 setup:
    • Add _normalize_board_size to coerce and clamp board_size to MIN_BOARD_SIZE..MAX_BOARD_SIZE with notes.
    • Update setup_board in hud_controller/setup/board.py:
      • Use constants DEFAULT_BOARD_SIZE, MIN_BOARD_SIZE, MAX_BOARD_SIZE.
      • Wrap initialization in trace("text-2048 setup", attrs=...) (with no-op fallback if telemetry missing).
      • Reset game with normalized size and return two blocks:
        • ASCII summary of initialization.
        • JSON payload with requested_board_size, board_size, and initial state.
  • Tests (hud/tests/test_text_2048_setup_board.py):
    • Add async tests using DummyGame and stubbed trace to verify ASCII + JSON outputs and clamping of out-of-range sizes.

Written by Cursor Bugbot for commit 0198897. This will update automatically on new commits. Configure here.

@MagellaX
Copy link
Author

thoughts? @jdchawla29 @lorenss-m

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.

1 participant