Skip to content

Append precise UTC timestamps to Rig logs - #636

Merged
pelikhan merged 3 commits into
mainfrom
copilot/add-precise-timestamp-to-rig-log-messages
Oct 13, 2026
Merged

pelikhan merged 3 commits into
mainfrom
copilot/add-precise-timestamp-to-rig-log-messages

Conversation

Copilot AI commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Add a millisecond-precision UTC timestamp as the last field of every Rig JSONL log record.

  • Log format: Append an ISO 8601 timestamp after type and optional data, including serialization-error fallback records.
  • Coverage and docs: Add regression coverage for field ordering, successive timestamps, omitted data, and serialization failures; document the format.
{"type":"rig.agent:turn","data":{"turn":1},"timestamp":"2026-10-13T13:00:41.033Z"}

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Append precise timestamps as the last field of Rig logs Append precise UTC timestamps to Rig logs Oct 13, 2026
Copilot AI requested a review from pelikhan October 13, 2026 13:05
Comment thread skills/rig/rig.ts Outdated
function rigEvent(type: string, data?: unknown): { type: string; data?: unknown } {
return { type: `rig.${type}`, data };
function rigEvent(type: string, data?: unknown): { type: string; data?: unknown; timestamp: string } {
return { type: `rig.${type}`, data, timestamp: new Date().toISOString() };

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Use performance now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 04cecab: timestamp now uses performance.now() as a numeric, high-resolution value and remains the last field. Tests and documentation updated.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan October 13, 2026 13:24
@pelikhan
pelikhan marked this pull request as ready for review October 13, 2026 13:43
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot add created_at that uses DateTime.now

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

@copilot add created_at that uses DateTime.now

Added in 6255600: created_at uses JavaScript’s Date.now() (wall-clock milliseconds since the Unix epoch). The high-resolution performance.now() timestamp remains the last field. Tests and documentation updated.

@pelikhan
pelikhan merged commit c00c90c into main Oct 13, 2026
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