Add Bluesky#714
Open
xlcrr wants to merge 5 commits into
Open
Conversation
- Twitter/Bluesky isEnabled() treat blank/partial credentials as disabled (filled()/blank() instead of !== null) — a blank env var resolves to "" and would otherwise pass the guard and attempt a doomed live call (Codex P2). - Bluesky createdAt now emits the canonical RFC 3339 form (UTC, Z, milliseconds) to match the AT Protocol datetime lexicon. - Regression tests for blank-cred gating and createdAt format; 85 OLMbot tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
OLMbot social-switch credential hardening (Codex P2) + canonical Bluesky createdAt. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
OLMbot: pause X/Twitter posting, add Bluesky
Summary
OLMbot — the bot that automatically shares OpenLitterMap milestones (new cities, states and countries, daily and impact-report stats, and new badges) on social media — has been posting into the void. X (Twitter) recently moved its API behind paid billing, and our account has no credits, so every automated post has been silently failing.
This PR does two things:
It's built so that turning X back on, or posting to both X and Bluesky at once, is a one-line setting change if we ever add API credits — no code changes needed.
What changed
Why
X's API now requires a paid plan we don't have, so the bot's posts fail with no visible result. Rather than leave that in place, we're pausing it cleanly and moving to Bluesky — which is free and has no usage tiers — so the community keeps getting milestone updates while we retain the option to return to X later.
How it works (technical — for reviewers)
Testing
New Http::fake() tests cover the Bluesky client (auth→post, thread reply-chaining, image upload + embed, clickable-link byte ranges, disabled no-op, error swallowing) and the dispatcher. 83 OLMbot tests pass, including the existing command tests — confirming the swap is transparent.
Enabling in production
Set in the production environment, then rebuild config:
BLUESKY_ENABLED=true
BLUESKY_IDENTIFIER=olmbot.bsky.social
BLUESKY_APP_PASSWORD=
X stays off. To post to both networks later, set TWITTER_ENABLED=true once credits are available.
Known limitations / follow-ups
Version: 5.12.10 (patch)