feat(bot): team chat keepalive every 5 minutes, and fix the linux CI build - #117
Merged
Merged
Conversation
The game disconnects clients that never send anything, and the party search bots only ever listen, so they were being kicked for idling. Send "ping" on the team channel every 5 minutes - the bots are their own one-man party, so nobody else sees it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The bot CI job has been red on master for over a year, for three reasons, all fixed here: - It never ran Headquarter's bootstrap.py, so mbedtls and curl were never built and cmake failed on find_package(MbedTLS). Bootstrap with CFLAGS=-fPIC, since mbedtls gets linked into the bot's shared library. - It built on Alpine, but Headquarter's linux/thread.c assumes pthread_t is an integer, which only holds on glibc. Build on debian:bookworm-slim instead - the same toolchain the deployed partysearchbot image uses. - main.cpp couldn't compile against the C headers as-is: event.h has a struct member named `friend` and Headquarter defines a `noreturn` macro that mangles libstdc++'s [[gnu::noreturn]]. Handle both around the extern "C" block rather than relying on the sed hacks in gwdevhub-core's deployment Dockerfile. Renames the workflow file since it's no longer alpine. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits.
feat(bot): send a team chat keepalive every 5 minutesThe party search bots only ever listen - they never send anything to the game
server - so the game was kicking them for being idle. Send
pingon the teamchannel every 5 minutes from the main bot loop, just after
ensure_correct_outpost()so it only fires once we're in-game and settled. Thebots are their own one-man party, so no other player sees it. Same trick
kamadanv2's trade bot already uses (
main.c:976).ci: fix the linux bot buildBuild bot on alpinehas been red on master for over a year, for threeindependent reasons:
bootstrap.py, so mbedtls and curl were neverbuilt and cmake died on
find_package(MbedTLS). Now bootstrapped withCFLAGS=-fPIC, since mbedtls is linked into the bot's shared library.linux/thread.cassumespthread_tisan integer, which only holds on glibc (
-Werror=int-conversionon musl).Builds on
debian:bookworm-slimnow - the same toolchain the deployedpartysearchbot image uses.
main.cppcouldn't compile against the C headers at all:event.hdeclares astruct member named
friend, and Headquarter defines anoreturnmacro thatmangles libstdc++'s
[[gnu::noreturn]]. Both are handled around theextern "C"block now, instead of relying on thesedhacks ingwdevhub-core's deployment Dockerfile.
Workflow file renamed
bot_alpine.yaml->bot_linux.yamlsince it's no longeralpine. Verified green in CI (1m05s), and I also re-ran the gwdevhub-core
deployment Dockerfile build against this branch - still builds, the seds there
are now no-ops but harmless.
🤖 Generated with Claude Code