fix(#5761): resolve source dir before dry-run output - #5763
Conversation
The dry-run code path in both runMintDeployGCP and runMintDeployCloudflare printed source information and returned early before the sourceDir default was resolved. This caused dry-run to report "embedded mint function" / "embedded Worker adapter" even when a real deploy from the same checkout would use the on-disk checkout path (internal/mint for GCP, internal/dispatch/cf/workersrc for Cloudflare). Move the sourceDir default resolution (DefaultFunctionSourceDir / DefaultWorkerSourceDir) to before the dry-run block in both functions so dry-run output matches real deploy behavior. Also update the --source-dir flag help text to describe the actual default (checkout path when present, embedded otherwise). Note: pre-commit could not run in sandbox (network restriction); post-script will run it authoritatively. Closes #5761
|
🤖 Finished Review · ✅ Success · Started 2:17 PM UTC · Completed 2:30 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Previous runReviewFindingsLow
Previous runReviewFindingsMedium
Low
Labels: PR fixes a bug in the mint CLI deploy command (Go code) Previous runReviewFindingsLow
Previous run (2)ReviewFindingsMedium
Low
Labels: PR fixes a bug in the mint CLI deploy command (Go code) |
|
/fs-fix AI review comments |
|
🤖 Finished Fix · ✅ Success · Started 12:37 PM UTC · Completed 12:43 PM UTC |
Update the --source-dir flag description in docs/cli/mint.md and docs/guides/infrastructure/mint-administration.md to match the updated CLI help text from PR #5763. The docs previously said "(default: embedded)" but the actual defaulting behavior is "checkout path when present, embedded otherwise". Addresses review feedback on #5763
🔧 Fix agent — iteration 1 (human-triggered)Fixed 2 stale documentation references to the --source-dir flag default. Both docs/cli/mint.md and docs/guides/infrastructure/mint-administration.md now reflect the updated defaulting behavior (checkout path when present, embedded otherwise). Disagreed with 1 low-severity edge-case observation that the reviewer acknowledged as an improvement over previous behavior. Fixed (2):
Disagreed (1):
Tests: passedNext steps:
|
|
🤖 Review · ❌ Terminated · Started 12:44 PM UTC · Ended 12:57 PM UTC |
Site previewPreview: https://871d024b-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 12:44 PM UTC · Completed 12:57 PM UTC |
|
/fs-fix |
|
🤖 Fix · |
|
/fs-fix the agent review comments and the merge conflicts |
|
🤖 Finished Fix · ✅ Success · Started 6:08 AM UTC · Completed 6:20 AM UTC |
Merge conflicts in runMintDeployCloudflare resolved: integrated the preview-alias string refactor from main with the sourceDir early-resolution from this PR branch. Addresses review feedback: - Add os.Stat check for default source directory in dry-run output: when the default checkout path does not exist on disk (standalone binary case), dry-run now shows "embedded" instead of the non-existent relative path. Explicit --source-dir values are always shown regardless of existence. - Fix misleading default column in mint-administration.md: changed from "(checkout path)" to empty, matching docs/cli/mint.md. - Add tests for the embedded-fallback case (path missing) for both GCP and Cloudflare platforms. Addresses review feedback on #5763
🔧 Fix agent — iteration 2 (human-triggered)Resolved merge conflicts with main (preview-alias refactor) and addressed all 3 review findings: added os.Stat existence check for default source directory in dry-run output (both GCP and Cloudflare), fixed misleading docs default column, and added new tests for the embedded-fallback case. Fixed (3):
Tests: passed Decision points
Next steps:
|
|
🤖 Finished Review · ✅ Success · Started 6:21 AM UTC · Completed 6:32 AM UTC |
|
🤖 Finished Retro · ✅ Success · Started 6:48 AM UTC · Completed 7:03 AM UTC |
Retro: PR #5763 — fix(#5761): resolve source dir before dry-run outputTimeline
What went well
Rework analysis2 fix-review cycles were needed (3 commits). Two root causes:
Evidence for existing issues (proposals skipped)
Autonomy observationsThe review agent's findings were all legitimate — the human reviewer added no findings the agent missed. The human's value was orchestration (triggering fixes) and judgment (overriding the fix agent's disagreement). Positive signal for review autonomy on CLI bug-fix PRs with doc updates. Other notesE2E failure on Aug 2 (run) was flaky — test infrastructure issue in Proposals filed
|
Keep early source-dir resolution for dry-run from fullsend-ai#5763 and deploy-commit stamping from this branch; retain both sets of deploy tests. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
CLI reference pages under docs/cli/ are manually maintained and silently drift when flag help text, defaults, or behavior change in internal/cli/. PR #5763 demonstrated this: the code agent updated a flag's help text but missed the corresponding docs, requiring a review-fix cycle. Add a bullet to AGENTS.md's "How to work in this repo" section instructing contributors to update docs/cli/ and search docs/guides/ when modifying CLI flags. This follows the same pattern as the interface documentation sync rule added in #5307. Closes #5848
Summary
Fixes
mint deploy --dry-runreporting "embedded" source when the actual deploy would use the checkout path. MovessourceDirdefault resolution before the dry-run block in both GCP and Cloudflare deploy functions. Updates--source-dirflag help text to describe the actual defaulting behavior.Related Issue
Closes #5761
Changes
sourceDirdefault resolution (DefaultFunctionSourceDir/DefaultWorkerSourceDir) to before the dry-run early return inrunMintDeployGCPandrunMintDeployCloudflaresourceDirvalue (no more conditional embedded vs explicit path)--source-dirflag usage text from(default: embedded)to(default: checkout path when present, embedded otherwise)--source-dirvalues are displayed correctlyTesting
go test ./internal/cli/... -run TestMint)--source-dirvalues are shown correctly in dry-run outputChecklist
!for breaking changes)Closes #5761
Post-script verification
agent/5761-fix-dryrun-source-dir)2843dc797bbd8b74d72b5984023aa216db73c147..HEAD)