From 228545af78c7de2db16edb685df932de61567e13 Mon Sep 17 00:00:00 2001 From: Nigel Coleman Date: Sun, 15 Mar 2026 14:55:49 +0000 Subject: [PATCH 1/3] fix(ci,registry): harden panic checker and remove manifest unwrap --- .github/workflows/code_style.yml | 2 ++ src/registry/manifest.rs | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index f89161d928..cb6a59f9f2 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -89,6 +89,8 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.12" + - name: Validate panic checker parser logic + run: python3 scripts/check_no_panics.py --self-test - name: Check for .unwrap(), .expect(), assert!() in production code run: | BASE="${{ github.event.pull_request.base.sha }}" diff --git a/src/registry/manifest.rs b/src/registry/manifest.rs index e70f1f3129..776400c3e5 100644 --- a/src/registry/manifest.rs +++ b/src/registry/manifest.rs @@ -193,11 +193,12 @@ impl ExtensionManifest { Some("dcr") | None => AuthHint::Dcr, Some("none") => AuthHint::None, Some(other) if other.starts_with("oauth_pre_configured:") => { + let setup_url = other + .strip_prefix("oauth_pre_configured:") + .unwrap_or_default() + .to_string(); AuthHint::OAuthPreConfigured { - setup_url: other - .strip_prefix("oauth_pre_configured:") - .unwrap_or("") - .to_string(), + setup_url, } } _ => AuthHint::Dcr, From f2a59122a2de31544e3d68fca9a6f99fcaa48e00 Mon Sep 17 00:00:00 2001 From: Nige Date: Sun, 15 Mar 2026 15:03:23 +0000 Subject: [PATCH 2/3] Update src/registry/manifest.rs Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- src/registry/manifest.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registry/manifest.rs b/src/registry/manifest.rs index 776400c3e5..19bd1fc531 100644 --- a/src/registry/manifest.rs +++ b/src/registry/manifest.rs @@ -195,7 +195,7 @@ impl ExtensionManifest { Some(other) if other.starts_with("oauth_pre_configured:") => { let setup_url = other .strip_prefix("oauth_pre_configured:") - .unwrap_or_default() + .unwrap_or("") .to_string(); AuthHint::OAuthPreConfigured { setup_url, From 7ee46e1add3b1fa9aca9bfc0e3e6bb187178d797 Mon Sep 17 00:00:00 2001 From: Nigel Coleman Date: Sun, 15 Mar 2026 15:06:26 +0000 Subject: [PATCH 3/3] style(registry): apply rustfmt in manifest auth hint --- src/registry/manifest.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/registry/manifest.rs b/src/registry/manifest.rs index 19bd1fc531..5933f0c01f 100644 --- a/src/registry/manifest.rs +++ b/src/registry/manifest.rs @@ -197,9 +197,7 @@ impl ExtensionManifest { .strip_prefix("oauth_pre_configured:") .unwrap_or("") .to_string(); - AuthHint::OAuthPreConfigured { - setup_url, - } + AuthHint::OAuthPreConfigured { setup_url } } _ => AuthHint::Dcr, };