bug: config-file telemetry opt-out is bypassed on the main thread (Config.get() unavailable before Instance)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli, observability
Research direction
Start with Telemetry.doInit() in packages/opencode/src/altimate/telemetry/index.ts and the Telemetry.init() call in packages/opencode/src/index.ts, then inspect config.ts for the global config merge list and Global.Path.config. Use test/telemetry/telemetry.test.ts as the entry point for coverage; done means a config-file telemetry opt-out is honored both inside and outside an Instance.
Written by the indexing model from the issue text.
Description
Found during the v0.11.1 release review (Chaos Gremlin / privacy persona). Deferred because: needs a design decision on how doInit() should read the user's global config without an Instance.
Problem. Telemetry.doInit() (packages/opencode/src/altimate/telemetry/index.ts) reads telemetry.disabled through Config.get(), which throws outside an Instance context. On failure it proceeds as enabled. The CLI middleware in packages/opencode/src/index.ts calls Telemetry.init() before Instance.provide(), so on the main thread a config-file opt-out ("telemetry": {"disabled": true} in the global altimate-code.json) is not honored for main-thread events (onboarding, first_launch, startup_ready, main-thread event_loop_stall). Only the env-var opt-out (ALTIMATE_TELEMETRY_DISABLED / OPENCODE_DISABLE_TELEMETRY) is reliable there.
v0.11.1 fixed the same bypass on the TUI worker (init moved inside Instance.restore), but the main-thread path is pre-existing and remains.
Also missing: no test anywhere exercises the config-file opt-out; only the env vars are tested (test/telemetry/telemetry.test.ts).
Suggested fix. When Config.get() throws, fall back to reading the global config files under Global.Path.config directly (same list config.ts merges) for the single telemetry.disabled key, and add a test that a config-file opt-out disables telemetry both inside and outside an Instance.
- Dominant language
- TypeScript
- Stars
- 813
- Forks
- 134
- Avg merge
- 2d 8m
- Merged PRs (30d)
- 65
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AltimateAI/altimate-code
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
AltimateAI/altimate-code#1359 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
AltimateAI/altimate-code#1323 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
AltimateAI/altimate-code#1288 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
AltimateAI/altimate-code#1285 ·
Maintainers usually reply within 1 day
-
privacy: Altimate Base consent dialog no longer discloses persistent per-installation identifierOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
AltimateAI/altimate-code#1284 ·
Maintainers usually reply within 1 day
All issues in AltimateAI/altimate-code
Similar issues
-
check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Fission-AI/OpenSpec#1986 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nestjs/docs.nestjs.com#3554 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
publicodes/publicodes#868 ·
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 78/100
EclipseFdn/open-vsx.org#13488 ·
Maintainers usually reply within 2 days