You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 31, 2026. It is now read-only.
Repository navigation
Commit 55bb006
Browse filesBrowse the repository at this point in the historyBrowse files
fix: signal gContainerFetchDone immediately after container fetch (not after twin)
Root cause of double CONTAINER_GET (seen in logs):
- cloudWorkerTask was setting gContainerFetchDone=true AFTER the twin fetch
- Twin fetch takes ~2s; scan timeout and twin completion landed at same tick
- SCANNING phase exited to STABLE_WAIT before picking up gContainerFetchDone
- wfContainerFetched stayed false → computeWeightAvailable did a sync HTTP call
during SENDING, adding 500ms + one extra Firestore connection
- The extra connection likely caused the subsequent PATCH HTTP=-1 failures
Fix:
- Set gContainerFetchDone=true immediately after container fetch result is stored
- Set gContainerFetchPending=false at the same time
- Twin fetch and uid_b container fetch continue afterward without blocking the signal
- In SCANNING: check gTwinFetchDone independently (separate from gContainerFetchDone)
so twin display still works even if SCANNING exits before twin fetch completes
Result: with a ~5s scan window, container is signaled within 500ms, twin within 2.5s.
No more double CONTAINER_GET. PATCH calls get clean connections.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments