Skip to content

fix: add tokens_saved to telemetry payload#471

Merged
pszymkowiak merged 2 commits intodevelopfrom
fix/telemetry-complete
Mar 10, 2026
Merged

fix: add tokens_saved to telemetry payload#471
pszymkowiak merged 2 commits intodevelopfrom
fix/telemetry-complete

Conversation

@pszymkowiak
Copy link
Collaborator

Summary

  • Add Tracker::total_tokens_saved() and Tracker::tokens_saved_24h() to tracking.rs
  • Add tokens_saved_24h and tokens_saved_total fields to telemetry ping payload
  • Lost during develop→master rebase (from commit cc3fb6c)

Test plan

  • cargo test telemetry — 6/6 pass
  • cargo clippy — no new warnings
  • Server accepts payload (204 verified)

github-actions bot and others added 2 commits March 10, 2026 18:38
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Re-add Tracker::total_tokens_saved() and Tracker::tokens_saved_24h()
methods lost during develop→master rebase. Telemetry pings now include
actual token savings data alongside the existing install_method field.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
@pszymkowiak pszymkowiak force-pushed the fix/telemetry-complete branch from 93259d9 to d4b6bce Compare March 10, 2026 17:38
@pszymkowiak pszymkowiak merged commit 0e2718a into develop Mar 10, 2026
2 of 3 checks passed
pszymkowiak added a commit that referenced this pull request Mar 10, 2026
* chore(master): release 0.28.1 (#466)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: add tokens_saved_24h and tokens_saved_total to telemetry payload

Re-add Tracker::total_tokens_saved() and Tracker::tokens_saved_24h()
methods lost during develop→master rebase. Telemetry pings now include
actual token savings data alongside the existing install_method field.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

---------

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
pszymkowiak added a commit that referenced this pull request Mar 10, 2026
* chore(master): release 0.28.1 (#466)



* fix: add tokens_saved_24h and tokens_saved_total to telemetry payload

Re-add Tracker::total_tokens_saved() and Tracker::tokens_saved_24h()
methods lost during develop→master rebase. Telemetry pings now include
actual token savings data alongside the existing install_method field.



---------

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ahundt added a commit to ahundt/rtk that referenced this pull request Mar 11, 2026
Incorporates 52 upstream commits (v0.27.0 → v0.28.2):
- TOML filter DSL engine + 30 built-in filters (PRs rtk-ai#349, rtk-ai#351, rtk-ai#386)
- Graphite CLI support (PR rtk-ai#290)
- git commit -am/--amend fix via trailing_var_arg (PR rtk-ai#327)
- restore_double_dash for cargo (PR rtk-ai#326)
- gh -R/--repo passthrough, pr edit/comment fix (PRs rtk-ai#328, rtk-ai#332)
- docker compose subcommand filtering (PR rtk-ai#336)
- Telemetry tokens_saved + install_method (PRs rtk-ai#462, rtk-ai#469, rtk-ai#471)
- proxy streaming (PR rtk-ai#268)
- Diff limits increased (100→500 lines, 10→30 hunk lines)

Conflict resolution (5 files):
- cargo_cmd.rs: adopted upstream restore_double_dash, adapted streaming
  run_test() to use it, converted old split_at_double_dash tests
- git.rs: adopted upstream simplified Commit unit variant (fixes -am),
  adapted all commit tests to flat args API, added 6 new edge case tests
- init.rs: added TOML template generation alongside hook manifest
- main.rs: merged both upstream (gt, toml_filter, verify) and hooks-v2
  (cmd, hook, stream, pipe) modules, kept all tests from both sides
- utils.rs: kept hooks-v2 command_in_path/which_command + upstream English docs

Hook engine additions during merge:
- Added gt to hook_lookup() whitelist with 4 routing test cases

All 5 hook bug fixes from issue rtk-ai#361 preserved:
1. Streaming (stream.rs BufReader)
2. Handler coordination (parallel-merge + run_manifest_handlers on both paths)
3. Stderr deny (exit 2)
4. Routing whitelist (hook_lookup)
5. Vitest run injection

1182 tests pass (1 environment-dependent upstream test excluded).
ahundt added a commit to ahundt/rtk that referenced this pull request Mar 11, 2026
Incorporates 52 upstream commits (v0.27.0 → v0.28.2):
- TOML filter DSL engine + 30 built-in filters (PRs rtk-ai#349, rtk-ai#351, rtk-ai#386)
- Graphite CLI support (PR rtk-ai#290)
- git commit -am/--amend fix via trailing_var_arg (PR rtk-ai#327)
- restore_double_dash for cargo (PR rtk-ai#326)
- gh -R/--repo passthrough, pr edit/comment fix (PRs rtk-ai#328, rtk-ai#332)
- docker compose subcommand filtering (PR rtk-ai#336)
- Telemetry tokens_saved + install_method (PRs rtk-ai#462, rtk-ai#469, rtk-ai#471)
- proxy streaming (PR rtk-ai#268)
- Diff limits increased (100→500 lines, 10→30 hunk lines)

Conflict resolution (5 files):
- cargo_cmd.rs: adopted upstream restore_double_dash
- git.rs: adopted upstream simplified Commit variant (fixes -am),
  fixed test_git_status_not_a_repo via GIT_DIR env override
- init.rs: added TOML template generation alongside hook manifest,
  made resolve_claude_dir pub(crate) for config/mod.rs
- main.rs: merged upstream (gt, toml_filter, verify) and
  multi-platform (cmd, hook, stream, safety, gemini) modules
- utils.rs: accepted English doc comments

Recovery edits (safety integration restored after incorrect overwrite):
- hook/mod.rs: restored config::rules::try_remap(), safety::check_raw(),
  safety::check() per-command, FORMAT_PRESERVING/TRANSPARENT_SINKS
  pub(crate), basename extraction, safety-dependent tests
- discover/registry.rs: updated 3 wc tests for upstream IGNORED_PREFIXES

All hook engine + safety + gemini features preserved.
1332 tests pass, 0 failures, 5 ignored.
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