Skip to content

fix(cli): push oauth server enabled and path together (CLI-2691) - #7367

Merged
7ttp merged 2 commits into
developfrom
7ttp/cli-2691-config-push-changing-authoauth_serverauthorization_url_path
Oct 28, 2026
Merged

7ttp merged 2 commits into
developfrom
7ttp/cli-2691-config-push-changing-authoauth_serverauthorization_url_path

Conversation

@7ttp

@7ttp 7ttp commented Oct 28, 2026

Copy link
Copy Markdown
Member

TL;DR

fixes config push failing when the oauth server path changes or the server is turned on or off

whats improved/fixed?

the api only accepts oauth_server_enabled and oauth_server_authorization_path together, but config push sent just the changed one

how?

send the missing one too, using the linked project's current value (so enabling keeps a stored custom path), else the config value or default

ref:

@7ttp 7ttp self-assigned this Oct 28, 2026
@7ttp
7ttp requested a review from a team as a code owner October 28, 2026 11:40

@github-actions github-actions Bot left a comment

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.

🤖 AI Review

Both independent reviews were available. Claude's sole finding is refuted: schema validation, required defaults, and API normalization prevent the claimed invalid OAuth companion values from reaching this branch. No additional defects were found. Verification was by code inspection; tests were not run.

Findings

No issues found.

Refuted findings (kept for transparency, not posted as review comments)
  • apps/cli/src/commands/config/push/push.encoders.ts:1407 (error-handling): The OAuth companion fallback skips validation and can send undefined or wrongly typed values, or resend a companion already reported as unencodable.
    Refuted: The claimed inputs cannot arise through config push. packages/config/src/auth/index.ts:180-199 requires a boolean enabled value and string authorization_url_path, with decoding defaults for both fields and their container. Config loading validates the document (packages/config/src/io.ts:455-473), and push.handler.ts:243,615-623 passes that decoded config as the final fallback, so missing projected values still resolve to defined, correctly typed values. Remote OAuth values are narrowed by boolRow/stringRow (registry-auth.ts:392-412,769-775) before encoding; null values are omitted. Routed changes come from the validated local projection (config-diff.ts:358-452), and push.plan.ts:138-147 excludes remote_only changes. Thus neither an invalid routed OAuth change nor an undefined final companion reaches this branch.

Stats

Claude findings: 1 · Codex findings: 0 · Confirmed: 0 · Refuted: 1 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

@Coly010 Coly010 left a comment

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.

LGTM, thanks! one optional nit: resolveStorageFeatureLeaf is shared with the oauth pair now, so a neutral name (resolvePrunedLeaf?) might read better than listing its callers in the doc comment. totally fine to leave as is

@7ttp
7ttp enabled auto-merge October 28, 2026 12:50
@7ttp
7ttp added this pull request to the merge queue Oct 28, 2026
Merged via the queue into develop with commit 0e2e126 Oct 28, 2026
39 checks passed
@7ttp
7ttp deleted the 7ttp/cli-2691-config-push-changing-authoauth_serverauthorization_url_path branch October 28, 2026 12:56
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.

config push: changing auth.oauth_server.authorization_url_path fails with 400 (enabled and path must be sent together)

2 participants