Rotate GitHub tokens round-robin across posts - #154
Draft
leynos wants to merge 3 commits into
Draft
Conversation
The daemon accepts github_token_files, a list of files each holding one personal access token. Every history record now carries the SHA-256 hash of the token that made the attempt; each post uses the successor of the token whose hash the latest record carries, so rotation survives restarts and token file renames without logging any secret. A single inline token still works as a pool of one, and hist shows the first eight hash characters per record. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
Stacked on #151 (→ #149 → #148). Merge order: #148, #149, #151, then this.
What
github_token_files: an array of file paths, each holding one personal access token. When non-empty, posts rotate round-robin through the pool; the single-token keys still work as a pool of one. Every file is validated (present, non-empty) at startup.token_hash, the hex SHA-256 of the token that made the attempt. Rotation selects the successor (wrapping) of the token whose hash the latest history record carries, falling back to the first token on an empty history or an unrecognized hash — so rotation state survives restarts and token-file renames, and the log never holds a secret.comenq histshows the first eight hash characters per record so you can see which identity posted.Testing
Authorizationheaders actually reach the mocked GitHub API), and rotation resuming from a seeded history record (wrap from the second token back to the first).🤖 Generated with Claude Code