Repository navigation
feat(audit-logs): Allow events without an occurrence timestamp - #1751
Closed
swaroopThereItIs-workos wants to merge 1 commit into
Closed
swaroopThereItIs-workos wants to merge 1 commit into
swaroopThereItIs-workos wants to merge 1 commit into
Conversation
Contributor
[Medium impact] The SDK change appears safe to merge. SummaryMakes
No actionable issues found. Reviews (1) · Last reviewed commit: "feat(audit-logs): make occurredAt option..." · Reviewed by Greptile |
swaroopThereItIs-workos
deleted the
codex/audit-logs-optional-occurred-at
branch
November 4, 2026 17:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Audit Logs callers should be able to use the server's default occurrence timestamp without constructing a Date in the SDK.
createEventnow accepts an omittedoccurredAtand leavesoccurred_atout of the JSON request. Explicit dates keep their existing serialization, and automatic idempotency keys are unchanged.Proof
.toISOString()TypeError. Against this change, both send an event withoutoccurred_at.2026-11-03T12:34:56.789ZDate still reaches the request body as the same ISO timestamp.c0e28a4e796e5d58295bbd7f68248b82cd057b37found no remaining blocking issues after removing the obsolete 24-hour expiry promise. The reviewer independently ran the Audit Logs suite: 37 tests passed.Not proven
The server default is part of the coordinated Audit Logs backend change and is not asserted to be deployed. Release this SDK change only after backend support is available everywhere. The source proposal is https://app.notion.com/p/3f9d458aea8b8064a8c8fb86fa6673a5.