fix(#10): use robust regex for extension detectAndUseProxy patch

This commit is contained in:
Nikketryhard
2026-02-14 15:49:05 -06:00
parent 9f5d6e15cc
commit b89d26cc68
3 changed files with 6 additions and 6 deletions

View File

@@ -150,13 +150,13 @@ When running a standalone LS instance (outside of Antigravity), cascades start b
## Medium
### 10. Extension Patch Fragility
### ~~10. Extension Patch Fragility~~ ✅ FIXED
**File:** `scripts/mitm-wrapper.sh`, GEMINI.md
**File:** GEMINI.md, `docs/mitm-interception-status.md`
The `sed` patch that sets `detectAndUseProxy=1` in `extension.js` must be **re-applied after every Antigravity update**. The search pattern (`detectAndUseProxy=pe.UNSPECIFIED`) is brittle — if the minified variable name changes from `pe` to something else, the patch silently fails.
~~The `sed` patch that sets `detectAndUseProxy=1` in `extension.js` must be **re-applied after every Antigravity update**. The search pattern (`detectAndUseProxy=pe.UNSPECIFIED`) is brittle — if the minified variable name changes from `pe` to something else, the patch silently fails.~~
**Fix:** Use a regex-based patch (`detectAndUseProxy=[^;]*``detectAndUseProxy=1`) or patch via AST manipulation. Add a post-update hook or version check to warn when the patch is stale.
**Fixed:** Updated sed to use extended regex `s/detectAndUseProxy=[^,;)]+/detectAndUseProxy=1/g` which matches any value assignment regardless of minified variable names. Still requires re-applying after updates, but the pattern is now resilient to bundler name changes.
---