Skip to content

fix(#1640): fall back to /app endpoint for bot user detection#1644

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/1640-fix-bot-user-detection
Open

fix(#1640): fall back to /app endpoint for bot user detection#1644
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/1640-fix-bot-user-detection

Conversation

@fullsend-ai-coder
Copy link
Copy Markdown

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

  • Branch is not main/master (agent/1640-fix-bot-user-detection)
  • Secret scan passed (gitleaks — 8480e16153a3f16c66b5484bfd4c76349a89933d..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

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
@github-actions
Copy link
Copy Markdown

Site preview

Preview: https://acd56ea2-site.fullsend-ai.workers.dev

Commit: 400cccaed454692c0f15eb91cbdf4a98786621da

@fullsend-ai-review
Copy link
Copy Markdown

Review

Findings

No findings.

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review agent fails to determine bot user, degrading spoofing protection and stale review cleanup

0 participants