Skip to content

CommonTools: hold async session commands and detector callbacks in MoveOnlyFunction - #89

Draft
dayfine wants to merge 13 commits into
common/move-only-tasks-threadsfrom
common/move-only-sessions-detectors
Draft

dayfine wants to merge 13 commits into
common/move-only-tasks-threadsfrom
common/move-only-sessions-detectors

Conversation

@dayfine

@dayfine dayfine commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Depends on #88 (base common/move-only-tasks-threads; the diff shows only this change).

Async session commands and detector callbacks are owned by one object and never copied, so they now use MoveOnlyFunction.

  • AsyncCommandSession::dispatch() and SuperControlSession::register_state_command() (plus the PokemonLA forwarders in EscapeFromAttack and FlagNavigationAir).
  • DetectionDebouncer's state reporter and LetsGoKillWatcher's kill callback. LetsGoKillWatcher now moves the callback in instead of copying it.
  • All callers pass lambdas and are unchanged. Both detector classes were already non-copyable because of their std::atomic members.

Testing

  • Built on fork CI on the top of the stack: Mac, Windows clang and Ubuntu. Each run also runs the command-line unit tests, including the PokemonLA detector tests.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

…veOnlyFunction

AsyncCommandSession, SuperControlSession, DetectionDebouncer and
LetsGoKillWatcher each own their callback and never copy it.
LetsGoKillWatcher now moves its callback in instead of copying it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine and others added 9 commits November 2, 2026 15:18
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine added a commit that referenced this pull request Nov 12, 2026
…wns wander

The map pin moves to PokemonSimulation ed318db (#89): the Mart and
Poketch Company clowns now have their wander boxes, with story flag 531.

The story simulation played over the Mart clown's wait (00.05b, 00.05c
mart_clown). It now runs the console's wait (wait_beside_wanderer())
on the grid simulation, through SimWanderWait, moved out of the wander
wait tests into its own file. Someone the simulation does not walk
stands on their spawn.

00.05b and 00.05c join the wander_seed runs: the clowns and the boy
below the Mart (school_kid_m_5) walk their boxes, seeds 1 to 8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 12, 2026
…anders on row 18 only

PokemonSimulation #90 keeps Diamond's range (1, 0) for the Poketch
Company clown: x 14..16 on row 18, so 00.05b's company_clown talk from
(15, 19) facing north finds him in the row above. #89's 3x3 box let the
sim stand him on the talk tile. The Mart clown keeps (1, 1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine and others added 3 commits November 12, 2026 07:02
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…sions-detectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

game:shared Shared or game-neutral code refactor No behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant