Skip to content

fix: use timezone-aware UTC webhook timestamps - #344

Merged
eshulman2 merged 2 commits into
forge-sdlc:mainfrom
JoshSalomon:codex/fix-webhook-utc-timestamps
Sep 27, 2026
Merged

eshulman2 merged 2 commits into
forge-sdlc:mainfrom
JoshSalomon:codex/fix-webhook-utc-timestamps

Conversation

@JoshSalomon

@JoshSalomon JoshSalomon commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Replace all four deprecated datetime.utcnow() calls in WebhookEvent with timezone-aware datetime.now(UTC) timestamps, including a per-instance creation-time factory.
  • Carry the Jira event's received_at through publish_once into the Redis queue message, so the timestamp consumed by the Jira event adapter is UTC-aware. Calls without an explicit timestamp now receive an aware UTC timestamp from publish_once.
  • Add regression coverage for event creation and terminal transitions, the Jira route argument, queue serialization, and the queued Jira delivery.
  • Document the stricter event-model test command and the Jira queue timestamp behavior.

This PR is limited to Forge's webhook-event timestamps. It does not include the separate forge-poller acknowledgment fix, change live workflow state, or migrate stored data. Caller-supplied timestamps are preserved as before.

Rebase

Rebased onto main at 08f98d3, which includes the maintainer's CI fixes in #345.

Verification

  • Focused tests: 88 passed with deprecation warnings treated as errors: pytest tests/unit/models/test_events.py tests/unit/queue tests/unit/api/routes/test_jira_webhook.py tests/unit/orchestrator/event_adapters/test_registry.py -q -W error::DeprecationWarning.
  • Ruff lint and formatting checks pass for the changed Python files.
  • git diff --check passes.
  • The Redis-backed integration assertion was added but was not run locally; CI will run the integration gate.

Replace deprecated utcnow calls for webhook creation and terminal status updates. Add warning-as-error regression tests for all four paths and document strict timestamp verification.
@JoshSalomon
JoshSalomon force-pushed the codex/fix-webhook-utc-timestamps branch from e46b4a4 to 430558a Compare September 23, 2026 17:18
@eshulman2
eshulman2 merged commit c1ced47 into forge-sdlc:main Sep 27, 2026
8 checks passed
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.

2 participants