Skip to content

[G1] Remove vestigial ingest surface before the swap: opencode-stream cursor, legacy harnesses/ adapters, stale reader docs #556

Description

@willwashburn

Part of #553 (group 1 — independent, small). Shrinks what the group-2 backend has to reproduce.

Findings

  • crates/relayburn-cli/src/commands/ingest.rs:40 says "The OpencodeStreamIngestor parser still lives in relayburn-sdk::reader::opencode_stream". That module does not exist. The opencode-stream cursor variant in crates/relayburn-sdk/src/ingest/cursors.rs:80-81 is kept only for round-trip compatibility of old archive_state.upstream_cursors_json blobs (cursors.rs:93-118 preserves unknown variants verbatim anyway).
  • crates/relayburn-cli/src/harnesses/ (claude.rs, codex.rs, opencode.rs, pending_stamp.rs, registry.rs, test_env.rs) is documented as legacy/reference: the CLI no longer exposes a launch command (harnesses/mod.rs:1-7); only claude is registered (registry.rs:68-70); RUNTIME_ADAPTERS for codex/opencode is empty. The only live use is session_store_adapter for pending-stamp resolution.
  • AGENTS.md "Adding ingest support" describes adding readers to crates/relayburn-sdk/src/reader/ and roots to IngestRoots — the path that is being retired.
  • BURN_CLAUDE_PROJECTS_DIR is read directly in query_verbs/summary/compute.rs:223 and query_verbs/flow.rs:281 for subagent counts, bypassing IngestRoots — a second, undocumented root injection point.
  • reader/user_turn.rs:128-138 errors when a cl100k tokenizer is requested ([Rust port] relayburn-sdk: embedding API mirroring TS surface #246); every approx_tokens is ceil(bytes/4).

Scope

  1. Delete the opencode-stream mention from the CLI doc comment; keep the cursor variant (compat) but mark it #[doc(hidden)] with a comment saying it is preserved for old blobs only and will be dropped with the cursor format at cutover.
  2. Collapse crates/relayburn-cli/src/harnesses/ to the one function still used by pending-stamp resolution, or move that function next to ingest/pending_stamps.rs in the SDK and delete the directory; update crates/relayburn-cli/tests/smoke.rs harness-name expectations.
  3. Route the two BURN_CLAUDE_PROJECTS_DIR reads through the same roots object ingest uses (or through the backend seam from the sibling group-1 issue once it lands — whichever merges first; the other rebases).
  4. AGENTS.md: replace "Adding ingest support" with a short "Session sourcing" section: readers are being retired; new harnesses are added in AgentWorkforce/relayhistory; burn adds only pricing, TOOL_ALIASES, overhead-file mapping and fidelity policy per source. Link the burn epic and the relayhistory epic.
  5. Document the cl100k gap as a burn-side policy decision in the same section ("byte/4 heuristic; a tokenizer would live in burn, not the sourcing layer").

Acceptance

  • grep -rn opencode_stream crates/ returns only the hidden cursor variant.
  • crates/relayburn-cli/src/harnesses/ is gone or reduced to one file with a one-line doc comment; cargo test --workspace green; golden tests unchanged.
  • AGENTS.md no longer instructs contributors to add readers to burn.

Out of scope

Deleting the readers themselves (group 3).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions