Skip to content

chore: unship Go browser build experiment - #1276

Merged
Nikhil (shadowfax92) merged 2 commits into
mainfrom
chore/unship-go-build
Jun 19, 2026
Merged

Nikhil (shadowfax92) merged 2 commits into
mainfrom
chore/unship-go-build

Conversation

@shadowfax92

Copy link
Copy Markdown
Contributor

Summary

  • Remove the experimental packages/browseros/build_go Go port of the BrowserOS browser build tool.
  • Keep the supported Python build system under packages/browseros/build as the shipped build path.
  • Preserve unrelated Go tools such as packages/browseros/tools/patch and packages/browseros-agent/apps/cli.

Design

The Go build tool was isolated under packages/browseros/build_go and had no checked-in callers outside its own module. The Python browseros CLI remains the documented and CI-used build system, so this is a direct module deletion instead of a replacement or migration.

Test plan

  • test ! -e packages/browseros/build_go && ! git grep -n "build_go" HEAD -- .
  • git diff --check 050a13a2649cfbd79665cef81e931f799e3a9bdc..HEAD
  • uv run --project packages/browseros python -m unittest build.common.resolver_test
  • go test ./... in packages/browseros/tools/patch
  • bun run check in packages/browseros-agent

Review

  • Local adversarial review: clean, no findings.

@shadowfax92

Copy link
Copy Markdown
Contributor Author

Claude (@claude) review

@shadowfax92

Copy link
Copy Markdown
Contributor Author

Greptile (@greptileai) review

@claude

claude Bot commented Jun 19, 2026 •

Copy link
Copy Markdown

Claude finished Nikhil (@shadowfax92)'s task in 1m 24s —— View job


Code Review

  • Gather PR context
  • Read CLAUDE.md for repo guidelines
  • Inspect the diff and deleted files
  • Verify no remaining references to build_go
  • Check that preserved Go tools are untouched
  • Provide review feedback

Summary: This is a clean, low-risk deletion. The PR removes packages/browseros/build_go (86 files, ~17k lines) in a single atomic commit with no collateral changes.

What was verified

Check Result
build_go references anywhere in repo ✅ None found (grep across all files)
Changes outside packages/browseros/build_go/ ✅ Zero — diff is surgically scoped
packages/browseros/build (Python) still present ✅ Intact
packages/browseros/tools/patch still present ✅ Intact
packages/browseros-agent/apps/cli still present ✅ Intact
CI/Makefile references to build_go ✅ None

Observations

  1. Self-contained module — the deleted go.mod declared module path github.com/browseros-ai/BrowserOS/packages/browseros/build_go. No other module in the repo imported it, so there are no broken import paths to chase down.

  2. Single commit, atomic — all 86 files deleted in one commit. No partial state left behind.

  3. Test plan is solid — the PR's checklist covers: absence check, git diff whitespace check, Python resolver test, Go test for the patch tool, and bun check for the agent. These are the right regression surfaces.

  4. README was clear about the experimental status — the deleted README explicitly said the Go tool was "not shipped to release CI" and the Python tool remains the documented path. This is unambiguous cleanup, not premature removal.

Minor observations (no action needed)

  • The go.sum had 47 lines of transitive dependencies that are now fully gone — no leftover go.sum cruft in any parent module since this was an independent module root.
  • The deletion preserves the build/ Python tree and tools/patch Go tool cleanly — the boundary between "experiment" and "shipped" is respected.

Verdict

LGTM. No issues found. This is exactly the right way to unship an experiment: atomic deletion of an isolated module with no callers, preserving everything else. The test plan covers the relevant regression surfaces.

@greptile-apps

greptile-apps Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the experimental Go port of the BrowserOS browser build tool (packages/browseros/build_go), which was never shipped or referenced by any CI workflow or external caller. The Python build system under packages/browseros/build remains the supported path.

  • 86 files and ~17 000 lines of Go code are deleted cleanly, with zero remaining references to build_go anywhere in the repository (git grep returns nothing on HEAD).
  • Unrelated Go tooling (packages/browseros/tools/patch) and the agent CLI (packages/browseros-agent/apps/cli) are explicitly preserved and are untouched by this diff.

