fix(#1640): fall back to /app endpoint for bot user detection#1644
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
fix(#1640): fall back to /app endpoint for bot user detection#1644fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
GetAuthenticatedUser calls GET /user to determine the authenticated
identity. GitHub App installation tokens (used in WIF/OIDC mode)
cannot call /user, causing two degraded behaviors in the review
agent: marker spoofing protection is weakened and stale review
cleanup is skipped entirely.
When GET /user fails, fall back to GET /app which returns the app
metadata including the slug. Construct the bot login as
"{slug}[bot]" — the conventional GitHub bot username format.
Tests added for: successful fallback, both endpoints failing, and
/app returning an empty slug.
Note: pre-commit could not run in sandbox due to Go toolchain
permission error (go1.26.0 download blocked). All Go tests and
vet passed using GOMODCACHE override.
Closes #1640
Site previewPreview: https://acd56ea2-site.fullsend-ai.workers.dev Commit: |
ReviewFindingsNo findings. |
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.
GetAuthenticatedUser calls GET /user to determine the authenticated identity. GitHub App installation tokens (used in WIF/OIDC mode) cannot call /user, causing two degraded behaviors in the review agent: marker spoofing protection is weakened and stale review cleanup is skipped entirely.
When GET /user fails, fall back to GET /app which returns the app metadata including the slug. Construct the bot login as "{slug}[bot]" — the conventional GitHub bot username format.
Tests added for: successful fallback, both endpoints failing, and /app returning an empty slug.
Note: pre-commit could not run in sandbox due to Go toolchain permission error (go1.26.0 download blocked). All Go tests and vet passed using GOMODCACHE override.
Closes #1640
Post-script verification
agent/1640-fix-bot-user-detection)8480e16153a3f16c66b5484bfd4c76349a89933d..HEAD)