Finish the Go forge cutover: close the snapshot drift, then deploy and retire the bash tool #155
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#155
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Bring the Go
forgeup to the bash tool's current command surface and finish deploying it, so the Phase 1 cutover can land without removing a command that dev VMs already depend on.Primary goals:
forge pr snapshotand its scenario tests to Go so both implementations expose the same command surface.flake.lockconflict on allod/archetypes#40 so it merges onto current master.archetypespin inallod/deploy, rebuild, and record the acceptance witness.nexuspin.forgeand its shell suite once both cutovers are deployed.Current state
The Go implementation merged in allod/tools#145 and is inert: every machine still runs the bash tool, whose store path is a
writeShellApplicationoutput rather than a versionedbuildGoModuleone. Both cutover pull requests are open and unmerged — allod/archetypes#40 for dev VMs and allod/nexus#25 for the host.Since that merge, three commits extended the bash tool and were never mirrored into Go:
0e768fbadded stable pull request snapshots,44d9347bound snapshot URLs to the repository identity they claim, and9e4b157normalized AGit-created head refs. The result is a real gap:forge pr snapshot <number>exists in bash with a 126-linetests/forge/snapshot.sh, andcmd/forge/contains no snapshot implementation, soforge --helpitself now differs between the two.This is not cosmetic.
allod pr explainis built on snapshots:pr-explain/explainresolves and verifies one per run, andpr-explain/validate-reportconsumessnapshot.json. Merging the cutover as it stands would removeforge pr snapshotfrom every dev VM and break the PR explanation tool. The dev plan already anticipated this class of drift by requiring mid-migration bash fixes to be mirrored into the Go scenario matrix; that did not happen here because the port had already merged.The only two consumers reading the bash file are
archetypes/modules/dev-home-shared.nix:34andnexus/nix/home.nix:27, both replaced by the cutover pull requests, so nothing references it once they merge. One resolution path needs checking at deletion time:pr-explain/lib.sh:37prefers theforgesitting beside the resolved tools root and only then falls back to PATH.Sequence
forge pr snapshotto Go, including the repository-identity and AGit head-ref behavior from the two follow-up commits, porttests/forge/snapshot.sh, and regenerate the frozen usage text incmd/forge/usage.gofrom the current bash tool.agent/forge-go-cutoverin allod/archetypes to resolve theflake.lockconflict, then merge allod/archetypes#40.archetypesinput inallod/deploy, rebuild dev VMs, and confirm the deployed binary resolves to a versioned Go package with its wrapper beside it.nexuspin, then rebuild the host and run the host-side smoke check. Once that pin carries the wrapper, the archetypes wrapper commit and thenexuspin roll back together.forgeandtests/forge/*.sh, confirm thepr-explainPATH fallback still resolves, refreshdocs/forge.mdwhere it describes behavior specific to the shell implementation, and close allod/tools#144, whose bug disappears with the bash tool.Further forge changes landing in bash before step 3 completes must mirror into the Go implementation and its tests within the same pull request, otherwise the cutover reintroduces exactly this gap.
Scope
In scope: the snapshot port and usage regeneration, the cutover merges and pin advances, post-rebuild acceptance, and the Phase 4 deletion for
forgeonly.Out of scope and tracked separately: Phase 2 (
allod) and Phase 3 (flake tools) of allod/tools#98; retiring the bash quirks the port replicated deliberately, which are individual interface decisions for after the bash tool is gone; adding thegitwrapper to the tools dev flake so a localnix buildmatches the deployed binary; and narrowingsrcfor the Go package so an unrelated commit to this repository does not rebuildforgeon every machine.Part of allod/tools#98.
Phase 1 implementation is ready in allod/tools#156.
It ports
forge pr snapshotand all 19 Bash snapshot scenarios into Go, preserves the fail-closed URL/repository/ref/object-ID checks, and passed Go tests/vet, every Bash forge suite,nix build,nix flake check, and a live byte-for-byte snapshot comparison against Forgejo.Human gate: #156 needs review and merge before either cutover is refreshed. After it merges, the remaining sequence is:
allod/archetypesmaster into allod/archetypes#40, refresh itsallod-toolspin to the merged rev, and rerun the snapshot/package checks;forge pr snapshoton each;I have not advanced the cutover pins to the unmerged tools commit, so the rollback path remains unchanged.
The dev-VM cutover refresh is complete on allod/archetypes#40 at
66f2342. Current archetypes master is merged, the lock conflict is resolved,allod-toolsis pinned to merged snapshot revision5649cec, the realallod-devForge package builds, and its live snapshot output matches Bash byte for byte. Forgejo reports the PR mergeable.Next human gate: merge allod/archetypes#40. After that, advance the
archetypesinput in allod/deploy and rebuild a dev VM before proceeding to the host cutover.Dev-VM deployment witness passed on
allod-devafter the rebuild. The installed command resolves to/nix/store/bvwm2lm8z9ik91lgcyqwknfjidif1l58-forge-0.1.0/bin/forge; its wrapper sits beside a Go ELF payload, authentication and Git repository inference work, and livepr snapshot 156returned schema version 1 with the expected repository/ref projection. No dev cutover issue was found.I am rolling forward to the host cutover now by refreshing and revalidating allod/nexus#25 against current nexus master and the snapshot-enabled tools pin. The host rebuild remains a human-only gate after that PR and its consumer pin land.
Rolled forward to the host cutover. allod/nexus#25 is refreshed at
1e201ea, includes current nexus master, and is mergeable. Through current allod/archetypes it builds the exact sameforge-0.1.0store output already verified on the rebuilt dev VM; the nexus architecture check passes.Next human gate: merge allod/nexus#25. After that I can advance the allod/archetypes
nexuspin and validate the committed host composition; the actual host rebuild and smoke test remain human-only.Host deployment witness passed on
nexusafter rebuild. The installed command resolves to/nix/store/bvwm2lm8z9ik91lgcyqwknfjidif1l58-forge-0.1.0/bin/forge, authentication succeeds, and repository inference plus livepr snapshot 156returned the expected schema-version-1allod/toolsprojection.Both deployed cutovers have now passed. I am proceeding to the final Bash-source and shell-suite retirement step.