Skip to content

Sessions: delete the production-dead TranscriptSource parse/persist pipeline #2699

Description

@ScriptedAlchemy

Summary

Host ingest moved to observation admission (admit_*_observations, capture_*_snapshot_observations), but the pre-admission pipeline, where TranscriptSource::parse_new/try_parse_new produce ParsedTranscript rows and persist_parsed_transcript writes them, still exists. Tests are its only callers, so those tests cover an implementation that production no longer runs.

Evidence (origin/master 9b79b48)

  • try_ingest_source / try_ingest_source_with_store (crates/tracedecay-sessions/src/runtime/source.rs) have 0 non-test callers. The only production call to try_parse_new is prepare_loaded_transcript, which only try_ingest_source_with_store reaches. persist_parsed_transcript is reached only through that chain as well.
  • These parse_new impls are reached only through that chain: CursorEventSource, CursorSweepSource, CodexSource, KiroSource, ClineLikeSource, VibeSource. Production Cursor ingest uses admit_cursor_jsonl_observations. Kiro uses capture_kiro_snapshot_observations, which calls parse_snapshot directly.
  • Cursor's parse_cursor_jsonl and event_dispatch_messages build tool_dispatch rows that duplicate canonical_cursor_compatibility_message_fields in tracedecay-store/src/canonical_projection.rs. Two renderers now produce one shape, and only the canonical one runs in production.
  • KiroSource::parse_new swallows errors with .ok().flatten().
  • About 75 test call sites depend on it: transcript_ingest_suite/{cursor,cursor_composer,codex,codex_ingest,codex_usage,codex_response_items,kiro,vibe,cline_like,restart_atomicity,source_identity}.rs, session_suite/lcm_raw.rs, dashboard_api_test/runtime.rs, tracedecay-sessions source/tests.rs and hosts/{codex,cursor}/tests.rs, and benches/transcript_ingest.rs.

Cutover

Remove parse_new/try_parse_new from TranscriptSource along with try_ingest_source*, prepare_loaded_transcript, persist_parsed_transcript, and the host parse bodies that become dead. Move each test that asserts real host-format behavior onto the production admission entry points, and delete the tests that only protect the parse pipeline.

Found by the legacy-api-sweep sessions lane.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions