Skip to content

[G3] Harness expansion through relayhistory: Cursor and Grok in burn (SourceKind, pricing, TOOL_ALIASES, overhead mapping, fidelity policy) and collector-backlog transfer #560

Description

@willwashburn

Part of #553 (group 3 — depends on burn #562 cutover (default backend = relayhistory) and relayhistory #166 Cursor / #167 Grok parity; parallel with #563).

Problem

burn's SourceKind (crates/relayburn-sdk/src/reader/types.rs:32-55) is claude-code | codex | opencode | anthropic-api | openai-api | gemini-api; only the first three are produced. With relayhistory as the source, Cursor and Grok sessions arrive for free, and every burn per-harness table needs an entry. burn #489 (Grok) planned an 11-PR stack; after cutover only the burn-side slices of it remain.

Scope

  1. Types: SourceKind::{Cursor, Grok} ("cursor", "grok"), RelationshipSourceKind variants, Harness variants, PendingStampHarness::{Cursor, Grok} (+ packages/sdk-node/src/index.d.ts unions), AdapterName for gap warnings. Decide whether SourceKind becomes an open string mirroring relayhistory's Source to avoid a burn release per new collector — recommend keeping the enum for exhaustiveness in pricing/overhead tables but adding SourceKind::Other(String) that is priced/classified with defaults and reported as FidelityClass::Partial.
  2. Classifier: TOOL_ALIASES (reader/classifier.rs:54-78) entries for Cursor tools (read_file, edit_file, run_terminal_cmd, codebase_search, grep, …) and Grok tools (Shell→Bash, StrReplace→Edit, CallMcpTool→Mcp, WebSearch/WebFetch→WebFetch, per Add Grok CLI harness support #489's table).
  3. Pricing: xAI entries (grok-composer-2.5-fast, grok-build, $1/$2 per 1M per Add Grok CLI harness support #489) in crates/relayburn-sdk/data/models.dev.json via pnpm run pricing:update + overrides; Cursor model ids observed in relayhistory's Cursor fixture.
  4. Fidelity policy (reader/fidelity.rs): per-source coverage builders from relayhistory SourceCapabilities + NormalizedUsage.accounting: Grok = UsageGranularity::PerSessionAggregate/Partial with the ContextProxy accounting (relayhistory records context_total_tokens only; burn's estimator from Add Grok CLI harness support #489 — bytes/4 output, context-delta input — lives in analyze/, not in the reader, and is applied only when accounting == ContextProxy); Cursor = whatever relayhistory reports (full if usage present).
  5. Overhead (analyze/overhead.rs:73-89 source→file mapping): Grok → AGENTS.md (+ prompt_context.json path from relayhistory session metadata), Cursor → .cursor/rules / AGENTS.md as characterized.
  6. Subagent tree / relationships: consume relayhistory's grok_subagent_dir and Cursor relationships through the [G2] RelayHistoryBackend: depend on the ai-hist crate, map SessionEvidence onto burn's record types behind the backend seam (feature-flagged, off by default) #557 adapter (no per-harness code).
  7. Collector backlog: comment on burn Collector: Gemini CLI #13–Collector: Cortex Code (Snowflake) #36, Octofriend SQLite fallback collector for Synthetic-routed traffic #98, Add Grok CLI harness support #489 that sourcing moved to relayhistory (link the mirrored issue from relayhistory Claim at most one pending stamp per session (#162) #177) and that burn's remaining work per collector is items 2–5 above; close them not_planned once the mirrors exist. Update the collector label description.
  8. README.md harness list, CHANGELOG.md.

Acceptance

  • burn summary --by-provider on a relayhistory store containing the Cursor and Grok corpus fixtures shows xai/Cursor rows with priced cost and a fidelity note for Grok.
  • burn hotspots --group-by bash-verb attributes Grok Shell and Cursor run_terminal_cmd calls.
  • burn overhead --kind agents-md includes a Grok session.
  • Smoke test (crates/relayburn-cli/tests/smoke.rs) harness-name expectations updated; cargo test --workspace green.

Out of scope

Any log parsing in burn.

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