Skip to content

fix(cli): keep feedback consent from persisting registry override#2264

Open
mohebifar wants to merge 1 commit into
mainfrom
codex/fix-feedback-registry-override
Open

fix(cli): keep feedback consent from persisting registry override#2264
mohebifar wants to merge 1 commit into
mainfrom
codex/fix-feedback-registry-override

Conversation

@mohebifar

Copy link
Copy Markdown
Member

📚 Description

Fixes the anonymous feedback consent path so it does not persist CODEMOD_REGISTRY_URL into the user-wide default_registry setting.

  • Uses the production registry URL as the persisted config default instead of the env-sensitive RegistryConfig::default().
  • Loads persisted config without env overrides when saving anonymous feedback consent.
  • Keeps CODEMOD_REGISTRY_URL available as a runtime-only endpoint override for feedback submission.
  • Adds regression tests for both the consent persistence behavior and the runtime feedback endpoint override helper.

🔗 Linked Issue

Fixes CDMD-4787

🧪 Test Plan

  • cargo test -p codemod auth::storage::tests::enable_anonymous_feedback_does_not_persist_registry_env_override -- --exact
  • cargo test -p codemod feedback::tests::env_registry_url_trims_and_ignores_empty_values -- --exact
  • cargo check -p codemod --bin codemod
  • pre-commit hook: oxlint, oxfmt --check

📄 Documentation to Update

No documentation changes needed. This preserves the documented registry behavior while fixing config persistence.

@linear

linear Bot commented Jun 11, 2026

Copy link
Copy Markdown

CDMD-4787

.filter(|value| !value.is_empty())
.map(|value| value.to_string())
.unwrap_or_else(|| RegistryConfig::default().default_registry);
.unwrap_or_else(|| DEFAULT_REGISTRY_URL.to_string());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] CODEMOD_REGISTRY_URL is no longer honored for default registry when config.json is missing

load_config_with_env now falls back to a hardcoded production URL when no config file exists and no explicit env map is passed. TokenStorage::load_config() always calls this with None, and that method is used by non-feedback flows (publish, login, whoami, telemetry init, etc.). As a result, on a fresh setup CODEMOD_REGISTRY_URL no longer changes the default registry for those commands, whereas previously this worked via RegistryConfig::default(). This is a behavioral regression that can break staging/self-hosted workflows (especially publish, which has no --registry flag). The env-insensitive behavior should be scoped to feedback-consent persistence instead of changing the global fallback.

@github-actions

Copy link
Copy Markdown
Contributor

Codex Review

The PR addresses feedback-consent persistence, but it also introduces a broader registry-resolution regression outside the feedback path.

Findings

  • [HIGH] crates/cli/src/auth/storage.rs:110 CODEMOD_REGISTRY_URL is no longer honored for default registry when config.json is missing

@github-actions

Copy link
Copy Markdown
Contributor

TUI Perf Comparison

Focused Perf Regression Tests

Test Result
should_redraw_is_false_for_static_idle_ui_without_changes PASS
draw_counter_counts_only_initial_draw_for_static_idle_screen PASS
draw_counter_counts_one_redraw_for_burst_of_drained_workflow_events PASS
draw_counter_counts_deadline_tick_for_running_screen PASS
reduce_workflow_receiver_requests_snapshot_after_receiver_lag PASS
await_js_ast_grep_execution_task_returns_prompt_completion_without_polling_delay PASS
await_js_ast_grep_execution_task_prefers_completed_result_over_later_idle_signal PASS

Timed Perf Benchmarks

Benchmark Baseline median Candidate median Delta Ratio Result
jssg_wait_completion_latency 9 us 6 us -3 us 0.67x PASS
large_task_list_render_latency 7084 us 7089 us +5 us 1.00x PASS
publish_log_heavy_task_list_render_latency 7746 us 7681 us -65 us 0.99x PASS
log_modal_render_latency 589619 us 604822 us +15203 us 1.03x PASS

Fails only when candidate median is more than 25% slower and exceeds the benchmark-specific absolute floor.

TUI Perf Comparison

  • Baseline dir: perf-results/baseline
  • Candidate dir: perf-results/candidate

Completed

Metric Baseline Candidate Delta
deadline_wakeups 1 1 0
draws 1 1 0

Awaiting Trigger

Metric Baseline Candidate Delta
deadline_wakeups 1 1 0
draws 1 1 0

Active

Metric Baseline Candidate Delta
deadline_wakeups 4 4 0
draws 4 4 0

Awaiting Trigger Resume

Metric Baseline Candidate Delta
deadline_wakeups 1 1 0
draws 1 1 0

Active Busy

Metric Baseline Candidate Delta
deadline_wakeups 4 4 0
draws 4 4 0

Terminal Activity

Metric Baseline Candidate Delta
deadline_wakeups 1 1 0
draws 3 3 0
terminal_events 2 2 0
terminal_key_events 1 1 0
terminal_resize_events 1 1 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant