1jehuang / 1jehuang/jcode

Global telemetry opt-out does not suppress sponsor usage metering

Open
#1,114 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

autonomous: no bug priority: high triage: needs-decision
Dominant language
Rust
Stars
19.9k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
30

Description

Summary

Jcode's global telemetry opt-outs do not suppress sponsored-discovery usage metering. With sponsors enabled, sponsored MCP/tool provenance can still send connect, call, and error reports even when JCODE_NO_TELEMETRY, DO_NOT_TRACK, or the no-telemetry marker disables ordinary telemetry.

Why this matters

From an operator privacy boundary, both paths are product-originated usage reporting. A global telemetry/privacy opt-out should either cover all such egress or the sponsor channel should require separate, explicit consent with clear UI and documentation.

Today the two controls can produce a surprising state: ordinary telemetry reports disabled while sponsored usage reports remain enabled.

Source trace

Audited at 008abc44b1653efa65ccf98acb3b7236ce8507e6:

  • Ordinary telemetry's is_enabled honors the environment and marker-file opt-outs.
  • Sponsored provenance/reporting checks sponsors.enabled independently.
  • The sponsor path emits session/day/connect/call/error usage reports in provenance.rs.

Reproduction shape

  1. Leave sponsored discovery enabled.
  2. Set JCODE_NO_TELEMETRY=1, DO_NOT_TRACK=1, or create the no-telemetry marker.
  3. Use a discovery-tagged sponsored MCP/tool.
  4. Observe that the sponsor reporting path remains eligible to send usage events because it does not consult the telemetry/privacy opt-out.

Expected behavior

One of these contracts should be explicit and enforced:

  1. Global privacy opt-out suppresses ordinary telemetry and sponsored usage metering, or
  2. Sponsored metering is a separately consented feature that is off until the operator explicitly enables it.

In either case, status/doctor output should show every outbound usage-reporting channel and its effective state.

Suggested regression

Add a no-network unit test around the sponsor reporter that enables sponsors, activates each global opt-out mechanism, triggers a sponsored call, and asserts that no report is queued or sent.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in crates/jcode-telemetry-core/src/lib.rs, where is_enabled handles environment and marker-file opt-outs, then compare it with the sponsors.enabled and reporting logic in crates/jcode-base/src/sponsors/provenance.rs. Add a no-network regression test covering each global opt-out during a sponsored call. Done means the chosen consent contract is enforced and status/doctor output reflects every outbound usage-reporting channel.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.