Sitelet https://github.com/cycle-five/runecast-protocol/compare/master...adventure-mode
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cycle-five/runecast-protocol
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: cycle-five/runecast-protocol
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: adventure-mode
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 8 commits
  • 5 files changed
  • 2 contributors

Commits on Apr 21, 2026

  1. adventure: GameConfig.adventure_level, LevelTargets, AdventureLevelRe…

    …sult
    
    GameConfig gains optional adventure_level (Some signals an Adventure Mode
    session, unblocking bot injection + level-pinned config on the backend)
    and level_targets so the client can render 1/2/3-star thresholds during
    play.
    
    New ServerMessage::AdventureLevelResult emitted after GameOver on adventure
    runs — carries final score, stars, personal-best flag, and any newly
    unlocked level. Server writes adventure_progress authoritatively before
    emitting, so the client treats it as read-only state.
    cycle-five committed Apr 21, 2026
    Configuration menu
    Copy the full SHA
    f9d0210 View commit details
    Browse the repository at this point in the history
  2. chore: version bump

    cycle-five committed Apr 21, 2026
    Configuration menu
    Copy the full SHA
    f5916ab View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2026

  1. adventure: add duration_ms to AdventureLevelResult

    Carries run duration (ms) from game creation to game_over so the
    adventure result modal can render "Time 2:34" without an extra
    round-trip. Optional on the wire via skip_serializing_if so older
    clients aren't bothered.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    cycle-five and claude committed Apr 23, 2026
    Configuration menu
    Copy the full SHA
    ad7f142 View commit details
    Browse the repository at this point in the history
  2. grid: add is_hole field to GridCell for asymmetric boards

    Opt-in flag, default false, skip_serializing_if not-is_hole so wire
    format stays unchanged for normal cells. Lets Adventure Mode declare
    per-cell "no tile" positions that render dark and can't be part of a
    word path. Bonus/gem/letter-rolling pipeline respects the flag at
    the backend.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    cycle-five and claude committed Apr 23, 2026
    Configuration menu
    Copy the full SHA
    bcfc5c2 View commit details
    Browse the repository at this point in the history
  3. adventure: AdventureEvent server-message for random events

    Carries a bomb/snake/ufo event from the backend's event scheduler
    to the client. Includes the post-effect grid snapshot so the client
    can redraw atomically, plus affected_positions for cell-level
    animation and a server-localized label for the toast.
    
    kind is a string rather than a nested enum so unknown kinds degrade
    gracefully on older clients.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    cycle-five and claude committed Apr 23, 2026
    Configuration menu
    Copy the full SHA
    0497d78 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2026

  1. Configuration menu
    Copy the full SHA
    11b7656 View commit details
    Browse the repository at this point in the history
  2. review: duration_ms u64 + AdventureEventKind enum

    Addresses both Gemini comments on PR #19:
    
    1. AdventureLevelResult.duration_ms is now Option<u64> instead of
       Option<i64>. Durations are non-negative, and this matches the
       rest of the protocol's duration / interval fields
       (heartbeat_interval_ms: u32, server_time: u64).
    
    2. AdventureEvent.kind is now a typed AdventureEventKind enum
       instead of a free-form String. Variants Bomb / Snake / Ufo
       cover the designed event set; the #[serde(other)] Unknown
       variant catches any future kind a newer server emits without
       breaking older clients that pre-date the addition. The prior
       "string for backward compat" rationale didn't hold up —
       AdventureEvent is itself a new variant, so older clients
       already fail to deserialize the whole message.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    cycle-five and claude committed Apr 24, 2026
    Configuration menu
    Copy the full SHA
    29dadad View commit details
    Browse the repository at this point in the history
  3. review: serde round-trip tests for adventure types

    Addresses all seven Copilot review comments on PR #19. Each new
    test is scoped to one type so a future field / rename breaks a
    single assertion instead of a bundle.
    
    types.rs:
    - test_game_config_serialization: extended to cover adventure_level
      and level_targets — omitted when None, present with the expected
      wire names when Some.
    - test_game_config_deserialization: extended to confirm the new
      fields default to None on missing input and decode correctly
      when the client provides them.
    - test_level_targets_serde_round_trip: new focused test locking in
      the exact one_star / two_star / three_star wire field names.
    - test_grid_cell_is_hole_wire_compat: new test confirming is_hole
      is skipped when false, emitted when true, and defaults to false
      on deserialization from JSON that omits the field.
    - test_adventure_event_kind_serde: new test covering the known
      variants (snake_case names) and the forward-compat
      #[serde(other)] Unknown fallback.
    
    server_messages.rs:
    - test_message_type: extended with assertions for
      AdventureLevelResult and AdventureEvent so the match in
      message_type() can't drift from the enum.
    - test_adventure_level_result_serialization: new round-trip test
      covering both the None and Some cases of unlocked_level and
      duration_ms, verifying skip_serializing_if behavior and the
      u64 wire shape for duration_ms.
    - test_adventure_event_serialization: new round-trip test that
      also exercises an embedded GridCell with is_hole = true so
      the grid-inside-message case stays wire-compatible.
    
    All 51 tests in the protocol crate pass.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    cycle-five and claude committed Apr 24, 2026
    Configuration menu
    Copy the full SHA
    44021a4 View commit details
    Browse the repository at this point in the history
Loading