Progress log storage

Since 1.30.0 (#151741) a task’s progress log is stored as comments of type lh_task_log, one per entry, instead of one serialized _lh_tasks-progress_log post meta array. Every append to the array read the whole log and saved it back, so two entries written at the same moment (a heartbeat and a note, say) could drop one. Each entry is now its own row. LH_Tasks_progress_log_class (includes/lh-tasks-progress-log-class.php) owns the storage.

Shape

Kept internal

Entries are inserted directly into the comments table, not through wp_insert_comment(), so nothing that listens for new comments sees them. Enable Mastodon Apps mirrors every approved comment into a published post (fix proposed upstream as akirk/enable-mastodon-apps#360), and ActivityPub and BuddyPress record comment activity. No comment notifications or spam checks run. Log comments are also left out of:

Migration (1.30.0, removed in 1.30.1)

1.30.0 moved every existing log across on init, a batch of tasks per request, keeping each entry’s time and actor, and deleted each task’s old meta once all its entries were verified. Every site had finished within minutes, with no failures, so 1.30.1 (#154918) removed the migration and the reader’s fallback to the old meta. Migrated entries still carry _lh_tasks-log-legacy_index (their position in the old array); the reader hides it. The options lh_tasks_progress_log_comments_migrated left on each site are no longer read.