Skip to content

fix: sign macOS builds and harden team runtime - #171

Merged
terisuke merged 1 commit into
temp-upstream-devfrom
codex/upstream-guardrail-runtime-fixes
Apr 19, 2026
Merged

fix: sign macOS builds and harden team runtime#171
terisuke merged 1 commit into
temp-upstream-devfrom
codex/upstream-guardrail-runtime-fixes

Conversation

@terisuke

Copy link
Copy Markdown

Summary

  • sign compiled darwin binaries with Bun's recommended macOS entitlements before smoke testing
  • sanitize preview channels and version strings derived from branch names
  • make team/background use the session directory for state when no git worktree is available
  • detach background workers from the parent turn abort signal and cover the regressions in team plugin tests

Verification

  • bun run build
  • bun run typecheck
  • bun test test/plugin/team.test.ts
  • bun test test/agent/agent.test.ts
  • bun test test/plugin/trigger.test.ts
  • bun test test/session/prompt-effect.test.ts
  • bun test test/session/processor-effect.test.ts
  • bun test test/session/snapshot-tool-race.test.ts
  • installed binary checks via opencode run/serve with real team/background workflows

CopilotAI review requested due to automatic review settings April 19, 2026 10:21
@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown

New PR opened -- automated review will run on the next push.

To trigger a manual review, comment /review on this PR.

@terisuke
terisuke merged commit 9a757d6 into temp-upstream-devApr 19, 2026
10 of 15 checks passed
@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown

The following comment was made by an LLM, it may be inaccurate:

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves release/build hygiene and guardrails runtime robustness by (1) signing macOS CLI binaries before smoke tests, (2) sanitizing channel strings derived from env/branch names, and (3) hardening the team/background tools to behave better when no git worktree is available, with regression tests.

Changes:

  • Add channel sanitization for OPENCODE_CHANNEL and git branch --show-current.
  • Sign darwin binaries during the build pipeline using Bun-recommended macOS entitlements.
  • Update team plugin state storage/root selection and detach background workers from the parent abort signal; add new tests covering the regressions.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

FileDescription
packages/script/src/index.tsSanitizes preview channel values used to derive preview versions.
packages/opencode/script/build.tsAdds macOS codesigning step (entitlements + ad-hoc signing) before smoke tests.
packages/guardrails/profile/plugins/team.tsUses a project root fallback when worktree is unavailable; detaches background abort; gates worktree isolation.
packages/opencode/test/plugin/team.test.tsAdds regression tests for non-git state root and detached background abort behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +30 to +32
.replace(/[^a-z0-9._-]+/g, "-")
.replace(/-+/g, "-")
.replace(/^[-.]+|[-.]+$/g, "")
Comment on lines 1119 to 1121
write: write(item.prompt, item.write),
worktree: item.worktree !== false,
worktree: canIsolate && item.worktree !== false,
provider: pick.provider,
Comment on lines +408 to +411
function projectRoot(directory: string, worktree: string) {
return worktree && worktree !== "/" ? worktree : directory
}

@terisuke
terisuke deleted the codex/upstream-guardrail-runtime-fixes branch April 25, 2026 16:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@terisuke