Skip to content

chore(cli): remove obsolete tracevault push command#119

Merged
softberries merged 2 commits intomainfrom
chore/remove-push-command
Apr 22, 2026
Merged

chore(cli): remove obsolete tracevault push command#119
softberries merged 2 commits intomainfrom
chore/remove-push-command

Conversation

@softberries
Copy link
Copy Markdown
Member

`push` was the legacy batch-at-end-of-session uploader. It POSTed a monolithic `PushTraceRequest` (commit metadata + diff + token totals + full transcript + session_data, all in one blob) to `/api/v1/orgs/{slug}/traces`.

That endpoint is no longer wired in the server — any POST to it gets a 404 today. The CLI command has been calling a missing endpoint and just hasn't been used enough for anyone to notice.

The replacement is already there

In the current pipeline the same data flows through two real-time paths installed by `init`:

  • `tracevault stream` (Claude Code hook): per-event POST to `/stream` → populates `sessions`, `events`, `file_changes`, `transcript_chunks`
  • `tracevault commit-push` (git post-commit hook): per-commit POST to `/commits` → populates `commits`, `commit_attributions`, `branch_tracking`

Both run automatically. The dashboard's GET endpoints under `/traces/*` (analytics, session detail, commit detail, timeline, attribution, branches) read from the same tables and keep working unchanged — only the write path changes.

Investigation summary

Before removing I verified there are no callers anywhere in the tree:

Consumer Status
Server `POST /traces` route Not registered — returns 404
`init` hooks (pre-push, post-commit, Claude) Don't invoke `push`
GitHub Action (`action/action.yml`) Only calls `verify`
Enterprise submodule No references
Web dashboard GETs only, never POSTs

Every field `PushTraceRequest` set (`total_tokens`, `cache_read_tokens`, `model_usage`, `compactions`, …) is now captured by `/stream`'s `final_stats` or `/commits`' `diff_data`. No data loss.

Changes

  • Delete `crates/tracevault-cli/src/commands/push.rs` (852 lines)
  • Remove `pub mod push` from `commands/mod.rs`
  • Remove `Cli::Push` variant and handler from `main.rs`
  • Remove `PushTraceRequest`, `PushTraceResponse`, and `ApiClient::push_trace` from `api_client.rs`
  • README: drop `tracevault push` from the pre-push hook example, the commands table, and the authenticate section. Rewrite the latter to surface `flush` (retry queue) instead.
  • `crates/tracevault-cli/README.md`: replace the quick-start `push` example with `check` and `flush`.

Paired website docs PR to follow.

Test plan

  • `cargo fmt --all`
  • `cargo clippy --all-targets -- -D warnings`
  • `cargo test -p tracevault-cli` — all suites pass
  • `tracevault --help` no longer lists `push`
  • Manual: confirm an existing install continues to write sessions and commits via `stream` and `commit-push` with no `push` command in sight

`push` was the legacy batch-at-end-of-session uploader. It POSTed a
monolithic PushTraceRequest (commit metadata + diff + tokens + full
transcript + session_data, all in one blob) to
/api/v1/orgs/{slug}/traces. That endpoint is no longer wired in the
server — any POST to it gets a 404 today.

In the current pipeline the same data flows through two real-time
paths installed by `init`:
- `tracevault stream` (Claude Code hook): per-event POST to /stream,
  writes sessions / events / file_changes / transcript_chunks
- `tracevault commit-push` (git post-commit hook): per-commit POST to
  /commits, writes commits / commit_attributions / branch_tracking

Both run automatically. The dashboard's GET endpoints under /traces/*
(analytics, session detail, commit detail, timeline, attribution,
branches) read from the same tables and keep working unchanged — only
the write path changes.

Verified no callers:
- Not wired into any hook (pre-push runs sync+check, post-commit runs
  commit-push)
- GitHub Action only calls `verify`
- Enterprise submodule: no references
- Web dashboard: GETs only, never POSTs

Changes:
- Delete crates/tracevault-cli/src/commands/push.rs (852 lines)
- Remove `pub mod push` from commands/mod.rs
- Remove `Cli::Push` variant and handler from main.rs
- Remove PushTraceRequest, PushTraceResponse, and ApiClient::push_trace
  from api_client.rs
- README: drop `tracevault push` from the pre-push hook example, the
  commands table, and the authenticate section. Rewrite the latter to
  surface `flush` (retry queue) instead.
- crates/tracevault-cli/README.md: replace the quick-start `push`
  example with `check` and `flush`.
@softberries softberries merged commit cc218f9 into main Apr 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant