Repository navigation
Closed
Description
Problem
pkgs/launcher/launcher is a compiled binary tracked in git, and no pkgs/ Go module's local build output is covered by .gitignore (except identity), so building these modules dirties the working tree — and in launcher's case overwrites a tracked 16 MB artifact.
Evidence (verified on main 0fccf414)
git ls-treeshowspkgs/launcher/launcheras a tracked blob of 16,351,700 bytes:ELF 64-bit LSB executable, x86-64, Go BuildID=..., with debug_info, not stripped. It was committed inef6759b4/493f2244and nothing in the tree references the path (repo-wide grep forlauncher/launcher/./launcheroutside the file itself: no hits). The source ispkgs/launcher/main.go; the binary is pure build output.- Reproduced the hazard: in a clean worktree of main,
go build .insidepkgs/launcherchanges the file's md5 (7c1922c6…→78605330…) andgit statusreportsM pkgs/launcher/launcher. The long-lived dev clone already shows exactly this modification, plus untrackedpkgs/chat/chat,pkgs/database/database,pkgs/import/importfrom local builds. git check-ignoreon each module's natural build output (go buildin the module dir writes an executable named after the directory): onlypkgs/identity/identityis ignored (viapkgs/identity/.gitignore:19).chat,database,graph,import,launcher,map,teaoutputs are not ignored.- Since CI: five pkgs Go modules (chat, database, import, launcher, tea) are built by nothing — the map/identity rot pattern, still unguarded #342/ci: build and vet the five uncovered pkgs Go modules (#342) #343 these modules are built routinely (go-modules-build.yml, map-build.yml, identity-build.yml run
go build ./...in CI, which discards output — but the natural local commandgo build/go build .writes the binary into the module directory), so the noise recurs for every contributor, and a carelessgit add -Are-commits a fresh 16 MB binary.
Why it matters
- 16 MB of binary bloat in every clone, for an artifact anyone can rebuild from
main.goin seconds. - A tracked build artifact that silently changes on every local build invites accidental recommit of a stale/platform-specific binary and creates phantom diffs in unrelated work (already observed in the dev clone).
- Untracked build outputs for the other seven modules pollute
git statusand risk the same accidental commit.
Suggested fix / acceptance criteria
-
pkgs/launcher/launcheris no longer tracked (git ls-files pkgs/launcher/launcheris empty); the module still builds from source. - For every Go module under
pkgs/with a rootpackage main(chat, database, graph, identity, import, launcher, map, tea),git check-ignore pkgs/<module>/<module>succeeds — e.g. a/nameentry in the module's own.gitignore, following the existing precedents (pkgs/identity/.gitignore'sidentityentry; the/gomod2nix-templateanchored style in sibling modules). Modules without a.gitignore(chat, database, tea) gain one. - After running
go build .in each of those modules,git status --porcelainis clean. - No source or CI changes are needed; go-modules-build / map-build / identity-build stay green.
Single-repo: the pkgs/ Go modules exist only in this repo.
Metadata
Metadata
Assignees
Labels
No labels
Activity