Repository navigation
Conversation
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 second. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Rendered recovery evidence is still missing, as the PR notes. Please add before-and-after captures of Home refresh/reconnect on phone, tablet, foldable (folded and open), and TV, plus phone notifications, with short recordings showing retry timing. Name the build and device for each, or explain why a device is unaffected. The finite fixtures do not show these visible flows; CONTRIBUTING.md requires captures for affected surfaces. AI-assisted triage: openai/gpt-6.1-sol via OpenClaw. |
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (claude-opus-5-5, reviewed 31dc04b)
Two new findings, both in how EventsSocketV2Api.frames handles a refused upgrade on the Android OkHttp engine. I also confirmed one existing bot finding.
New findings (inline):
- P2: a 401 on the WebSocket upgrade now stops notifications realtime until the app is backgrounded or the profile changes. The base revision retried it.
- P3: on OkHttp, a 429 or 503 upgrade refusal throws before the
executeblock runs, so the upgradeRetry-Afteris never read. The in-memory test engine does not reproduce this.
Confirmed existing finding (P2): Kody's comment on GenericEventsRecovery.kt:85 holds, judging by the source. AndroidServerRegistry.remove of an inactive server runs changing(SERVER_REMOVE) with affectsCurrentIdentity = false, which still advances the barrier generation. EncryptedTokenManagerImpl copies that generation into every scope snapshot, and AuthScopeSnapshot.isSameIdentityAs compares it. Home's owner.matches(..., OwnerPolicy.PROFILE) check then returns from the collector. Notifications' while (current(connectionViewer)) loop also exits. genericEventsForIdentity skips that transition, so neither consumer restarts until the next identity transition, profile reset, or foreground cycle. At the base revision both loops ran while (true) and took a fresh viewer each pass, so they recovered. I checked this by reading the source only; I did not execute it.
Checked, no finding: the 5/10/20/30 s ladder; reset only after at least 30 s of qualified acceptance, with 1 s plus jitter; 0–50% jitter; delta-seconds and HTTP-date Retry-After read at mint; overflow clamping on huge Retry-After; immediate access_changed; a fresh ticket per attempt; one consumer and one delay per identity; cancellation on identity replacement and when the app leaves the foreground. Also the two repaired issues: decoded nonempty WsSubscribed acceptance, and transition observation registered before guarded undispatched startup. Room and playback recovery are unchanged.
Method and limits: I read the 15-file diff against base b1e5774f, plus the Home (phone and TV) and phone notification call sites, the Ktor 3.1.2 and OkHttp 4.12.0 bytecode on the resolved classpath, and the server handlers that send these statuses. For the inline findings I compiled and ran a small JVM program, outside the repository, against the real Ktor OkHttp engine and WebSockets plugin. It uses a stub okhttp3.WebSocket.Factory that reports the handshake outcome the way RealWebSocket.checkUpgradeSuccess does, so it opens no socket and makes no network request. I did not run the Gradle suites, a device, or a live server.
AI disclosure: Claude Code with Claude Opus 5.5 (claude-opus-5-5), running in the T3 Code harness, wrote this review. No other AI tools were used.
|
Home recovery changes when Home sections refresh after a socket reconnect ( Suggested fix: No diff; add the rendered recordings to the evidence page. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The latest changes alter user-visible recovery after refused upgrades and identity-generation changes, while the Evidence section says no rendered captures were made.
Suggested fix: No diff; add the rendered recordings to the evidence page. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (claude-opus-5-5, reviewed 9c38a9a)
All three findings from the 31dc04b round are fixed at this head. I found one new P3, inline: nothing executed checks that the production HTTP client installs the new eventsUpgradeResponses() interceptor.
Repairs checked:
- Upgrade 401/403 now throws
EventsUpgradeFailureand closes assocket_error, so it takes the 5 s failed-attempt floor and mints a fresh ticket. Mint 401/403 still closes asticket_error_401/_403and parks notifications. - The interceptor acts only on
/api/v2/events/wswith thesilo.events.v2subprotocol and a non-101 status. It closes the response and keeps only the status and the parsedRetry-After. A 101 passes through unchanged, and room and playback sockets do not match.LocalRouteInterceptornever routes WebSocket upgrades (LocalRouteInterceptor.kt:113), so its fallback cannot replay a spent ticket.EventsUpgradeFailureis anIOException, so OkHttp reports it throughonFailure. - In the resolved Ktor 3.1.2 bytecode,
OkHttpEngineapplies theconfig {}block to every client it derives and uses that client as the WebSocket factory when none is configured. The interceptor is therefore on the production upgrade path. - Generation rebasing: both barrier phases carry the new generation, so
WILL_CHANGEcancels the collector andDID_CHANGErestarts it under the barrier. Inactive-server removal is the only producer ofaffectsCurrentIdentity = false, so the extra reconnects are rare and user-initiated. The ACK qualification and observe-before-start repairs are unchanged.
For later work on this boundary: the interceptor closes the refusal body. A future client that needs structured refusal details from a 429 or 503 body has to read them here.
Method and limits: I read the full diff against b1e5774f, the 31dc04b..9c38a9a repair, the Home and notification call sites, the HTTP client and local-route wiring, and the Ktor OkHttp engine bytecode. I did not run Gradle, a device or a live server. Test results cited in the PR are the author's runs, not mine.
AI disclosure: Claude Code with Claude Opus 5.5 (claude-opus-5-5), running in the T3 Code harness, wrote this review. No other AI tools were used.
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Related issue: Silo-Server/silo-server#2727
Validation tasks: changes #315 C1-C3; changes #316 C1-C3; changes #332 C1; changes #333 C1; changes #347 C4-C5,C7,C9; changes #348 C4-C5,C7,C9 (generic refresh, reconnect and foreground lifecycle only).
Generic event consumers reset recovery on useful traffic and retry failed connections too quickly for staged socket admission. This gives Home and notifications one shared policy: failed or short attempts use 5/10/20/30-second floors; an accepted subscription lasting at least 30 seconds resets to one second. Jitter adds 0–50%, and readable Retry-After raises the floor.
Each actual attempt mints a fresh ticket. Bare, empty and all-rejected acknowledgements do not count as accepted uptime. Access changes retain immediate recovery. Foreground stop and identity replacement cancel the pending delay and collector; initial collection waits for identity mutation to complete. Rooms and playback retain their recovery.
Validation
Evidence
Finite Kotlin fake-clock/flow fixtures, the real in-process identity barrier and Ktor engine/session fixtures verify the exercised paths. A resolved Ktor 3.1.2/OkHttp 4.12 fixture uses a stub WebSocket factory and terminal interceptor with DNS/socket guards to verify failed upgrade headers without network traffic. No rendered device evidence was captured under the finite verification boundary. Recovery can affect phone, tablet, foldable and TV; no form factor is claimed verified. Reviewers still need to assess the missing rendered evidence before release.
Evidence: https://evidence.siloserver.org/r/silo-android/event-socket-recovery/
Integration and release
Server preparation is Silo-Server/silo-server#2739. Startup observes thresholds only; issue #2727 remains unresolved. No deployment, pilot or enforcement occurred, and this local debug candidate is not a named compatible release.
Work-rate recovery remains separate in #642 at 54cf042. Owned composition
c771d33c9b31f4af7142c42cbbeb104c12fea82c, treebcaaa03710955f975d4bdf1c4e5016da85007839, has ordered parents work-rate54cf042262afbd19d35f3f5f8f0a6d842440ff08and C3146d47bb4910f44ebe54aafb9bb2563e3ac6639bb. At that exact head, 114 focused tests in 12 suites and 6,182 permitted unit tests in 770 suites pass; the focused cases are included in the unit total. Supply-chain checks, five required lint tasks and phone/TV debug assembly pass. Parent verification checked 868 retained artifact hashes, four reconstructed patch trees and all 615 excluded room/playback blobs against the work-rate parent; it did not rerun tests. The initial SDK path mismatch stopped before testing and was corrected only in task subprocess variables. Known shield/unavailable reasons, selection floors, correlated refusal and authority fences precede generic fallback; structured refusal stays connected. The standalone PR imports no work-rate source. Independent review covers work-rate 46a and C31 9c38. The small 54cf production response, 46d test-only follow-up and c771 composition have not been independently rereviewed. Eleven network fixture classes remain unexecuted; the literal network-inclusive gate, rendered/device verification and a compatible released baseline are still missing. This is finite source/transport and build evidence, without combined server/native runtime or release clearance.Apple has no generic event consumer in reviewed main; prospective recovery requirements are tracked in Silo-Server/silo-apple#847. User manual: Silo-Server/siloserver.org#261 and draft docs PR Silo-Server/siloserver.org#262.
AI disclosure
Note
Add shared backoff and Retry-After recovery for generic realtime events connections
Failed generic events connections now follow a shared recovery policy instead of local fixed backoff loops. The ladder uses 5/10/20/30 second floors, resets after 30 seconds of accepted uptime, honors
Retry-Afterheaders (delta-seconds or HTTP-date), and reconnects immediately for access changes.genericEventsConnectionandGenericEventsAttemptin GenericEventsConnection.kt, with one ticket mint and one upgrade per attempt, ACK-based uptime, and a structuredGenericEventsCloseterminal event.HomeRealtimeClientandNotificationsRealtimeClientboth use it.genericEventsForIdentityin GenericEventsRecovery.kt so no collector starts during an identity mutation; old collectors are joined and replaced only after the new generation is ready.EventsUpgradeFailurewith status andRetry-Afterpreserved, instead of being dropped by the WebSocket listener.Macroscope summarized 46d47bb.