Commit graph

9 commits

Author SHA1 Message Date
DESKTOP-RTLN3BA\$punk
26e8d8f7da fix(release): check the signed opencode before any installer is made
Release CI ran check-stage.mjs on the packaged opencode only after
electron-builder, and on a tag `--publish always` has by then uploaded every
installer and stable*.yml to the draft release, so an opencode that signing
broke reached the draft first. An afterSign hook, scripts/opencode/after-sign.mjs,
now runs the same check once the app is signed, and on macOS notarized, and a
failure stops electron-builder before any target is built. macOS and Windows
call it on every build, signed or not; Linux signs nothing and skips it, so the
post-build CI step stays as its check.
2026-10-07 13:39:38 -07:00
DESKTOP-RTLN3BA\$punk
ba5162f1ce fix(release): keep opencode's own macOS signature
The pinned opencode-darwin-arm64 arrives Developer ID signed by Anomaly
Innovations, with the hardened runtime, a secure timestamp and the five
entitlements Bun asks for. osx-sign force-signed it with the app's inherited
entitlements, which lack disable-executable-page-protection, and the release's
--version smoke barely runs Bun's JIT. mac.signIgnore now leaves opencode's
signature in place; rg arrives only ad-hoc signed and is still signed with the
app.

packaging.md also had Windows wrong: opencode.exe arrives Authenticode-signed
by its vendor and rg.exe unsigned, and a tag's build replaces both with
SurfSense's signature, so a dry run does not run an unsigned opencode.
2026-10-07 13:33:12 -07:00
DESKTOP-RTLN3BA\$punk
64cbff3f68 fix(agent): refuse an opencode switch that is neither 1 nor 0
With opencode on by default, any SURFSENSE_LOCAL_OPENCODE_ENABLED other than
"1" turned it off: "true", "yes", and the empty string an unset CI variable
gives all built an installer without the agent, and stage.mjs blamed "=0" as
it removed the stage. Now unset or empty keeps the default, 1 and 0 decide,
and anything else stops the build. The off message prints the value it read.
2026-10-07 13:31:46 -07:00
DESKTOP-RTLN3BA\$punk
c436f393c5 ci(release): run the opencode each installer packaged
Now that every installer carries the agent, a release that ships without it,
or with an opencode that signing broke, would pass CI. Each runner now runs
check-stage.mjs on the opencode folder its build packaged: both executables and
their licences are there, and opencode and rg report their pinned versions.
On macOS that runs the copy signed under the hardened runtime, and on a tag's
Windows build the copy Azure signed. stage.mjs runs the same check before its
swap.
2026-10-07 13:09:26 -07:00
DESKTOP-RTLN3BA\$punk
799a683296 feat(agent): ship opencode in every installer
Every model may now choose the agent, so every build stages opencode and
ripgrep: ENABLED_BY_DEFAULT is true, and SURFSENSE_LOCAL_OPENCODE_ENABLED=0
leaves them out of one build. The docs that said installers carry no agent now
say they do, and packaging.md records the Windows stage's size (185 MB
unpacked, 44 MB as xz) and that electron-builder signs opencode and rg with the
app's inherited entitlements, whose allow-jit Bun needs.
2026-10-07 13:09:12 -07:00
Devdan Schretlen
bd83e58cbe
Merge branch 'dev' into fix/stage-rename-retry 2026-10-03 18:21:06 -07:00
CREDO23
df22622907 feat(agent): keep opencode off until a model passes the agent test 2026-10-03 07:40:31 +02:00
Devdan Schretlen
ddda56ff79 fix(desktop): retry the staging rename while Windows holds the folder
Each stage script runs its new binary from the stage folder, then renames the folder into place. On Windows another process can still have a file in it open for a moment (on my machine, the DiagTrack service reading opencode.exe), so the rename failed with EPERM every time. The swap now retries that rename on EPERM, EACCES or EBUSY for up to 60 s, the same window graceful-fs uses.
2026-10-02 19:03:29 -07:00
CREDO23
554fe00957 feat(agent): bundle opencode and start it when the API writes its config 2026-10-01 19:46:33 +02:00