Confidence Score: 5/5

Pure deletion of an isolated, never-shipped experimental module — no surviving callers, no CI references, and no impact on the Python build path or other Go tools.

Every deleted file belonged exclusively to the packages/browseros/build_go module. A post-deletion git grep confirms zero remaining references to build_go anywhere in the repository, including CI workflows, Makefiles, and configuration files. The Python build system and the unrelated Go tools are completely untouched.

No files require special attention — the deletion is complete and self-contained.

Important Files Changed

Filename Overview
packages/browseros/build_go/main.go Entry point of the deleted Go build tool — clean removal, no callers remain in the repo.
packages/browseros/build_go/go.mod Go module declaration deleted along with all its dependencies; go.sum also removed, leaving no orphaned module references.
packages/browseros/build_go/Makefile Build targets for the Go tool deleted; no CI workflow references any of these targets.
packages/browseros/build_go/internal/release/release.go Largest single file (~556 lines) in the deleted module; removed as part of the clean bulk deletion.
packages/browseros/build_go/internal/vendorup/vendorup.go ~763-line vendor-update helper; cleanly deleted with no surviving references.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[BrowserOS Build Systems] --> B[packages/browseros/build\nPython — SHIPPED]
    A --> C[packages/browseros/build_go\nGo — DELETED]
    D[CI / Documented workflows] --> B
    E[packages/browseros/tools/patch\nGo tool — PRESERVED]
    F[packages/browseros-agent/apps/cli\nGo CLI — PRESERVED]
    C -.->|no callers, no CI refs| X[/removed from repo/]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[BrowserOS Build Systems] --> B[packages/browseros/build\nPython — SHIPPED]
    A --> C[packages/browseros/build_go\nGo — DELETED]
    D[CI / Documented workflows] --> B
    E[packages/browseros/tools/patch\nGo tool — PRESERVED]
    F[packages/browseros-agent/apps/cli\nGo CLI — PRESERVED]
    C -.->|no callers, no CI refs| X[/removed from repo/]
Loading

Reviews (1): Last reviewed commit: "chore: merge main into go build cleanup" | Re-trigger Greptile

@shadowfax92
Nikhil (shadowfax92) merged commit 4978145 into main Jun 19, 2026
1 of 2 checks passed
@greptile-apps

greptile-apps Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the experimental Go port of the BrowserOS browser build tool (packages/browseros/build_go) that was never shipped or used in CI, keeping the supported Python build system under packages/browseros/build as the canonical path.

  • 86 files, ~17 000 lines deleted — the entire build_go directory is removed; no callers outside its own module existed, and no references to build_go remain in the repository after this change.
  • The self-contained Go module (github.com/browseros-ai/BrowserOS/packages/browseros/build_go) had its own go.mod/go.sum and was never referenced by a go.work file or any CI pipeline, making this a straightforward dead-code removal.

Confidence Score: 5/5

Safe to merge — this is a pure deletion of a self-contained, never-shipped Go module with no remaining callers.

All 86 deleted files belong exclusively to the build_go module; no go.work file existed to tie it to other modules, git grep confirms zero references to build_go in HEAD, and CI pipelines never invoked its Makefile targets. The Python build system under packages/browseros/build and the unrelated Go tools (tools/patch, browseros-agent) are untouched.

No files require special attention — every changed file is a deletion within the isolated packages/browseros/build_go directory.

Important Files Changed

