Skip to content

Timestamp WebAgent event data at emission - #720

Open
jepharaujo wants to merge 1 commit into
mozilla:mainfrom
jepharaujo:fix/web-agent-event-timestamps
Open

jepharaujo wants to merge 1 commit into
mozilla:mainfrom
jepharaujo:fix/web-agent-event-timestamps

Conversation

@jepharaujo

Copy link
Copy Markdown

Description

Populate a numeric data.timestamp when the WebAgent emits a known event without one. Listeners and loggers now receive the time of emission in the existing payload field.

Existing timestamps and custom events are preserved. The outer serialized event format is unchanged.

PR Type

  • Bug Fix

Related issues

Fixes #663.

Checklist

  • I understand the code I am submitting.
  • I have tested this code locally.
  • New and existing tests pass locally (pnpm run check).
  • I have added tests that prove my fix works.
  • Documentation was updated where necessary. No documentation change was needed because the event payload type already declares this field.
  • I have read and followed the contribution guidelines.

The regression test failed on main and passed with the change. It checks typed and wildcard listeners, preserves existing timestamps and custom events, and verifies that the input object is unchanged. pnpm run check passed on Node 22 and pnpm 9, including the schema check and 1,606 passing tests. Gitleaks found no leaks in the staged changes.

AI Usage

  • No AI was used
  • AI was used for drafting/refactoring
  • This is fully AI-generated

OpenAI Codex (GPT-6) wrote, reviewed, and tested the change.

@jepharaujo
jepharaujo requested a review from a team November 29, 2026 01:29

This branch has not been deployed

No deployments
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.

Agent event timestamps are unusable for per-step timing (declared numeric, emitted as clustered ISO strings)

1 participant