Skip to content

[Rust port] relayburn-ingest: per-harness orchestration loops #277

@willwashburn

Description

@willwashburn

Parent: #245

Context

The standalone modules of relayburn-ingest (pending_stamps, walk,
watch_loop, cursors) and the public verb surface landed in #245. The
per-harness orchestration loops — the bodies of ingest_claude_into,
ingest_codex_into, ingest_opencode_into, and the per-session fast-path
ingest_claude_session — are currently empty stubs that return an empty
report.

Scope

Fill in the orchestration helpers in crates/relayburn-ingest/src/ingest.rs:

  • ingest_claude_into: walk ~/.claude/projects/<project>/, run
    parse_claude_session_incremental per file with cursor + lastUserText
    carry-over, append turns/content/events/relationships/toolResultEvents/userTurns,
    reconcile cross-file relationships at the end.
  • ingest_codex_into: walk codex sessions, drive the resume/cumulative
    state machine, call resolve_pending_stamps_for_session for fresh
    ingests, derive sessionId from filename UUID or first-line hint.
  • ingest_opencode_into: walk ses_*.json files, derive message dir
    mtime, drive parse_opencode_session_incremental with seenMessageIds.
  • ingest_claude_session: replace the current stub with the real fast-path
    body — single parse_claude_session call, append, persist cursor at EOF.

Files

  • crates/relayburn-ingest/src/ingest.rsingest_*_into helpers and
    the ingest_claude_session body.

Acceptance

  • Each per-harness helper round-trips a fixture session through the
    full parse-and-append path.
  • ingest_all integration test: drop a session file under each
    harness's session root, run ingest_all, assert turns appear in
    the ledger and cursors are persisted.
  • ingest_claude_session test: writes one cursor at EOF such that a
    subsequent ingest_all skips the file.
  • cargo test -p relayburn-ingest green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions