fix: seed first P2P backup immediately to reduce row-squatting risk#5370
fix: seed first P2P backup immediately to reduce row-squatting risk#5370RealDiligent wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the P2P draft host adapter to force the first persisted state to upload immediately, ensuring the host claims the backup row before the normal interval. The review feedback identifies a TypeScript compilation error where the static member BACKUP_INTERVAL_PICKS is referenced directly without its class prefix P2PDraftHost.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| // Force the first persisted state to upload immediately so the host | ||
| // claims the backup row before the normal N-picks interval. | ||
| this.picksSinceLastBackup = BACKUP_INTERVAL_PICKS; |
There was a problem hiding this comment.
[HIGH] Unresolved reference to static member. Evidence: client/src/adapter/p2p-draft-host.ts:513. Why it matters: Accessing a static class property directly without the class prefix causes a TypeScript compilation error. Suggested fix: Prefix the static property with the class name P2PDraftHost.
| this.picksSinceLastBackup = BACKUP_INTERVAL_PICKS; | |
| this.picksSinceLastBackup = P2PDraftHost.BACKUP_INTERVAL_PICKS; |
matthewevans
left a comment
There was a problem hiding this comment.
[HIGH] The PR does not type-check: the instance method references the private static without the class qualifier. Evidence: client/src/adapter/p2p-draft-host.ts:513 assigns this.picksSinceLastBackup = BACKUP_INTERVAL_PICKS, but the existing in-class reference at client/src/adapter/p2p-draft-host.ts:1390 uses P2PDraftHost.BACKUP_INTERVAL_PICKS; GitHub also has Frontend (lint, type-check, test) failing on head 2425fbfa. Why it matters: the client cannot compile with this head. Suggested fix: change the new assignment to this.picksSinceLastBackup = P2PDraftHost.BACKUP_INTERVAL_PICKS and provide passing frontend CI/proof for the backup-seeding behavior.
I did not approve or enqueue. Confidence: high. Contradicting evidence would be a TypeScript scope rule or local alias that makes the unqualified private static visible in this method; I found neither.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Are you running into these issues or are these purely theoretical? I appreciate the hardening but I'm hesitant without a real use-case or something proving it's an issue. There are hundreds of open issues that are extremely valuable that will get reviewed much quicker. I appreciate your time and contributions. |
Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Test plan