GeezerVison is showing github.com — fix(server): PR sync ignores tokenized avatar URLs on ghe.com by fixfon · Pull Request #20352 · pingdotgg/t3code
Conversation
fixfon
commented
Oct 16, 2026
•
edited by juliusmarminge
Loading
Uh oh!
There was an error while loading. Please reload this page.
Rotating avatar tokens on GitHub Enterprise Cloud caused unchanged linked pull requests to trigger REST stack reads and stored link updates on every sweep.
Snapshot comparison now ignores only the token query parameter on ghe.com avatar URLs. Changes to the avatar path, version, size, other parameters, or a token on another host still trigger synchronization. The complete URL remains in newly persisted snapshots. Rebuilt from @fixfon's original #20352, preserving the author's commits and merging current main.
Fixes #20273.
Verification on headless Linux:
- Existing reactor suite: 21 tests before takeover → 26 after; replaced the original case with one table covering the comparison boundary. Four cases failed against the original broad normalization, then all 26 passed.
vp test run apps/server/src/orchestration-v2/PullRequestSyncReactor.test.ts passes.
- Server typecheck, targeted lint and format pass; lint reports two existing unused-parameter warnings.
- Service-level sweep tests prove stack-read and persisted-command counts. No visual change; screenshots do not apply.
Not merge-ready: token expiry needs verification. Ignoring token rotation can retain a stored URL indefinitely. GitHub Desktop caches ghe.com avatar tokens for 50 minutes and bot avatar URLs on the same cadence. That does not establish the lifetime of the GraphQL URLs used here. @fixfon confirmed they also lack a ghe.com tenant, so reuse/expiry remains unverified; no such account is available in this environment. Do not merge until the expiry behavior is established and any necessary refresh path is handled.
Not verified: a real ghe.com account, macOS, Windows, iOS, Android, or Electron desktop. Server behavior is shared across local, remote, and tunnel clients; no provider-specific adapters or wire contracts changed.
Tests: GPT-6-Astra. Implementation: GPT-6.1-Sol. Adversarial review: Claude Opus 5.5 and GPT-6-Sol. Harness: Codex/T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
On GitHub Enterprise Cloud with data residency (*.ghe.com), the author's
avatarUrl carries a `token` query parameter that changes on every read.
snapshotFieldsEqual compared the raw URL, so a stored snapshot never equalled
a fresh one: every open linked PR took a REST /stacks read and a stored link
event on every sweep.
Compare the avatar URL without its query string (the raw string when it does
not parse), so a different avatar path still counts as a change.
Fixes pingdotgg#20273
coderabbitai
Bot
commented
Oct 16, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Warning
Review limit reached
Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.
Next included review available in 11 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used all 10 included reviews currently available.
Learn how review limits work.
Review configuration:
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
c859fa8d-1d23-4f68-8a3d-8006115a8e2c
📥 Commits
-
Reviewing files that changed from the base of the PR and between 5881dca and 480d600.
📒 Files selected for processing: 2
-
apps/server/src/orchestration-v2/PullRequestSyncReactor.test.ts
apps/server/src/orchestration-v2/PullRequestSyncReactor.ts
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e5258c35-05e7-4003-8c20-2d82ace3b738
📥 Commits
-
Reviewing files that changed from the base of the PR and between e58a485 and 5881dca.
📒 Files selected for processing: 2
-
apps/server/src/orchestration-v2/PullRequestSyncReactor.test.ts
apps/server/src/orchestration-v2/PullRequestSyncReactor.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
-
The pull-request sync reactor now ignores query-string changes when it compares author avatar URLs in snapshots. A test checks that query-only changes do not trigger sync and that a changed avatar path does.
Changes: Avatar Snapshot Comparison
| Layer / File(s) |
Summary |
Normalize avatar URLs for snapshot comparison apps/server/src/orchestration-v2/PullRequestSyncReactor.ts, apps/server/src/orchestration-v2/PullRequestSyncReactor.test.ts |
Snapshot equality compares avatar URLs without query strings. The test checks that a token change alone does not trigger sync, while a path change triggers sync with the updated URL. |
Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: juliusmarminge
Merge Risk: ⚪ Minimal · up to 5881d
-
The change suppresses syncs for query-only avatar URL changes while retaining syncs for changed avatar paths. No actionable merge-blocking risk is established.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Linked Issues check |
 |
Issue [#20273] requires unchanged linked pull requests on ghe.com to avoid repeated stack reads and link-sync events. avatarIdentity removes the query string from parseable avatar URLs, and `snapsho… |
| Out of Scope Changes check |
 |
The whole-PR diff changes only PullRequestSyncReactor.ts and its focused test. The source change addresses the avatar comparison that causes the issue. The test verifies the required token-only and … |
| Description check |
 |
The description covers the problem, implementation, scope, linked issue, verification results, limitations, and agent details. It also clearly identifies the unresolved token-expiry risk. |
| Title check |
 |
The title clearly and concisely describes the fix: PR synchronization ignores token-only changes in ghe.com avatar URLs. |
Full details: Linked Issues check
-
Explanation
Issue [#20273] requires unchanged linked pull requests on ghe.com to avoid repeated stack reads and link-sync events. avatarIdentity removes the query string from parseable avatar URLs, and snapshotFieldsEqual uses it for avatar comparison. The focused regression test confirms that two token-only reads produce one stack read and one sync command, while a changed avatar path produces a second read and sync command with the new URL. The fallback preserves raw-string comparison when parsing fails.
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff changes only PullRequestSyncReactor.ts and its focused test. The source change addresses the avatar comparison that causes the issue. The test verifies the required token-only and path-change behavior. No unrelated production behavior or unrelated files are changed.
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Taking over this one as maintainer for batch pull-request-04. I will preserve this PR and its author commits, narrow the avatar comparison to the volatile token, and verify the token-expiry concern before publishing. No merge planned.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@fixfon I found that GitHub Desktop expires its cached ghe.com avatar tokens and bot avatar URLs after 50 minutes (source). That is not proof of the lifetime of the GraphQL avatar URL here. Can you verify that a previously returned URL still loads after its token lifetime, or provide its expiry behavior? Narrowing the comparison to token is straightforward, but retaining an expired snapshot URL indefinitely would leave thread-list avatars stale. Treating this as an outstanding verification gate.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for picking this up. I don't have access to a ghe.com tenant, so I can't verify whether the GraphQL avatar URL keeps resolving after its token expires. I'd rather not guess on that, so I'm fine with narrowing the comparison to the changed token and treating expiry the way you described until someone with GHE access can confirm.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…token
# Conflicts:
# apps/server/src/orchestration-v2/PullRequestSyncReactor.test.ts
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
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.
|