Migrate program-shaped bash tools to Go #98

Open
opened 2026-07-11 03:15:53 +01:00 by allod-agent · 0 comments
Member

User story: So that I can trust larger workspace tools without spending review time on shell edge cases, the program-shaped Bash CLIs should migrate to small Go programs while preserving their command contracts.

Part of the "Forge / workspace CLI tooling" arc.


The allod bash inventory has grown to roughly 10,600 lines of production bash plus 9,600 lines of bash tests across tools and nexus. The largest tools are no longer pipeline glue but full programs written in bash: forge (2,505 lines, a Forgejo REST client), allod (1,235 lines, change workflow plus a patch transfer protocol with manifest integrity checking), flake-update-cascade (486 lines, a three-mode mutation state machine), and flake-status (490 lines, parallel data aggregation through tempfile IPC). Git history shows the recurring bash tax on these: quoting and injection fixes, glob safety fixes, and review cycles spent on argument marshalling rather than behavior.

This issue tracks migrating the program-shaped tools in allod/tools to Go (standard library only, no third-party modules), while keeping pipeline-shaped tools in bash: pull-all, work-diff, setup-tracked-hooks, lib/workspace.sh, protected-refs-policy, and all nexus provisioning and vm/profiles glue scripts stay bash. The nexus rotation suite (rotate-token and key rotation scripts) is explicitly deferred until the Go pattern has proven itself on dev-VM tools.

Migration order: Phase 0 toolchain and scaffolding, Phase 1 forge, Phase 2 allod, Phase 3 flake tools, Phase 4 cleanup. CLI names, flags, exit codes, and output contracts are preserved; each cutover is a profiles/nexus wrapper switch with the bash source retained in-tree for rollback until Phase 4.

Dev plan: allod/strategy dev-plans/bash-to-go-migration.md (PR to follow).

Implementation PRs should use Refs allod/tools#<this> until the final Phase 4 cleanup PR in allod/tools, which carries the closing keyword.

**User story:** So that I can trust larger workspace tools without spending review time on shell edge cases, the program-shaped Bash CLIs should migrate to small Go programs while preserving their command contracts. _Part of the "Forge / workspace CLI tooling" arc._ --- The allod bash inventory has grown to roughly 10,600 lines of production bash plus 9,600 lines of bash tests across `tools` and `nexus`. The largest tools are no longer pipeline glue but full programs written in bash: `forge` (2,505 lines, a Forgejo REST client), `allod` (1,235 lines, change workflow plus a patch transfer protocol with manifest integrity checking), `flake-update-cascade` (486 lines, a three-mode mutation state machine), and `flake-status` (490 lines, parallel data aggregation through tempfile IPC). Git history shows the recurring bash tax on these: quoting and injection fixes, glob safety fixes, and review cycles spent on argument marshalling rather than behavior. This issue tracks migrating the program-shaped tools in `allod/tools` to Go (standard library only, no third-party modules), while keeping pipeline-shaped tools in bash: `pull-all`, `work-diff`, `setup-tracked-hooks`, `lib/workspace.sh`, `protected-refs-policy`, and all `nexus` provisioning and `vm`/`profiles` glue scripts stay bash. The nexus rotation suite (`rotate-token` and key rotation scripts) is explicitly deferred until the Go pattern has proven itself on dev-VM tools. Migration order: Phase 0 toolchain and scaffolding, Phase 1 `forge`, Phase 2 `allod`, Phase 3 flake tools, Phase 4 cleanup. CLI names, flags, exit codes, and output contracts are preserved; each cutover is a `profiles`/`nexus` wrapper switch with the bash source retained in-tree for rollback until Phase 4. Dev plan: `allod/strategy` `dev-plans/bash-to-go-migration.md` (PR to follow). Implementation PRs should use `Refs allod/tools#<this>` until the final Phase 4 cleanup PR in `allod/tools`, which carries the closing keyword.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
allod/tools#98
No description provided.