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
TimeBasis[Stored UTC sync_time and UTC state timestamps]
70
71
Due{Due or forced?}
71
72
Cooldown{Scheduled cooldown active?}
72
73
Lock{sync.lock acquired?}
@@ -78,7 +79,7 @@ flowchart TD
78
79
79
80
Start --> Config
80
81
Config -- no --> Write
81
-
Config -- yes --> Due
82
+
Config -- yes --> TimeBasis --> Due
82
83
Due -- no --> Stop
83
84
Due -- yes --> Cooldown
84
85
Cooldown -- yes and not forced --> Stop
@@ -91,7 +92,7 @@ flowchart TD
91
92
Write --> Stop
92
93
```
93
94
94
-
Manual sync bypasses the daily due check and can request a full window, but it still uses `sync.lock`, request budgets, media/delete windows and state writes. This matters on shared hosting: manual repair must not become unbounded.
95
+
Manual sync bypasses the daily due check and can request a full window, but it still uses `sync.lock`, request budgets, media/delete windows and UTC state writes. The automatic due check treats stored `sync_time`, `last_run`, `last_deletion_run` and `deletions_not_before` as UTC so host or plugin changes to PHP's default timezone do not shift the daily 03:00-style FlatPress-local schedule. This matters on shared hosting: manual repair must not become unbounded.
95
96
96
97
## P3/P4 — Remote import
97
98
@@ -174,6 +175,7 @@ flowchart TD
174
175
Start[Scheduled follow-up or admin deletion sync]
175
176
Enabled{delete_sync_enabled?}
176
177
Pending{pending or forced?}
178
+
UtcCooldown[Parse deletions_not_before as UTC]
177
179
Due{due?}
178
180
Lock{sync.lock acquired?}
179
181
Entries[Find missing local mapped entries]
@@ -185,13 +187,13 @@ flowchart TD
185
187
Retry{Legacy error 400 405 422 or delete_media message?}
186
188
RetryOld[Retry DELETE without delete_media]
187
189
Tombstone[Write tombstone or queue descendants recheck]
| deletions_pending_scope | full\|entries\|comments | Limits what deletion work is currently needed. | state_set_deletions_pending. | deletion sync candidate selection. |
55
-
| deletions_not_before | UTC datetime string | Earliest follow-up deletion run time. | state_set_deletions_pending. | deletion_sync_due. |
55
+
| deletions_not_before | UTC datetime string | Earliest follow-up deletion run time. | state_set_deletions_pending. |UTC deletion_sync_due cooldown.|
56
56
| last_error | string | Last operational error or rate-limit reason. | sync and deletion paths. | admin diagnostics, scheduler summary. |
| last_remote_notification_id | string | Newest processed mention notification hint. | notification hint pass. | next notifications since_id logic. |
@@ -190,7 +190,9 @@ flowchart TD
190
190
191
191
## Completed Split-State Guardrails
192
192
193
-
The split-state implementation now uses five additional guardrails:
193
+
The split-state implementation now uses six additional guardrails:
194
+
195
+
UTC timestamp guardrail: scheduler and deletion due checks parse stored state datetimes as UTC, write new technical state timestamps with `gmdate()`, and only apply the FlatPress `locale.timeoffset` when formatting admin-local values or building FlatPress-local date keys.
194
196
195
197
- A short-lived `state-write.lock` serializes every `state.json` and comment-shard mutation, including FlatPress dirty hooks that run outside the long content/deletion sync lock.
196
198
- Partial states carry internal loaded-shard markers. `plugin_mastodon_state_write()` updates only loaded comment shards and preserves unloaded shards.
0 commit comments