Skip to content

Read AI agent record times to the second, as Session Data defines them - #14112

Merged
wu-sheng merged 1 commit into
masterfrom
ai-agent-time-seconds
Sep 28, 2026
Merged

wu-sheng merged 1 commit into
masterfrom
ai-agent-time-seconds

Conversation

@wu-sheng

Copy link
Copy Markdown
Member

Read AI agent record times to the second, as Session Data defines them

  • If this is non-trivial feature, paste the links/URLs to the design doc.
  • Update the documentation to include this new feature.
  • Tests(including UT, IT, E2E) are added to verify the new feature.
  • If it's UI related, attach the screenshots below.

A review of #14108 against the AI Sessionizer found that the conversation module read a record's time with java.time's ISO_OFFSET_DATE_TIME, which also takes a time without seconds, such as 2026-01-01T00:00Z. Session Data defines a time as a four-digit year, the letter T, the time of day to the second with a fraction of up to nine digits or none, and Z or an offset such as +08:00; a value that is not such a time means the record has no time. The Sessionizer reads it that way, so the two ordered such records differently.

  • format/Times.java reads exactly that form, with a strict formatter.

  • New test SessionFormatsTest.onlyATimeTheFormatDefinesIsATime: three valid times and eight values that are no time (no seconds, a five-digit year, an offset without a colon, a lowercase t, hour 24, ten fraction digits, February 30). It fails with the ISO reader back.

  • The module's 100 tests pass, with checkstyle. The documents of 94 real conversations (65 Claude Code, 8 with MCP calls, 21 LangChain) are byte-identical before and after.

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.

  • Update the CHANGES log.

The conversation module read a record's time with java.time's
ISO_OFFSET_DATE_TIME, which also takes a time without seconds, such as
2026-01-01T00:00Z. Session Data defines a time as a four-digit year, the
letter T, the time of day to the second with a fraction of up to nine
digits or none, and Z or an offset such as +08:00, and a value that is not
such a time means the record has no time. The AI Sessionizer reads it that
way, so the two ordered such records differently.

Times now reads exactly that form. The documents of 94 real conversations
are unchanged.
@wu-sheng wu-sheng added this to the 11.1.0 milestone Sep 28, 2026
@wu-sheng wu-sheng added the backend OAP backend related. label Sep 28, 2026
@wu-sheng
wu-sheng merged commit c4ae53d into master Sep 28, 2026
478 of 481 checks passed
@wu-sheng
wu-sheng deleted the ai-agent-time-seconds branch September 28, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend OAP backend related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants