Skip to content

LOCAL: post a Slack note when a fork build publishes or fails - #48

Merged
kiwidream merged 1 commit into
swaplabs/mainfrom
fork-ci/build-slack-note
Oct 22, 2026
Merged

kiwidream merged 1 commit into
swaplabs/mainfrom
fork-ci/build-slack-note

Conversation

@kiwidream

@kiwidream kiwidream commented Oct 22, 2026 •

Copy link
Copy Markdown
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​75 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​70
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​55 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​55

ELI5

Slack now hears from each fork build. When a SwapLabs Fork Build publishes its release, or fails to, it tells SwapLabsInc/SwapLabs, which posts one line to the Orca sync channel.

What Changed

A new notify-build job in .github/workflows/swaplabs-build.yml sends an orca-fork-build repository dispatch to SwapLabsInc/SwapLabs. The payload carries:

  • the outcome: published, failed or cancelled;
  • the commit preflight built (head_sha, falling back to github.sha when preflight itself failed);
  • the run id;
  • the release tag, when published.

The job runs after publish (needs: [preflight, draft, build-linux, publish], with always()). So the published note goes out as soon as the release is live, without waiting for the best-effort macOS leg. It runs only for a build that started (should_build == 'true', or a failed preflight), so a no-op run posts nothing.

Like notify-devvms, it reuses SWAPLABS_DEVVMS_DISPATCH_TOKEN, holds no GITHUB_TOKEN permission, and never fails the build. A missing token is a notice and a failed dispatch is a warning. The contract tests that allowed only notify-devvms to read that secret or to call another repository now allow notify-build too. docs/reference/swaplabs-fork-builds.md documents the job.

Why

The operator wants a Slack note when a fork build is published, not just when a sync merges. SwapLabsInc/SwapLabs#223 adds the receiving side:

  • its note workflow accepts orca-fork-build, validates the payload, and posts once per outcome and run;
  • the sync's merged note now links the build run that is in progress.

The existing orca-fork-release dispatch only fires on success and carries only the tag, so it could not report a failed build.

Linked Issue

N/A: requested by the operator during the 22 October upstream sync (#47).

Visual Proof

N/A: CI workflow only.

Testing

  • swaplabs-build-workflow*.test.mjs: 4 files, 65 tests pass, including the new swaplabs-build-workflow-build-note.test.mjs. It covers the published, failed and cancelled payloads, a missing token, and a failed dispatch.
  • oxfmt --check and oxlint are clean on the changed files.
  • check-changed-code-quality.mjs since 66ee345e87: 0 findings.
  • Not yet exercised against GitHub. The first build after this merges, with SwapLabs#223 merged, is the end-to-end test.

AI Disclosure

Prepared by Claude Code (Claude Opus 5.5) at the operator's request.

Agent skill upstream boundary

  • Not applicable: fork CI only; no agent skill.

Notes

Cross-repo order does not matter. Before SwapLabs#223 merges, nothing listens for orca-fork-build, so the dispatch is a no-op. Before this PR merges, that workflow simply receives none.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

A new notify-build job dispatches orca-fork-build to SwapLabsInc/SwapLabs
as soon as the release goes live, or once the run cannot publish, with the
outcome, commit, run id and (when published) tag. That repository's Orca
sync note workflow posts it to Slack. It does not wait for the best-effort
macOS leg, and like notify-devvms it reuses SWAPLABS_DEVVMS_DISPATCH_TOKEN
and never fails the build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T18:17:18.449793Z 92266c9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kiwidream
kiwidream merged commit cfe8685 into swaplabs/main Oct 22, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant