Skip to content

Fleet episode-id namespace split: record_external_episode returns a UUID, fleet_get_episode rejects it (expects a ULID) #19

@Regis-RCR

Description

@Regis-RCR

TL;DR: record_external_episode returns an episode_id shaped like a UUID. fleet_get_episode rejects that same id with invalid episode_id (expected a ULID). An episode created through one fleet tool cannot be fetched through its sibling getter: the getter rejects the UUID-shaped id that the create call returns.

Environment

  • memtrace 0.6.11, macOS arm64
  • fleet episode tools via memtrace mcp

Repro

record_external_episode(repo_id, source_type="external_...", source_id, ...)
  -> episode_id: deb0a10b-5920-4b8d-b130-d54c8762cfe5       (UUID shape)

fleet_get_episode(episode_id="deb0a10b-5920-4b8d-b130-d54c8762cfe5")
  -> error: invalid episode_id (expected a ULID): deb0a10b-5920-4b8d-b130-d54c8762cfe5

fleet_get_episode expects a ULID, but record_external_episode returns a UUID-shaped id, so the id it returns does not resolve through fleet_get_episode.

Expected

An episode id returned by record_external_episode should be fetchable via fleet_get_episode. Either the external-episode path returns a ULID like the rest of the fleet episode surface, or fleet_get_episode accepts both shapes, or the docs make clear that external episodes are a separate namespace not addressable through that getter.

Actual

The two id formats do not interoperate. A caller that records an external episode, captures the returned episode_id, then tries to read it back through fleet_get_episode hits a hard parse rejection. Nothing in the record_external_episode response signals that its id belongs to a namespace the getter cannot read. The error is accurate, but the surprise is upstream: the create call handed back an id the matching get call refuses.

Why it matters

The create-then-fetch loop is a common pattern: record an episode, hold the id, look it up later. That loop silently breaks for external episodes. A caller has no obvious way to know the UUID is a dead end short of trying the fetch and reading the error. If external episodes are deliberately a distinct namespace, that is a reasonable design, but it should be visible at the API boundary rather than discovered through a failed fleet_get_episode.

Ask

Align the id formats across the fleet episode surface (mint a ULID from record_external_episode, or teach fleet_get_episode to resolve the external-episode UUID), or document the namespace split and point external-episode callers at whatever getter resolves the UUID. Happy to send a PR once the intended behavior is settled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions