feat: embed mint source for standalone binary - #1035
Merged
Conversation
When running the fullsend binary outside the repo checkout (e.g. from a GitHub release), the default mint source path internal/mint/ doesn't exist, causing install to fail. Embed the mint source files in the binary at build time and fall back to the embedded copy when the filesystem path is missing. Log a warning when local source is used so the user knows they're not using the embedded version. Includes a drift-detection test that compares the embedded copies against the originals in internal/mint/. Signed-off-by: Wayne Sun <gsun@redhat.com>
Site previewPreview: https://76eb70a9-site.fullsend-ai.workers.dev Commit: |
ReviewNo findings. Previous runReviewFindingsLow
Info
Previous run (2)ReviewFindingsMedium
Low
|
- Use errors.Is(err, fs.ErrNotExist) instead of os.IsNotExist for proper error chain unwrapping - Sort embedded file map keys before zip iteration for deterministic output (prevents spurious hash-based redeployments) - Fix stale comment referencing "underscore names" (now .embed suffix) - Improve drift detection test: check directory existence once before loop, detect new files added to internal/mint/ that are missing from the embed map, include full target path in assertion messages - Add missing go.sum assertion in nonexistent-dir test Signed-off-by: Wayne Sun <gsun@redhat.com>
4 tasks
Document that the downloaded binary includes embedded mint source and works standalone. When running from a repo clone, local internal/mint/ is used instead (with a log message). Update --mint-source-dir flag description and --skip-mint-deploy note accordingly. Signed-off-by: Wayne Sun <gsun@redhat.com>
Member
Author
|
/fs-review |
This was referenced May 15, 2026
ben-alkov
pushed a commit
to ben-alkov/fullsend
that referenced
this pull request
May 18, 2026
The review agent can flag findings in files not changed by the PR (e.g. stale docs). When these are posted as inline review comments, GitHub returns 422 Unprocessable Entity because the API only allows comments on files in the diff. Fetch the PR's changed files before submitting the review and drop inline comments that reference files outside the diff. The findings still appear in the sticky comment body, so nothing is lost. Fixes the 422 failure seen in fullsend-ai/.fullsend run 25942695364 where docs-currency findings targeted docs files outside PR fullsend-ai#1035's diff. Signed-off-by: Wayne Sun <gsun@redhat.com>
This was referenced Jul 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
internal/mint/source files (go.mod, go.sum, main.go) into the fullsend binary at build time usinggo:embedbundleFunctionSource()falls back to the embedded copy when the filesystem path doesn't exist (e.g. running from a downloaded release binary)TestEmbeddedMintSource_MatchesOriginal) that fails if the embedded copies diverge from the originals ininternal/mint/Problem: Running
fullsend admin installfrom a release binary fails withopen internal/mint: no such file or directorybecause the default source path only exists inside the repo checkout.Approach: Files are stored with
.embedsuffix inmintsrc/to avoid Go treating the directory as a separate module (sinceinternal/mint/has its owngo.modfor Cloud Function deployment).Test plan
go test ./internal/dispatch/gcf/— all tests passgo vet ./internal/dispatch/gcf/— cleango build ./cmd/fullsend/— binary builds with embedded source (~34 KB larger)