[GH-ISSUE #19] M001/S01/T03: Update patch manifest and test fixtures for embedded proxy #20

Open
opened 2026-06-04 14:29:27 -04:00 by yindo · 0 comments
Owner

Originally created by @BillyOutlast on GitHub (May 16, 2026).
Original GitHub issue: https://github.com/Heretek-AI/GDevelop-BYOK/issues/19

T03: Update patch manifest and test fixtures for embedded proxy

The patch manifest (patch/manifest.json) currently has 9 entries (P001-P009). P004 and P009 reference the old Express proxy pattern. They need new finder/replacer/verify patterns for the IPC-based embedded model. The premium-unlock entries (P001-P002, P005-P008) stay unchanged. P003 (ApiConfigs.js) stays unchanged — will be replaced in S03 with a Generation.js patch. (1) Update patch/manifest.json: Add new P004 entry — finder looks for 'contextBridge.exposeInMainWorld("electronAPI", {})', replacer inserts byokAiRequest and byokAiRequestStatus before the electronAPI exposure. Verify pattern confirms byokAiRequest presence. Add new P009 entry — finder matches from 'const { app, BrowserWindow } = require("electron")' through 'app.on("ready", createWindow)', replacer injects 'const { registerByokIpcHandlers } = require("./byok-embedded");' after require and changes ready handler to wire ipcMain. Verify pattern confirms registerByokIpcHandlers. Update restore-fixtures.js comment header to reflect S01 fixture state. (2) Add new fixture file: create test/fixtures/newIDE/electron-app/app/scripts/byok-embedded.js — a minimal module that exports registerByokIpcHandlers so the P009 verify check passes.

Files

  • patch/manifest.json
  • test/fixtures/newIDE/electron-app/app/scripts/main.js
  • test/fixtures/newIDE/electron-app/app/scripts/preload.js
  • test/fixtures/newIDE/electron-app/app/scripts/byok-embedded.js
  • scripts/restore-fixtures.js

Verification

  • node scripts/patch.js --repo test/fixtures --dry-run --strict 2>&1
Originally created by @BillyOutlast on GitHub (May 16, 2026). Original GitHub issue: https://github.com/Heretek-AI/GDevelop-BYOK/issues/19 ## T03: Update patch manifest and test fixtures for embedded proxy The patch manifest (patch/manifest.json) currently has 9 entries (P001-P009). P004 and P009 reference the old Express proxy pattern. They need new finder/replacer/verify patterns for the IPC-based embedded model. The premium-unlock entries (P001-P002, P005-P008) stay unchanged. P003 (ApiConfigs.js) stays unchanged — will be replaced in S03 with a Generation.js patch. (1) Update patch/manifest.json: Add new P004 entry — finder looks for 'contextBridge.exposeInMainWorld("electronAPI", {})', replacer inserts byokAiRequest and byokAiRequestStatus before the electronAPI exposure. Verify pattern confirms byokAiRequest presence. Add new P009 entry — finder matches from 'const { app, BrowserWindow } = require("electron")' through 'app.on("ready", createWindow)', replacer injects 'const { registerByokIpcHandlers } = require("./byok-embedded");' after require and changes ready handler to wire ipcMain. Verify pattern confirms registerByokIpcHandlers. Update restore-fixtures.js comment header to reflect S01 fixture state. (2) Add new fixture file: create test/fixtures/newIDE/electron-app/app/scripts/byok-embedded.js — a minimal module that exports registerByokIpcHandlers so the P009 verify check passes. ### Files - `patch/manifest.json` - `test/fixtures/newIDE/electron-app/app/scripts/main.js` - `test/fixtures/newIDE/electron-app/app/scripts/preload.js` - `test/fixtures/newIDE/electron-app/app/scripts/byok-embedded.js` - `scripts/restore-fixtures.js` ### Verification - [ ] node scripts/patch.js --repo test/fixtures --dry-run --strict 2>&1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Heretek-AI/GDevelop-BYOK#20