Filename Overview
packages/browseros/build_go/main.go Entry point for the deleted Go build tool — cleanly removed with the rest of the module.
packages/browseros/build_go/go.mod Go module definition removed; no go.work file references it, so no dangling module dependency remains.
packages/browseros/build_go/cmd/build.go Core build command implementation deleted along with all other cmd/ files — no live callers remain.
packages/browseros/build_go/internal/release/release.go Largest internal module (556 lines) removed; was only consumed within build_go itself.
packages/browseros/build_go/Makefile Build targets for the Go tool removed; no CI pipeline referenced these targets.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[browseros build system] --> B{Build Tool}
    B -->|Shipped / CI-used| C[packages/browseros/build\nPython build system]
    B -->|Experimental / Removed| D[packages/browseros/build_go\nGo port - DELETED]
    A --> E[packages/browseros/tools/patch\nGo tool - KEPT]
    A --> F[packages/browseros-agent/apps/cli\nKEPT]
    D -.->|No callers, no go.work,\nno CI references| X[Deleted in this PR]
    style D fill:#ffcccc,stroke:#cc0000
    style X fill:#ffcccc,stroke:#cc0000
    style C fill:#ccffcc,stroke:#006600
    style E fill:#ccffcc,stroke:#006600
    style F fill:#ccffcc,stroke:#006600
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[browseros build system] --> B{Build Tool}
    B -->|Shipped / CI-used| C[packages/browseros/build\nPython build system]
    B -->|Experimental / Removed| D[packages/browseros/build_go\nGo port - DELETED]
    A --> E[packages/browseros/tools/patch\nGo tool - KEPT]
    A --> F[packages/browseros-agent/apps/cli\nKEPT]
    D -.->|No callers, no go.work,\nno CI references| X[Deleted in this PR]
    style D fill:#ffcccc,stroke:#cc0000
    style X fill:#ffcccc,stroke:#cc0000
    style C fill:#ccffcc,stroke:#006600
    style E fill:#ccffcc,stroke:#006600
    style F fill:#ccffcc,stroke:#006600
Loading

Reviews (2): Last reviewed commit: "chore: merge main into go build cleanup" | Re-trigger Greptile

