Skip to content

refactor(config): fold duplicate flag spellings into single parse paths - #1438

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-10672-config-sprawl-cut-dead-options-merge-duplicate
Oct 15, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-10672-config-sprawl-cut-dead-options-merge-duplicate

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Folds duplicate operator knobs into single internal embodiments, keeping every operator-visible spelling as an alias: exec/run/-p resolve through one state mechanism (-p folds into the exec pre-scan); resume/continue/--pick/--list collapse into one picker flow with deliberate flow-scoped "unrecognized flag" errors preserved elsewhere; yolo spellings go through one SKIP_PERMISSIONS_FLAGS alias set; telemetry kill-switches collapse to one env name (DO_NOT_TRACK canonical, legacy CORBITS_TELEMETRY alias) + one setting, and OTEL gain the wholesale env-wins rule including its documented set-but-empty edge (a value of "" replaces configured resource attributes with nothing, consistent with the existing empty-headers rule — documented + test-pinned).
  • OAuth provider/model selection collapses its three helpers into one ordered chain at loadConfig; ordering tests pin defaults-before-sweep-before-overlay verbatim.
  • Recorded fold-or-keep decisions where the plan asked: the timeout "triple" turns out three semantically distinct knobs (kept; the run.ts special-case already consumed the shared watchdog projection); topP is documented deprecated-but-honored beside temperature; the always-overridden defaults turned out to be live fallbacks/single definitions and remain.
  • docs/IMPLEMENTATION.md (precedence, sampling, auto) + docs/PERFTRACE.md (OTEL wholesale, set-but-empty) carry operator-facing updates.

Verification

  • bun run check exit 0: 8973 pass / 0 fail (reproduced 3×; one non-deterministic unrelated flake during a rerun did not recur and was not captured — noted in review notes).
  • Scoped: src/config.test.ts 155 pass / 0 fail; oauth-catalog chain-ordering tests; otel-config wholesale + empty-env tests.
  • Independent config review: 4/4 alias byte-parity checks pass via live harness; skip-permissions provenance merge untouched; OAuth chain ordering preserved statically; OTEL empty-env edge quantified and documented.

Fixes CL-10672

The exec/run/-p trio, the resume family, the yolo spellings, and the
telemetry kill-switches each carried parallel handling for one operator
knob apiece; internal alias maps now own the surface (--pick/--list
stay flow-specific errors everywhere else). OAuth provider/model
selection collapses three projection helpers into one ordered chain at
loadConfig; OTEL environment overrides now win wholesale over settings
resource attributes — including a set-but-empty value, which races
nothing in from settings (documented in PERFTRACE). topP is documented
deprecated-but-honored next to temperature. The always-overridden
defaults turned out to be live fallbacks or single definitions and
stay, recorded. Implementation documents the settings precedence;
perfectrace documents the OTEL rule.
@linear-code

linear-code Bot commented Oct 14, 2026

Copy link
Copy Markdown

CL-10672

@corbits-triage

corbits-triage Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by the comment below.

@corbits-triage

corbits-triage Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by the comment below.

@corbits-triage

corbits-triage Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Triage: Pass

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

@TheGreatAxios
TheGreatAxios changed the base branch from cl-10671-dead-code-no-op-flag-shim-unread-settings-stub-dead to main October 15, 2026 21:38
Inline applyOAuthProviderProjections back into loadConfig and remove comments that only restate alias spellings. Flag parse results are unchanged.
@TheGreatAxios
TheGreatAxios merged commit 842e787 into main Oct 15, 2026
13 checks passed
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