| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
How to pull anomalyco/opencode into this fork. Read UPSTREAM.md first for the why (modification zones, sync log); this doc is the how.
Designed so a maintenance agent with no prior context can run it end-to-end.
git checkout main
git pull origin mainMissing this is the #1 way to produce a stale sync. Do not skip.
script/check-upstream.shReads UPSTREAM.md's latest recorded To SHA for anomalyco/opencode and reports how many commits upstream/dev is ahead. Pick a target commit:
git fetch upstream dev
git checkout -b sync/upstream-vX.Y.Z main
git merge <target-sha>Expect conflicts. Typical conflict set for ~50-100 commits of upstream churn:
Files we might have Yellow-zone modifications in (run the audit in step 5):
Upstream ships 32 workflows we deleted in PR #14 (Discord webhooks, marketplace publishing, SaaS deploy, OPENCODE_API_KEY-gated automation, community moderation, Nix flake, upstream test surface). The merge will reintroduce them. Re-delete:
rm -f .github/workflows/{beta,close-issues,close-stale-prs,compliance-close,containers,daily-issues-recap,daily-pr-recap,deploy,docs-locale-sync,docs-update,duplicate-issues,generate,nix-eval,nix-hashes,notify-discord,opencode,pr-management,pr-standards,publish,publish-github-action,publish-vscode,release-github-action,review,stats,storybook,sync-zed-extension,test,triage,vouch-check-issue,vouch-check-pr,vouch-manage-by-issue}.ymlKeepers: release.yml (ours) and typecheck.yml (retargeted to main). If upstream adds a new workflow file we haven't classified yet, leave it on disk and flag it in the PR body for human review.
bun install
bun run typecheckbun run typecheck at the root is aliased to the F4 filter: bun turbo typecheck --filter='@browser-use/browsercode-core...' --filter='@browser-use/bcode-browser'. Runs only the 5 packages we ship; should finish in ~12 seconds on a cold cache. If it fails, upstream changed an API we depend on — fix in our code, not upstream's.
Do NOT run root-level bun turbo typecheck without the filter. It will try to typecheck web, console, app, enterprise — packages we deliberately do not maintain, some of which are upstream-broken. That's why the F4 filter exists.
git log --name-only --pretty=format: <recorded-sha>..<target-sha> \
-- bin/ packages/opencode/src/index.ts \
packages/opencode/src/cli/cmd/temporary.ts \
packages/opencode/src/cli/cmd/tui/app.tsx \
<any other Yellow files from UPSTREAM.md §1> \
| sort -uIf output is empty, upstream didn't touch any file we modified — no extra work. If non-empty, open each listed file, confirm our modification survived the auto-merge, and note any that needed re-resolution in the PR body.
Append a row to the sync-log table under ### anomalyco/opencode → this repo:
| YYYY-MM-DD | <from-sha> | <to-sha> | <author> | Merged upstream release point for vX.Y.Z. Conflicts: <list>. Yellow-zone: <touched or none>. |
git add .
git -c core.editor=true commit # merge message pre-populated; amend for clarity
git push -u origin sync/upstream-vX.Y.ZThe pre-push hook (husky/pre-push) runs the bun-version guard + bun run typecheck. With bun >= 1.3.13 and a clean typecheck, it passes without --no-verify. If you must bypass, document why in the PR.
Open the PR. Our $BROWSERCODE_DEV_PAT is a fine-grained PAT scoped to browser-use/browsercode (user: Alezander9). It works via the REST API; gh pr create uses a GraphQL mutation that this PAT does not allow. Use REST:
curl -sS -X POST \
-H "Authorization: token $BROWSERCODE_DEV_PAT" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/browser-use/browsercode/pulls \
-d '{
"title": "sync: upstream vX.Y.Z (<short-sha> on dev)",
"head": "sync/upstream-vX.Y.Z",
"base": "main",
"body": "<PR body — see template below>"
}'(gh api repos/browser-use/browsercode/pulls --method POST -f ... also works, same REST path.)
## Summary Brings anomalyco/opencode up to vX.Y.Z (<target-sha> on dev). N upstream commits since <recorded-sha>. ## Conflicts resolved | File | Resolution | |---|---| | ... | ... | ## Verification - bun install: clean - bun run typecheck: 5/5 passed in Ns ## Yellow-zone audit (either "no Yellow-zone files touched by upstream in this window" or a per-file list)
The project's AGENTS.md rule: everything goes through a branch + PR. Merging the sync PR is always a human decision, not the agent's.
| Back | FazBrowse Home | New Git URL |