Dmitrii Vasilev (gHashTag) added a commit to gHashTag/BrowserOS that referenced this pull request Aug 18, 2026
The branch recorded whose a change was; it never stopped two bees, or a
bee and the build, from writing the same bytes. make check failed with
'cannot find result in scope' on a snapshot of a file bee browseros-ai#1128 was
halfway through writing, and the same file compiled seconds later.
Nothing was wrong with either side. The variant split (browseros-ai#1276) fixed the
state collision; this is the source one, and it became routine the day
the Queen started picking up work unprompted.

git worktree add -B cuts the branch as it makes the checkout, so the
branch and the edits cannot end up in different places. The worker's
workingDirectory and its standing orders both name that path.
createVirtualBranch is now only reached when a worktree could not be
made - the pre-worktree behaviour, kept on purpose: a bee that cannot get
a directory should still work, just without isolation.

The same change closes the stale-base defect. createVirtualBranch treats
'the branch already exists' as success so a resumed task does not fail,
and that adopted queen/1127 from a run 140 commits earlier: its diff
against the tip read as 641 insertions against 12,508 deletions - the
Makefile, the night log, every fixture - while the bee's own change was
34 lines. A diff is not a merge, but QueenBranchCommitter assembles by
overlay, and an overlay onto a base that old drops everything newer. A
branch cut before HEAD is now refused by name and sidestepped with a
suffix. Never deleted: a leftover may hold the only copy of somebody's
work, and this code cannot know.

Cleanup is a sweep, not a hook on each terminal transition. There are six
places a task can settle and a cleanup wired to five leaves directories
on disk in exactly the case nobody tested. Removal is guarded by
isOwnedWorktree, because this hands a path to git worktree remove and the
shape of that mistake is deleting the checkout somebody is sitting in.

Driven live: autonomy.tick -> chose browseros-ai#1127 -> approved -> delegated ->
'Not reusing queen/1127: the branch was cut before the current HEAD
(c9d5926). Cutting queen/1127-r1' -> checkout created at
.worktrees/queen-1127 on queen/1127-r1 at the current tip. Three minutes
of bee work later the shared tree's status hash was byte-identical.

Also carries bee browseros-ai#1128's interface-divergence watchdog in ChatViewModel -
her work, inside her boundary, interleaved with mine in one file and not
separable by git. Named here rather than silently absorbed.

757 e2e checks, +18: when a leftover branch may be adopted, and which
paths may be handed to git worktree remove.

Closes browseros-ai#1277

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Dmitrii Vasilev (gHashTag) added a commit to gHashTag/BrowserOS that referenced this pull request Aug 18, 2026
Giving bees worktrees put the harness's checkouts and the working Queen's
in one directory, and the cassette suite's branch sweep met a branch
checked out by a live bee: it could not delete it and went red. Had it
been able to, it would have taken a working checkout with it.

Scoped by variant, like the data root (browseros-ai#1276): .worktrees/dev and
.worktrees/test. isOwnedWorktree now refuses a path outside the caller's
own variant, so the harness cannot remove a dev checkout even by naming
it in full.

The cassette recipe clears its own worktrees twice - before each replay
and before the final sweep. Only the first was obvious, and it leaves the
LAST cassette's checkout standing at exactly the moment the sweep runs.

760 e2e checks. Driven: cassettes 4 of 4, no checkout left behind.
Dmitrii Vasilev (gHashTag) added a commit to gHashTag/BrowserOS that referenced this pull request Sep 4, 2026
…rowseros-ai#1276) (#297)

The gate read only the Makefile. make check drives shell scripts as
well - build.sh runs tests/swift/run_chat_sse_e2e.sh at the end of a
build, make e2e and the mutants rows bash it directly - so a
.trinity-dev rm inside that script passed the gate untouched: the same
hole as browseros-ai#1275, one level down.

The gate now scans, against one forbidden list defined once in a single
grep:

- the cassette recipe, exactly as before, and
- every tests/**/*.sh path the cassette recipe names, collected at run
  time, plus every script in the new ISOLATION_SCRIPTS variable, which
  today lists tests/swift/run_chat_sse_e2e.sh.

On failure the grep prints the file and the line number of the match
itself. A comment-only .trinity-dev in a script fails too, because the
gate does not parse shell.

The recipe body is a single sh -c block carrying no dollar sign, no
backtick and no nested single quote, reading only repo-root-relative
paths, so it can be lifted out between its quotes and proven with plain
sh from the repo root - the worker image has no make. The dev-log
needle is therefore spelled (LOG): it catches both a plain and a
doubled dollar spelling of the LOG variable while carrying no dollar
itself.

Scans that would silently cover nothing now fail: an empty script
collection (ISOLATION_SCRIPTS gone and the recipe naming no .sh), and a
collected script that is not a regular file.

Co-authored-by: Trinity Bee <bee@trinity.local>
Dmitrii Vasilev (gHashTag) added a commit to gHashTag/BrowserOS that referenced this pull request Sep 4, 2026
…rowseros-ai#1276) (#301)

The gate read only the Makefile. make check drives shell scripts as
well - build.sh runs tests/swift/run_chat_sse_e2e.sh at the end of a
build, make e2e and the mutants rows bash it directly - so a
.trinity-dev rm inside that script passed the gate untouched: the same
hole as browseros-ai#1275, one level down.

The gate now scans, against one forbidden list defined once in a single
grep:

- the cassette recipe, exactly as before, and
- every tests/**/*.sh path the cassette recipe names, collected at run
  time, plus every script in the new ISOLATION_SCRIPTS variable, which
  today lists tests/swift/run_chat_sse_e2e.sh.

On failure the grep prints the file and the line number of the match
itself. A comment-only .trinity-dev in a script fails too, because the
gate does not parse shell.

The recipe body is a single sh -c block carrying no dollar sign, no
backtick and no nested single quote, reading only repo-root-relative
paths, so it can be lifted out between its quotes and proven with plain
sh from the repo root - the worker image has no make. The dev-log
needle is therefore spelled (LOG): it catches both a plain and a
doubled dollar spelling of the LOG variable while carrying no dollar
itself.

Scans that would silently cover nothing now fail: an empty script
collection (ISOLATION_SCRIPTS gone and the recipe naming no .sh), and a
collected script that is not a regular file.

Co-authored-by: Trinity Bee <bee@trinity.local>
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