You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(parser): map OMP parentSession header to ParentSessionID (#995)
OMP (Oh My Pi) v3 session headers record branch lineage as `parentSession` — the parent's session ID — while upstream pi records `branchedFrom`, a file path. `parsePiLikeSession` only read `branchedFrom`, so branched OMP sessions never got a `ParentSessionID` and their lineage never resolved. Follow-up to #980, which made these sessions discoverable in the first place.
This maps `header.parentSession` to `ParentSessionID` as an OMP-only fallback when `branchedFrom` is absent, reusing the session's own ID prefix. Because a stored session ID is the ID prefix plus the header's session id, and `parentSession` carries the parent's raw session ID, the mapped value equals the parent's stored ID and lineage resolves with no extra lookup. `branchedFrom` still wins when present, and pi sessions never consult `parentSession`, so upstream pi behavior is unchanged.
Where to look: the branch-lineage block in `internal/parser/pi.go`; `TestPiProviderOMPParentSessionMatchesParentID` pins that a branched child's mapped `ParentSessionID` equals its parent's stored ID.
Limitation: other OMP-specific entry types observed in the same investigation (`title_change`, `mcp_tool_selection`, `custom`, `custom_message`, `fileMention`) still fall through silently; they carry no lineage information and are deliberately left as-is.
Co-authored-by: Matthew Jacobs <mjacobs@users.noreply.github.com>
0 commit comments