spike: subtree git archive <tag>:<subdir> + sha256 sidecar attachment-from-hook
#812
Reference in New Issue
Block a user
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?
De-risk the packaging hook: confirm the forge can (in-process) run a subtree archive of
entry_pointat a tag and create/attach release assets from a hook. The subtree-archive helper and hook attachment path were NOT located in source during assessment (tree API truncates at 1000 entries).Part of the MokoGIT release-system redesign (all-platforms assessment, 2026-07-18). Hybrid direction: server-side packaging, build/publish stay on runners.
Authored-by: Moko Consulting
Spike verdict: GO
The forge can package on-release entirely in-process — no build scripts, no publish tokens. Every capability already exists in-tree;
services/release/checksum.go:GenerateReleaseChecksumsis a working template of the exact pattern.services/release/release.go:CreateRelease(before the existing checksum call, ~:259) and theUpdateReleasepath (draft→publish); or a customNotifier.modules/gitrepo/archive.go:CreateArchiveshellsgit archive --format=zip <commit> <paths...>— subtree viaPaths=[entry_point], full-repo viaPaths=nil; commit =rel.Sha1.checksum.go'scrypto/sha256+attachment_service.NewAttachment(stream the zip viaio.Pipe).RepoMetadata.EntryPointviaGetRepoMetadata(ctx, rel.RepoID)(already used inupdateserver/joomla.go)..zip+.sha256asset and falls back to/archive— this makes it primary.Implementation estimate: new
services/release/packaging.go+ 2 call-site edits inrelease.go.Caveats to handle in #809: runs inline/synchronous (stream via io.Pipe to avoid buffering large zips; async/queue possible but unverified as preferred); hook UpdateRelease too; idempotent replace-on-rerun is net-new;
NewAttachmentbypasses the release size cap.Unblocks #809.
Authored-by: Moko Consulting