Add bash-to-go migration dev plan #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent/bash-to-go-migration-plan"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
dev-plans/bash-to-go-migration.md: a phased plan to migrate the four program-shaped bash tools inallod/tools(forge,allod,flake-update-cascade,flake-status) to stdlib-only Go, keeping pipeline-shaped tools, git hooks, and all nexus provisioning in bash, and deferring the nexus rotation suite.Based on a full audit of the bash inventory across
tools,nexus,vm, andprofiles(~10,600 production lines + ~9,600 test lines): decision rule, per-tool split, language tradeoffs against the Allod priorities, cross-repo cutover sequencing (writeShellApplication → buildGoModule), and per-phase risk.Refs allod/tools#98
Risk
R0 for this PR (docs only). The plan itself scores the implementation R3 overall, per-phase table inside.
Validation
Plan follows
allod/memory/templates/dev-plan.mdsection order; tracking issue exists (allod/tools#98); sequencing checked against the live packaging inprofiles/hosts/dev/home-shared.nixandnexus/nix/home.nix; no conflict with the active pull-all redesign (allod/tools#87), which stays bash and out of scope.Self-review findings (standing focus areas):
Acceptance test determinism (Phase 0):
nix build .#checks-placeholder 2>/dev/null || nix flake checkis a fallback chain, not a test. The dev flake is a Phase 0 deliverable, so the gate should be plainnix flake check.Token-safety check is racy and checks the wrong process:
forge pr list & p=$!; grep -c token /proc/$p/cmdlineraces the process exit and inspects the parent's argv, which never carried the token even in bash — the historical risk was child (curl) argv. Replacing with a precise executable gate: static assertion that the forge API path imports noos/exec, plus a Go test that the Authorization header is set only in-process.Verified during review:
curlandjqare in the dev VM system closure independent of the wrappers (checkedhosts/dev/dev-1/configuration.nixand the live VM), so the Phase 4 rollback workaround (running the bashforgefrom the checkout) holds.Fixes for 1 and 2 in a follow-up commit.