Commit Graph

18 Commits

Author SHA1 Message Date
Nicolas Le Cam c59a76375a review: cleanup code, comments and uneeded undocumented RTK_CLAUDE_DIR now that we have CLAUDE_CONFIG_DIR 2026-06-09 21:51:23 +02:00
Christian C. Berclaz 9671d9ea7e refactor(init): address review feedback on CLAUDE_CONFIG_DIR PR
- restore migration Outdated check in hook_check (binary registered +
  legacy script present still reports Outdated until cleanup)
- add error context to resolve_claude_dir call sites (provider, integrity)
- use CLAUDE_DIR const instead of literal in telemetry + provider test
- simplify settings_path construction in print_manual_instructions

Refs #2087
2026-06-09 21:51:23 +02:00
Christian C. Berclaz 05de9d366a fix(init): respect CLAUDE_CONFIG_DIR for global paths
rtk init -g ignored CLAUDE_CONFIG_DIR and always targeted ~/.claude.
Honor the env var Claude Code uses to relocate its config directory.

Priority: RTK_CLAUDE_DIR > CLAUDE_CONFIG_DIR > $HOME/.claude.
Empty values are treated as unset. Manual-step instructions now
print the resolved path instead of a hardcoded ~/.claude.

All callsites that previously hardcoded home.join(CLAUDE_DIR) now use
the shared resolve_claude_dir(): hook_check (rtk gain), integrity
(rtk verify), telemetry, and discover (rtk discover).

Closes #633
2026-06-09 21:51:23 +02:00
Adrien Eppling 84b703d7d0 feat(hook): wire Copilot into uninstall, telemetry, and discover 2026-05-25 22:19:58 +02:00
Florian BRUNIAUX e09a53e5f7 Merge pull request #1181 from rtk-ai/rgpd-telemetry 2026-04-13 09:26:46 +02:00
aesoft 7821e9872f fix(telemetry): non-terminal consent, single config load
- P0: non-terminal `rtk init` no longer writes consent_given=false leaves consent as None so next interactive run prompts normally
- P1: maybe_ping() loads Config once instead of twice per command
2026-04-12 15:05:58 +02:00
aesoft aaf4d1d9fe Merge pull request #422 from KuSh/cleanup-warnings
chore: apply clippy suggestions
2026-04-11 12:08:40 +02:00
aesoft 6a5bc847e0 fix(telemetry): RGPD-compliant, consent gate, erasure, privacy controls
+ docs update
2026-04-10 16:04:08 +02:00
Patrick szymkowiak be5c0576d9 fix(docs): update TELEMETRY.md to match code after review fixes
- passthrough_top example: "npm ci:8" -> "npm:8" (first word only)
- estimated_savings_usd_30d: $5/Mtok -> $3/Mtok (input pricing)
- Remove needless borrow in build_meta_usage (clippy)

Signed-off-by: Patrick Szymkowiak <patrick@rtk-ai.app>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
2026-04-08 17:30:24 +02:00
Patrick szymkowiak 15f666dd8d fix(telemetry): 7 bugs in enrichment — privacy leak, broken meta_usage, pricing
P0 fixes:
- top_passthrough: GROUP BY first word only, not full command args (privacy leak)
- build_meta_usage: use dedicated count query instead of scanning deduplicated top list (was always returning 0 or 1)

P1 fixes:
- Single Tracker connection per ping (was opening 2 SQLite connections)
- first_seen_days: propagate DB errors instead of unwrap_or(None)
- ecosystem_mix: bound to 90 days instead of full table scan
- avg_savings_per_command: compute per-command mean, not per-row mean
- estimated_savings_usd_30d: use $3/Mtok (Sonnet input rate) not $5/Mtok

Signed-off-by: Patrick Szymkowiak <patrick@rtk-ai.app>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
2026-04-08 11:10:29 +02:00
Nicolas Le Cam c6f35c9771 fix: apply clippy suggestions
Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
2026-04-04 01:25:16 +02:00
Patrick szymkowiak 450ed107ab feat(telemetry): add retention, ecosystem, economics, and config metrics
Extend the daily anonymous ping with product-piloting metrics:

Retention: first_seen_days, active_days_30d, commands_total
Ecosystem: ecosystem_mix (category distribution percentages)
Economics: tokens_saved_30d, estimated_savings_usd_30d
Config: has_config_toml, exclude_commands_count, projects_count
Features: meta_usage (gain, discover, proxy, verify, learn counts)

Update README.md privacy section with full field-by-field table
explaining what is collected and why it helps improve RTK.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
2026-04-03 13:58:45 +02:00
Patrick szymkowiak d57de86d88 feat(telemetry): enrich daily ping with gap detection and quality metrics
Add 6 new fields to the anonymous daily telemetry ping to help identify
which commands need filters and which filters need improvement:

- passthrough_top: top 5 commands with 0% savings (missing filters)
- parse_failures_24h: count of parse failures (filter fragility)
- low_savings_commands: commands averaging <30% savings (weak filters)
- avg_savings_per_command: unweighted average savings
- hook_type: which AI agent hook is installed (claude/gemini/codex/etc)
- custom_toml_filters: count of user-defined TOML filter files

New tracking.rs queries: top_passthrough(), parse_failures_since(),
low_savings_commands(), avg_savings_per_command().

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
2026-04-03 13:48:18 +02:00
aesoft aabc0167bc fix(cleaning): constant extract 2026-03-30 17:57:57 +02:00
aesoft 8e42120ea3 fix(security): set 0600 permissions on salt file 2026-03-28 10:46:08 +01:00
aesoft 699f68236b fix(telemetry): cache salt in-process 2026-03-27 19:36:41 +01:00
aesoft 60cba0f5d8 fix(security): salt device hash for telemetry 2026-03-27 19:17:00 +01:00
aesoft 46fa31c4b8 chore(refacto-codebase): Folders + Technical docs
- codebase more clear for humans and AI agents
- alignement on vision and filter quality in technical docs
2026-03-24 22:14:35 +01:00