Skip to content

refactor(config): drop dead guards and duplicate profile expression - #1399

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-10513-config-telemetry-dead-guards
Oct 12, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-10513-config-telemetry-dead-guards

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Drop the dead ?? "orchestrator" fallback in exec session-mode resolution — resolveSessionMode always returns "orchestrator".
  • Collapse the CLI version string to the typed JSON import — pkg.version is statically a string.
  • Compute the named-profile resolution once and reuse it instead of repeating the same expression.

Verification

  • bun test ./src/telemetry/toggle.test.ts ./src/profiles.test.ts ./src/config.test.ts ./src/exec/runner.test.ts — 224 pass, 0 fail
  • bun run typecheck — pass
  • oxlint/oxfmt on changed files — clean

Item 1 of CL-10513 (duplicate if (generation !== intentGeneration) return; in src/telemetry/toggle.ts) was verified not inert and is intentionally not changed: the second guard sits after await deps.saveGlobalSettings(...), and a re-entrant toggle during that await bumps intentGeneration synchronously (line 61), so the guard is reachable and prevents a stale queued job from re-publishing a superseded singleton after an opt-out.

Fixes CL-10513

@linear-code

linear-code Bot commented Oct 12, 2026

Copy link
Copy Markdown

CL-10513

@corbits-triage

Copy link
Copy Markdown
Contributor

No changes needed from you. A maintainer will review this pull request.

@TheGreatAxios
TheGreatAxios merged commit 60cf8c1 into main Oct 12, 2026
13 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-10513-config-telemetry-dead-guards branch October 12, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant