Repository navigation
chore: unship Go browser build experiment - #1276
Conversation
|
Claude (@claude) review |
|
Greptile (@greptileai) review |
|
Claude finished Nikhil (@shadowfax92)'s task in 1m 24s —— View job Code Review
Summary: This is a clean, low-risk deletion. The PR removes What was verified
Observations
Minor observations (no action needed)
VerdictLGTM. 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 SummaryThis PR removes the experimental Go port of the BrowserOS browser build tool (
Confidence Score: 5/5Pure 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
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/]
%%{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/]
Reviews (1): Last reviewed commit: "chore: merge main into go build cleanup" | Re-trigger Greptile |
Greptile SummaryThis PR removes the experimental Go port of the BrowserOS browser build tool (
Confidence Score: 5/5Safe 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
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
%%{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
Reviews (2): Last reviewed commit: "chore: merge main into go build cleanup" | Re-trigger Greptile |
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>
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.
…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>
…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>
Summary
packages/browseros/build_goGo port of the BrowserOS browser build tool.packages/browseros/buildas the shipped build path.packages/browseros/tools/patchandpackages/browseros-agent/apps/cli.Design
The Go build tool was isolated under
packages/browseros/build_goand had no checked-in callers outside its own module. The PythonbrowserosCLI 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..HEADuv run --project packages/browseros python -m unittest build.common.resolver_testgo test ./...inpackages/browseros/tools/patchbun run checkinpackages/browseros-agentReview