You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "wu-sheng (via GitHub)" <gi...@apache.org> on 2026/09/26 09:42:32 UTC
[PR] List what happened in the order it happened, never by id [skywalking-ai-sessionizer]
wu-sheng opened a new pull request, #46:
URL: https://github.com/apache/skywalking-ai-sessionizer/pull/46
## Why
A stream's `opened_by`, the `relations` list and a node's `edges` were ordered by relation id. Relation ids end in hashes, so a workflow launch listed the streams it started in hash order. Horizon shows a step's first `starts` edge as the stream to open, and its inspector lists them in this order. On 94 real conversations, 130 of the 150 steps that started several streams led with a stream other than the one their run named first.
## What changes
- **Inside one stream or one workflow run, position decides**: the record's `seq`, `row`, `block`.
- **Across streams, time decides.** A position means nothing there, since a child's file can land before its parent's.
- **The two are combined as a merge** (`internal/view/order.go`). Each lane keeps its own position order, and the lanes are merged by taking, each time, the lane whose next item is earliest, a timed item before an untimed one. A single comparison that decides some pairs by position and others by time is not transitive, as the talk order found.
- **A relation is placed at the earliest record its evidence names**, by the same rule. Each stream's origins are ordered on their own, and an origin that is not listed takes no part in the order.
- **Workspace changes and tool executions stay in time order.** Records of one instant are ordered by where each was read, no longer by id or by how the time is written. `compareTimes` now compares instants only.
- **An id decides only between items that one record supports**, such as two relations with the same evidence.
- **Not changed**: `unresolved` and the other `sessions` stay ordered by id; unresolved entries carry no position, and session nodes are the only nodes without one.
- **Removed**: the unused `Conversation.Edges`.
No key changes; `asz.view` stays 1.0.
## Measured
On the 94 real conversations (65 Claude Code, 8 MCP, 21 LangChain), every document has the same content as on `main`. The order changed in 57. The documented example changes only in order.
## Tests
- `TestInOrderMergesLanesByTime`: position inside a lane even where times disagree, time across lanes, lane heads of one time, untimed and unlanded items.
- `TestAStreamsOriginsKeepOneOrder`, rewritten: origins by position, with ids in the other order.
- `TestEachStreamsOriginsAreOrderedOnTheirOwn`: one stream's origins are not moved by another stream's, or by an origin that is not listed.
- `TestAStepsEdgesAreInTheOrderTheyHappened`: a launch's edges in its run's order; evidence in two lanes placed by time.
- `TestRecordsOfOneTimeAreInTheOrderTheyWereRead`: two spellings of one instant, times that do not parse, the runtime's change first.
17 mutations of these rules were each caught by a test. `make check` passes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] List what happened in the order it happened, never by id [skywalking-ai-sessionizer]
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #46:
URL: https://github.com/apache/skywalking-ai-sessionizer/pull/46
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org