Skip to content

feat(ci): build binary from overlay, retire fork workflows (#1096) - #1111

Merged
jeonghun-jj-lee merged 1 commit into
jj/1091-absorb-opencode-forkfrom
jj/1096-ci-cutover
Sep 14, 2026
Merged

jeonghun-jj-lee merged 1 commit into
jj/1091-absorb-opencode-forkfrom
jj/1096-ci-cutover

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Summary

Replaces fork-download binary provisioning with overlay-build in CI. Phase 3 of the fork-absorption campaign (#1091). This is the cutover slice — the point where CI no longer touches the fork.

What changed

Area Before After
Binary source Downloaded from harmoniqs/opencode release Built from materialized overlay tree
CI architecture Each job downloads independently Single build-binary job → upload-artifact → consumers download-artifact
Provenance lock.repo + lock.tag + lock.ref vs fork lock.version vs .buildinfo + upstream_base_sha vs materialized base
Channel assertion Grep minified code Read .buildinfo sidecar
Cross-compilation Fork CI built all platforms build_binary.mjs --platform flag, single runner + OPENCODE_BUILD_TARGETS

Files changed (net -75 lines)

  • .github/workflows/ci.yml — build-binary job; all consumers gain needs: [build-binary]
  • .github/workflows/release.yml — overlay-build, no fork download
  • .github/workflows/prepare-release-candidate.yml — deleted (fork-centric)
  • .github/workflows/overlay-promotion-bot.yml — deleted (overlay committed directly)
  • packages/extension/scripts/build_binary.mjs — --platform flag for cross-compilation + .buildinfo sidecar
  • packages/extension/scripts/assert_ui_gate.sh — reads .buildinfo with pre-S4 fallback
  • packages/extension/test/release_workflow.test.ts — asserts the new overlay-build world

HITL gates (deferred)

  • Alpha release: Must validate through the full pipeline before secrets are removed
  • Secret removal: OPENCODE_FETCH_TOKEN and REPO_ACCESS_TOKEN — manual step AFTER alpha validates; secret deletion is non-revertable

Rollback

Code changes revert in one PR. The fork is still alive (not archived until S7). Secrets are untouched.

Closes #1096. Answers #843. Part of #1091.

@jeonghun-jj-lee jeonghun-jj-lee added the hitl Needs human review before merge label Sep 13, 2026
@coderabbitai

coderabbitai Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 5671eee0-8197-4366-9129-b1e2c02cf27d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jeonghun-jj-lee
jeonghun-jj-lee force-pushed the jj/1096-ci-cutover branch 3 times, most recently from 550a01b to 6c592cc Compare September 13, 2026 23:48
Replace fork-download binary provisioning with overlay-build in CI:
- Add build-binary job; consumers use needs + download-artifact
- release.yml builds from overlay, not fork release
- Delete prepare-release-candidate.yml and overlay-promotion-bot.yml
- Add .buildinfo sidecar for channel assertion
- Update package script to use build:binary
- build_binary.mjs gains --platform flag for cross-compilation
- assert_ui_gate.sh reads .buildinfo for channel verification
- app-bundle-gate verifies provenance via lock.version + upstream_base_sha

Secret removal (OPENCODE_FETCH_TOKEN, REPO_ACCESS_TOKEN) is deferred
to after alpha validation — a separate manual step.

Part of fork-absorption campaign #1091. Answers #843.
@jeonghun-jj-lee
jeonghun-jj-lee marked this pull request as ready for review September 14, 2026 00:00
@jeonghun-jj-lee
jeonghun-jj-lee merged commit 43a5c88 into jj/1091-absorb-opencode-fork Sep 14, 2026
10 of 11 checks passed
jeonghun-jj-lee pushed a commit that referenced this pull request Sep 16, 2026
The fork-absorption (#1114) moved the opencode engine into the overlay but
left it with NO CI test/typecheck coverage: packages/app-bundle/overlay/
packages/opencode is not a pnpm workspace member (pnpm-workspace.yaml globs
packages/* non-recursively), so the `fast` job's `pnpm -r run typecheck` skips
it. The fork ran `bun turbo typecheck`/`bun turbo test`; the cutover (S4 #1111)
never ported them. Engine type regressions have merged unseen.

This restores the engine typecheck as a standalone `engine-tests` CI job
(materialize the full tree -> bun install -> opencode typecheck), the fork's
typecheck.yml scoped to the engine.

Green-up (pre-existing errors on dev the gate caught):
- src/session/lineage.ts: `.filter((id): id is string ...)` must narrow to
  `id is SessionID` (the branded column type); 4 cascading errors cleared.
- test/session/prompt.test.ts: MCP mock omitted `remove`, now required by the
  overlaid MCP.Interface — add `remove: () => Effect.void`.
- test/provider/transform.test.ts: cast content elements `as any` before reading
  `.type` (matches this file's own convention at :3138) — the Part-union widening
  from a recent dev merge left these two assertions behind.

Three remaining typecheck errors are a base-pin drift (manifest
upstream_base_sha=7fe9938 predates the base the overlay was authored against):
allowlisted in the gate script by file+rule, tracked in #1229. New errors
outside the allowlist fail CI (verified: injected error reds; allowlisted-only
passes). The gate is fail-closed (reds if tsgo did not execute).

Also: `pnpm test:engine` local entrypoint + AGENTS.md verification-gates row.
manifest.json refreshed for the overlay edits (drift_gate PASS).

Deferred, tracked:
- #1229 base-pin bump -> unlocks full-monorepo typecheck (ui/app also drift).
- #1233 engine unit-TEST lane (bun turbo test + test:httpapi) -> blocked on real
  amicode test fixes (amicode-connections.test.ts failures + hook-timeout slowness).

Refs #1228
jeonghun-jj-lee pushed a commit that referenced this pull request Sep 16, 2026
The fork-absorption (#1114) moved the opencode engine into the overlay but
left it with NO CI test/typecheck coverage: packages/app-bundle/overlay/
packages/opencode is not a pnpm workspace member (pnpm-workspace.yaml globs
packages/* non-recursively), so the `fast` job's `pnpm -r run typecheck` skips
it. The fork ran `bun turbo typecheck`/`bun turbo test`; the cutover (S4 #1111)
never ported them. Engine type regressions have merged unseen.

This restores the engine typecheck as a standalone `engine-tests` CI job
(materialize the full tree -> bun install -> opencode typecheck), the fork's
typecheck.yml scoped to the engine.

Green-up (pre-existing errors on dev the gate caught):
- src/session/lineage.ts: `.filter((id): id is string ...)` must narrow to
  `id is SessionID` (the branded column type); 4 cascading errors cleared.
- test/session/prompt.test.ts: MCP mock omitted `remove`, now required by the
  overlaid MCP.Interface — add `remove: () => Effect.void`.
- test/provider/transform.test.ts: cast content elements `as any` before reading
  `.type` (matches this file's own convention at :3138) — the Part-union widening
  from a recent dev merge left these two assertions behind.

Three remaining typecheck errors are a base-pin drift (manifest
upstream_base_sha=7fe9938 predates the base the overlay was authored against):
allowlisted in the gate script by file+rule, tracked in #1229. New errors
outside the allowlist fail CI (verified: injected error reds; allowlisted-only
passes). The gate is fail-closed (reds if tsgo did not execute).

Also: `pnpm test:engine` local entrypoint + AGENTS.md verification-gates row.
manifest.json refreshed for the overlay edits (drift_gate PASS).

Deferred, tracked:
- #1229 base-pin bump -> unlocks full-monorepo typecheck (ui/app also drift).
- #1233 engine unit-TEST lane (bun turbo test + test:httpapi) -> blocked on real
  amicode test fixes (amicode-connections.test.ts failures + hook-timeout slowness).

Refs #1228
jeonghun-jj-lee pushed a commit that referenced this pull request Sep 16, 2026
The fork-absorption (#1114) moved the opencode engine into the overlay but
left it with NO CI test/typecheck coverage: packages/app-bundle/overlay/
packages/opencode is not a pnpm workspace member (pnpm-workspace.yaml globs
packages/* non-recursively), so the `fast` job's `pnpm -r run typecheck` skips
it. The fork ran `bun turbo typecheck`/`bun turbo test`; the cutover (S4 #1111)
never ported them. Engine type regressions have merged unseen.

This restores the engine typecheck as a standalone `engine-tests` CI job
(materialize the full tree -> bun install -> opencode typecheck), the fork's
typecheck.yml scoped to the engine.

Green-up (pre-existing errors on dev the gate caught):
- src/session/lineage.ts: `.filter((id): id is string ...)` must narrow to
  `id is SessionID` (the branded column type); 4 cascading errors cleared.
- test/session/prompt.test.ts: MCP mock omitted `remove`, now required by the
  overlaid MCP.Interface — add `remove: () => Effect.void`.
- test/provider/transform.test.ts: cast content elements `as any` before reading
  `.type` (matches this file's own convention at :3138) — the Part-union widening
  from a recent dev merge left these two assertions behind.

Three remaining typecheck errors are a base-pin drift (manifest
upstream_base_sha=7fe9938 predates the base the overlay was authored against):
allowlisted in the gate script by file+rule, tracked in #1229. New errors
outside the allowlist fail CI (verified: injected error reds; allowlisted-only
passes). The gate is fail-closed (reds if tsgo did not execute).

Also: `pnpm test:engine` local entrypoint + AGENTS.md verification-gates row.
manifest.json refreshed for the overlay edits (drift_gate PASS).

Deferred, tracked:
- #1229 base-pin bump -> unlocks full-monorepo typecheck (ui/app also drift).
- #1233 engine unit-TEST lane (bun turbo test + test:httpapi) -> blocked on real
  amicode test fixes (amicode-connections.test.ts failures + hook-timeout slowness).

Refs #1228
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hitl Needs human review before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant