Repository navigation
Bots, group member events and sign-in renewal (PR #4 with CI fix) - #5
Merged
Merged
Conversation
…e2e setup Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The access token is renewed 5 minutes before it expires and handed to the Rust client, which reads it synchronously. A renewal timer that ran late (machine slept) is caught up by the next request. Temporary failures keep the current token and retry with back-off; one renewal runs at a time. - Unattended mode (FIREFLY_UNATTENDED=true, set by run-bots.ts) never opens a browser. A revoked or expired refresh token exits with code 78, and run-bots.ts stops restarting that bot until it is signed in again. - A refresh no longer overwrites the username with "client" when the token has no uname claim. - With only FIREFLY_BASE_URL set, the websocket URL follows it instead of defaulting to production. - The bot state database is held with an exclusive SQLite lock, so a second copy of a bot refuses to start instead of breaking its encryption sessions. - run-bots.ts rotates each bot log to <bot>.log.1 at 10 MB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The published server image has no built-in subscription fallback, so group creation failed without a subscription service. CI now starts examples/bots-e2e/fake-subscriptions.ts, which serves the same unlimited plan as the server's emulator fallback, and points the server at it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
examples/BOTS-SETUP.md covers everything from a fresh checkout to running the bots unattended: the Auth0 callback URL that still has to be allowed, bot accounts, tools, the first sign-in (including over an SSH tunnel on a server), run-bots.ts, starting on boot, backing up the bot's files, signing in again, testing against a local server, and troubleshooting. The sign-in link is now always printed, so it can be opened from another computer when the bot runs on a server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setup-protoc downloads protoc from GitHub release assets, which returned 504 three times in a row and failed the run before any test started. Ubuntu's protobuf-compiler (3.21) compiles the only protos that need it (libsignal's, through prost-build). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The welcome DM comes from the bot's account but any group admin writes its text, so on the official account a fresh group could message every newcomer as "Lupyd". DMs now start with "From the admins of <group>:". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.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.
Carries #4 by @pranay1618 unchanged, plus two commits on top:
Opened from a lupyd/firefly branch so CI runs with repository secrets. Merging this with a merge commit marks #4 as merged.
Known failures that also happen on
main(not caused by this PR): the address rotation tests (server device-limit policy), the chatbot "SeeMessage permission required" test, and possibly the call/WebTransport tests.🤖 Generated with Claude Code