Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

test: verify update interaction and distribution prerequisites

Rach Pradhane52160633499
diff --git a/README.md b/README.md
index de3b6631..624d59aa 100644
--- a/README.md
+++ b/README.md
@@ -139,7 +139,7 @@ next step supplied with useful information while reducing repeated input.
**Desktop (Apple Silicon, macOS 14+).**
[Download CodeGraff v0.0.291](https://github.com/justrach/codegraff/releases/download/v0.0.291/Codegraff-macos-arm64.dmg),
-open the disk image, and drag **Codegraff.app** onto **Applications**. Eject the disk image and open Codegraff from Applications.
+quit any running Codegraff copies, open the disk image, and drag **Codegraff.app** onto **Applications**. Eject the disk image and open Codegraff from Applications.
The notarized bundle includes Graff, Chromium, Bun and the native macOS components;
you do not need a separate CLI, runtime, developer tools or local server.
[Verify the download checksum](https://github.com/justrach/codegraff/releases/download/v0.0.291/Codegraff-DMG-SHA256SUMS).
diff --git a/apps/native/electron/publish-updates.sh b/apps/native/electron/publish-updates.sh
index 6631e828..31ac0ee1 100644
--- a/apps/native/electron/publish-updates.sh
+++ b/apps/native/electron/publish-updates.sh
@@ -4,6 +4,12 @@ set -euo pipefail
tag="${1:?Usage: publish-updates.sh vVERSION distribution-directory}"
out="${2:?Provide the notarized distribution directory}"
repo=justrach/codegraff
+codesign --verify --deep --strict "$out/Codegraff.app"
+xcrun stapler validate "$out/Codegraff.app"
+xcrun stapler validate "$out/Codegraff-macos-arm64.dmg"
+spctl --assess --type execute "$out/Codegraff.app"
+spctl --assess --type open --context context:primary-signature "$out/Codegraff-macos-arm64.dmg"
+(cd "$out" && shasum -a 256 -c Codegraff-DMG-SHA256SUMS)
[[ "$(gh release view "$tag" --repo "$repo" --json isDraft --jq .isDraft)" == true ]] || {
echo 'Desktop assets must be uploaded together to a draft release.' >&2; exit 1;
}
diff --git a/apps/native/electron/updates-visual.cjs b/apps/native/electron/updates-visual.cjs
index eb4011d7..64c80874 100644
--- a/apps/native/electron/updates-visual.cjs
+++ b/apps/native/electron/updates-visual.cjs
@@ -5,6 +5,7 @@ async function runUpdateVisuals({ origin, output }) {
const wc = win.webContents, js = source => wc.executeJavaScript(source);
const wait = async source => { for (let i = 0; i < 100; i++) { if (await js(source)) return; await new Promise(r => setTimeout(r, 30)); } throw Error(source); };
try {
+ await wc.loadURL('about:blank');
wc.debugger.attach('1.3');
await wc.debugger.sendCommand('Page.enable');
await wc.debugger.sendCommand('Page.addScriptToEvaluateOnNewDocument', { source: `
@@ -28,8 +29,16 @@ async function runUpdateVisuals({ origin, output }) {
await js(`window.__update({status:'ready',version:'1.0.1'})`);
await wait(`document.querySelector('[data-desktop-update]')?.textContent.includes('Restart to update')`);
assert.equal(await js('window.__restarts'), 0);
+ await js('new Promise(resolve=>requestAnimationFrame(()=>requestAnimationFrame(resolve)))');
+ await new Promise(resolve => setTimeout(resolve, 100));
+ const target = await js(`(()=>{
+ const b=Array.from(document.querySelectorAll('[data-desktop-update] button')).find(b=>b.textContent==='Restart to update'),r=b.getBoundingClientRect();
+ const x=r.x+r.width/2,y=r.y+r.height/2;return {x,y,visible:x>0&&y>0&&x<innerWidth&&y<innerHeight&&b.contains(document.elementFromPoint(x,y))};
+ })()`);
+ assert.equal(target.visible, true, 'restart action is visible and receives pointer input');
fs.writeFileSync(path.join(output, 'update-ready.png'), (await wc.capturePage(undefined, { stayAwake: true })).toPNG());
- await js(`Array.from(document.querySelectorAll('[data-desktop-update] button')).find(b=>b.textContent==='Restart to update').click()`);
+ wc.sendInputEvent({ type: 'mouseDown', x: Math.round(target.x), y: Math.round(target.y), button: 'left', clickCount: 1 });
+ wc.sendInputEvent({ type: 'mouseUp', x: Math.round(target.x), y: Math.round(target.y), button: 'left', clickCount: 1 });
await wait(`window.__restarts===1`);
await wait(`document.querySelector('[data-desktop-update]')?.textContent.includes('Preparing to restart')`);
console.log('Update UI passed: quiet checks/errors, download progress, explicit restart only.');