Skip to content

fix: stop fabricating identical end datetime when no real end time exists#136

Merged
chubes4 merged 1 commit intomainfrom
fix/event-end-datetime-fallback
Mar 21, 2026
Merged

fix: stop fabricating identical end datetime when no real end time exists#136
chubes4 merged 1 commit intomainfrom
fix/event-end-datetime-fallback

Conversation

@chubes4
Copy link
Member

@chubes4 chubes4 commented Mar 21, 2026

Summary

  • Root cause fix: meta-storage.php was copying the start datetime to end datetime when no real end time was provided, causing 21k+ events (68% of all published events) to display as "6:00 - 6:00 PM"
  • Display safety guard: DisplayVars::format_time_range() now returns start time only when start == end
  • Unified fallback logic: All three end-datetime writers (meta-storage.php, MetaSyncAbilities, CheckMetaSyncCommand) now use the same strategy: sentinel 23:59:59 for end-date-without-end-time, delete meta when no end data at all
  • Schema improvement: EventSchemaProvider omits endDate from JSON-LD when it equals startDate (Google says endDate is recommended not required, and identical values convey false precision)
  • Hydrator protection: EventHydrator skips end propagation for legacy data where start == end
  • Backfill applied: Deleted 21,413 bogus _datamachine_event_end_datetime meta rows where value equaled start datetime

Before / After

Before After
Display 6:00 - 6:00 PM 6:00 PM
JSON-LD "endDate": "2026-03-25T20:00:00" (same as start) endDate omitted
Meta storage (no end time) Copies start datetime Deletes end meta
Events with bogus end meta 21,268 0

…ists

Events without a real end time were getting their start datetime copied
to _datamachine_event_end_datetime, causing '6:00 - 6:00 PM' display
on 21k+ events (68% of all events).

Root cause: meta-storage.php line 217 copied start → end when no endDate
block attribute existed. Three inconsistent fallback strategies across
meta-storage, MetaSyncAbilities, and CheckMetaSyncCommand made it worse.

Changes:
- meta-storage.php: delete end meta when no real end time (was: copy start)
- DisplayVars: add safety guard for start == end time display
- EventHydrator: skip end propagation for legacy start==end data
- EventSchemaProvider: omit endDate from JSON-LD when it equals startDate
- MetaSyncAbilities: unify dry-run preview with meta-storage logic
- CheckMetaSyncCommand: unify CLI resync with meta-storage logic
- Backfill: deleted 21,413 bogus end_datetime meta rows via SQL
@chubes4 chubes4 merged commit 06a4489 into main Mar 21, 2026
1 check failed
@homeboy-ci
Copy link
Contributor

homeboy-ci bot commented Mar 21, 2026

Homeboy Results — data-machine-events

Homeboy

Failure Digest

Lint Failure Digest

Test Failure Digest

Audit Failure Digest

Autofixability classification

  • Overall: auto_fixable
  • Autofix enabled: yes
  • Autofix attempted this run: no
  • Auto-fixable failed commands:
    • lint
  • Failed commands with available automated fixes:
    • lint

Machine-readable artifacts

  • homeboy-lint-summary.json
  • homeboy-test-failures.json
  • homeboy-audit-summary.json
  • homeboy-autofixability.json

⚡ Scope: changed files only

audit (changed files only)

  • Drift increased: no

lint (changed files only)

test (changed files only)

  • Failed tests: 0
Tooling versions
  • Homeboy CLI: homeboy 0.85.0+54f6dad
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: unknown
  • Action: Extra-Chill/homeboy-action@v2

Homeboy Action v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant