diff --git a/DIVERGENCES.md b/DIVERGENCES.md index 62a56df1e5..882c50deaa 100644 --- a/DIVERGENCES.md +++ b/DIVERGENCES.md @@ -47,6 +47,7 @@ upstream maintainers — see README → Syncing with upstream for why and how. | `README.*.md` (21 translations) | Deleted | Upstream marketing translations, irrelevant to the fork. | Keep deleted (`git rm` the upstream side of modify/delete conflicts). | | `screenshot-uk.png` | Deleted | Orphaned README-translation asset; referenced by nothing. | Keep deleted. | | `.github/TEAM_MEMBERS` | Deleted | Upstream's team roster. The five workflows that read it (pr-standards, pr-management, triage, duplicate-issues, compliance-close) fetch it from a `dev` branch this fork doesn't have, so they are already inert here. | Keep deleted. | +| `packages/script/src/index.ts` | Guard the `.github/TEAM_MEMBERS` read: fall back to an empty team list when the file is absent instead of throwing at module load | This module is imported by the publish path (`publish.ts`); the deleted `TEAM_MEMBERS` (row above) made `bun run release` crash with ENOENT. `Script.team` has no consumers in the fork. | Keep our `exists()` guard; take upstream's surrounding changes. | | `.github/workflows/` — 22 upstream workflows deleted (beta, close-issues, close-prs, compliance-close, containers, deploy, docs-locale-sync, docs-update, duplicate-issues, generate, nix-hashes, notify-discord, opencode, pr-management, pr-standards, publish, publish-github-action, publish-vscode, release-github-action, review, stats, triage) | Deleted | All inert or upstream-only here: gated on `anomalyco/opencode`, publish/deploy to upstream infra, need upstream secrets (`OPENCODE_APP_SECRET`, `OPENCODE_API_KEY`, marketplace/Discord/PostHog tokens), trigger only on a `dev` branch the fork lacks, or read the deleted `TEAM_MEMBERS`. | Keep deleted; delete new upstream workflows too unless they're generic self-contained CI. | | `.github/workflows/{typecheck,test,nix-eval,storybook}.yml` | Triggers `dev` → `main` (incl. test.yml's concurrency-group ref check); runners `blacksmith-*` → `ubuntu-latest`/`windows-latest`; test.yml unit-test step `timeout-minutes` 20 → 45 | Fork's default branch is `main`; Blacksmith runners aren't installed here, so jobs queued forever. GitHub-hosted `windows-latest` needs well over 20 minutes for the spawn-heavy opencode suite. | Keep our branches + runners + timeout; take upstream's other changes. | | `packages/core/test/ripgrep.test.ts` | `120_000` timeout on both `it.live` tests | First use downloads + extracts the ripgrep binary; GitHub-hosted Windows runners blow bun's 5s default. | Keep our timeouts; take upstream's test changes. | diff --git a/README.md b/README.md index 9acf8bd135..d32d6e6d70 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,6 @@ # CoDev Code -CoDev Code is a fork of [opencode](https://github.com/anomalyco/opencode) that tracks upstream while carrying a small set of organization-specific changes. Read [DIVERGENCES.md](DIVERGENCES.md) before editing any upstream file — it defines where changes are allowed to live. - -## Development - -```sh -bun install -cd packages/opencode -bun run dev # run the CLI from source -bun run typecheck -bun test -``` +CoDev Code is a fork of [OpenCode](https://github.com/anomalyco/opencode) that tracks upstream while carrying a small set of organization-specific changes. Read [DIVERGENCES.md](DIVERGENCES.md) before editing any upstream file — it defines where changes are allowed to live. Upstream's [AGENTS.md](AGENTS.md) and [CONTRIBUTING.md](CONTRIBUTING.md) conventions (commit style, code style, package layout) apply here unchanged. @@ -20,14 +10,14 @@ Releases publish the unscoped — therefore **public** — [`codev-code`](https: ```sh npm login # once per machine -bun run release # from the repo root: builds all platforms (~15-20 min), then publishes +bun release # from the repo root: builds all platforms (~15-20 min), then publishes ``` Variants: ```sh -bun run release beta # publish under the `beta` dist-tag instead of `latest` -bun run release --skip-build # reuse an existing dist/ (must match the package.json version) +bun release beta # publish under the `beta` dist-tag instead of `latest` +bun release --skip-build # reuse an existing dist/ (must match the package.json version) ``` Notes: @@ -84,6 +74,12 @@ Features go, in order of preference: 2. **New workspace packages** (`packages/codev-*`) — additive; near-zero merge cost. 3. **Edits to upstream files** — last resort. Every such file must be listed in [DIVERGENCES.md](DIVERGENCES.md) with a reason and a conflict-resolution strategy. -## License +## Development -MIT. This repository retains the upstream [LICENSE](LICENSE) (Copyright (c) 2025 opencode). See [NOTICE](NOTICE) for attribution. +```sh +bun install +cd packages/opencode +bun run dev # run the CLI from source +bun run typecheck +bun test +``` diff --git a/packages/script/src/index.ts b/packages/script/src/index.ts index d148ce0d2b..b0af52a8d6 100644 --- a/packages/script/src/index.ts +++ b/packages/script/src/index.ts @@ -49,11 +49,17 @@ const VERSION = await (async () => { const bot = ["actions-user", "opencode", "opencode-agent[bot]"] const teamPath = path.resolve(import.meta.dir, "../../../.github/TEAM_MEMBERS") +// Fork: TEAM_MEMBERS was deleted (upstream's team-gated workflows are gone) and +// nothing here reads Script.team, but this module is imported by the publish +// path. Tolerate the missing file instead of crashing the release. +const teamFile = Bun.file(teamPath) const team = [ - ...(await Bun.file(teamPath) - .text() - .then((x) => x.split(/\r?\n/).map((x) => x.trim())) - .then((x) => x.filter((x) => x && !x.startsWith("#")))), + ...((await teamFile.exists()) + ? await teamFile + .text() + .then((x) => x.split(/\r?\n/).map((x) => x.trim())) + .then((x) => x.filter((x) => x && !x.startsWith("#"))) + : []), ...bot, ]