Skip to content

feat(repos): add mint verification pre-flight to repos upgrade - #5596

Merged
ggallen merged 2 commits into
mainfrom
agent/5594-upgrade-mint-preflight
Jul 25, 2026
Merged

feat(repos): add mint verification pre-flight to repos upgrade#5596
ggallen merged 2 commits into
mainfrom
agent/5594-upgrade-mint-preflight

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

repos upgrade now runs a mint verification pre-flight step before upgrading any repos. If the mint deployment URL doesn't match the manifest, the upgrade fails with a clear error. Add --skip-mint-check flag to bypass when needed.

Related Issue

Closes #5594

Changes

  • Add skipMintCheck field and --skip-mint-check flag to reposUpgradeConfig (mirrors repos install)
  • Add testProvisioner field for test overrides (follows existing pattern)
  • Add mint verification step in runReposUpgrade before the upgrade loop: creates a provisioner, calls repos.UpgradeMint, and fails early on mismatch
  • repos upgrade-mint remains unchanged as a standalone command
  • Add 4 new tests: mint mismatch blocks upgrade, --skip-mint-check bypasses, mint pass then upgrade proceeds, mint check runs during dry-run
  • Update existing upgrade tests with skipMintCheck: true to avoid live GCF calls

Testing

  • go test -race ./internal/cli/... passes (all repos-related tests)
  • go test -race ./internal/repos/... passes
  • go vet ./internal/cli/... passes
  • gitlint --commit HEAD passes
  • Tests added for new mint pre-flight behavior

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • I wrote this contribution myself and can explain all changes in it

Closes #5594

Post-script verification

  • Branch is not main/master (agent/5594-upgrade-mint-preflight)
  • Secret scan passed (gitleaks — 63d6e214ad06b46b64bcf8b73926184a6fb3c53c..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner July 25, 2026 15:16
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Jul 25, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 25, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 3:17 PM UTC · Completed 3:31 PM UTC
Commit: 7d28622 · View workflow run →

@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown

Site preview

Preview: https://2b4b14fc-site.fullsend-ai.workers.dev

Commit: c2cf96bcdb2242d74db62aad8836ee9dd27fafa1

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review

All prior review findings have been addressed. The plan document guidance (docs/plans/repos-management.md) has been updated to reflect that repos upgrade now runs mint verification automatically, and the ADR annotation approach was adopted for docs/ADRs/0057-repos-management.md. The code changes remain clean, well-tested, and consistent with established codebase patterns.

Findings

Low

  • [documentation-inconsistency] docs/ADRs/0057-repos-management.md:76 — The command table in the Decision section describes repos upgrade as "Upgrade scaffold shim ref across repos" while other documentation tables (docs/cli/repos.md:21, docs/guides/getting-started/operations.md:88) were updated in this PR to "Verify mint deployment then upgrade scaffold shim ref across repos." A Note block was added after the table explaining the pre-flight behavior, but the table entry itself was not updated to match.
    Remediation: Update the table entry to match the other tables, or note why the ADR Decision section table description was intentionally kept brief since the annotation below provides the detail.
Previous run

Review

All prior review findings have been addressed: the CLI reference tree in cli-internals.md now includes --skip-mint-check, and the command summary table in repos.md has been updated. The code changes remain clean, well-tested, and consistent with established codebase patterns.

Findings

Medium

  • [docs-currency] docs/plans/repos-management.md:247 — The plan document states "Run before repos upgrade to confirm the mint is reachable and correctly configured" for repos upgrade-mint, but this guidance is now stale. repos upgrade runs mint verification automatically as a pre-flight check (unless --skip-mint-check is set). The upgrade-mint command remains available for standalone verification but is no longer a prerequisite.
    Remediation: Update the guidance to reflect that repos upgrade now includes automatic mint verification.

Low

  • [documentation-staleness] docs/ADRs/0057-repos-management.md:76 — The command description table in the Decision section is modified to reflect the new pre-flight behavior ("Verify mint deployment then upgrade..."). While the change is minor (five words added to one table cell), ADR contributing guidelines recommend annotations over content changes in the Decision section.
    Remediation: Consider adding an annotation block after the table noting the pre-flight enhancement was added in this PR.
Previous run (2)

Review

All four prior review findings have been addressed: the PR title now uses feat(repos):, the CLI Long description for upgrade-mint has been updated, and both operations.md and ADR 0057 have been updated to reflect the mint verification behavior.

Findings

Medium

  • [docs-currency] docs/guides/dev/cli-internals.md:90 — The CLI reference tree is missing the new --skip-mint-check flag under the repos upgrade command. The flag list at lines 91–96 enumerates all other upgrade flags (--manifest, --ref, --dry-run, --force, --direct, --concurrency) but does not include --skip-mint-check. This file was not updated in this PR.
    Remediation: Add a line for --skip-mint-check in the flag list under repos upgrade.

Low

  • [docs-currency] docs/cli/repos.md:20 — The command summary table at the top describes repos upgrade as "Upgrade scaffold shim ref across repos" without mentioning mint verification. The detailed ## repos upgrade section (line 323) was updated correctly. The summary table follows an intentionally terse style, but this description is now inconsistent with the updated descriptions in operations.md and ADR 0057.
    Remediation: Consider updating to "Verify mint deployment then upgrade scaffold shim ref across repos".
Previous run (3)

Review

The code changes are clean, well-tested, and follow established codebase patterns. The mint verification pre-flight reuses repos.UpgradeMint() and mirrors the existing repos install pattern for --skip-mint-check. All four new tests cover the key scenarios, existing tests are correctly updated with skipMintCheck: true, and the prior docs-currency findings have been addressed by updating docs/cli/repos.md.

Findings

Medium

  • [docs-currency] docs/guides/getting-started/operations.md:88 — The command reference table describes repos upgrade as "Upgrade scaffold shim ref across manifest repos" but does not mention the new mint verification pre-flight check that now runs automatically before upgrading (unless --skip-mint-check is set).
    Remediation: Update the repos upgrade description to mention automatic mint verification.

  • [commit-convention-violation] PR title uses feat(#5594) but should use feat(repos). Per COMMITS.md, the scope should identify the subsystem — the (#NNNN) scope pattern is specifically for bug fixes. Since this is a feature, the scope should be the subsystem (repos). This matters because GoReleaser uses PR titles to build release notes.
    Remediation: Change PR title to feat(repos): add mint verification pre-flight to repos upgrade.

Low

  • [stale-reference] internal/cli/repos.go:1422 — The cobra Long description for upgrade-mint still says "Run this before 'repos upgrade' to ensure mint compatibility." This is now misleading since repos upgrade runs mint verification automatically.
    Remediation: Update the Long description to match the docs wording.

  • [docs-currency] docs/ADRs/0057-repos-management.md:76 — The command purpose table lists repos upgrade as "Upgrade scaffold shim ref across repos" without mentioning the new mint verification pre-flight.
    Remediation: Consider adding a note about the pre-flight check if the ADR status permits amendments.


Review

The code changes are clean, well-tested, and follow established codebase patterns exactly. The mint verification pre-flight reuses repos.UpgradeMint() (a read-only verification function) and mirrors the existing repos install pattern for --skip-mint-check. All four new tests cover the key scenarios, and existing tests are correctly updated with skipMintCheck: true to avoid live GCF calls.

The documentation has not been updated to reflect the new behavior.

Findings

Medium

  • [docs-currency] docs/cli/repos.md:337 — The repos upgrade flags table does not include the new --skip-mint-check flag.
    Remediation: Add a row to the flags table.

  • [docs-currency] docs/cli/repos.md:324 — The repos upgrade command description does not mention the new mint verification pre-flight behavior.
    Remediation: Add a sentence noting that repos upgrade now verifies the mint deployment before proceeding.

  • [docs-currency] docs/cli/repos.md:360 — The repos upgrade-mint section says "Run this before repos upgrade to ensure mint compatibility." This guidance is now stale.
    Remediation: Update to note that repos upgrade now includes automatic mint verification.

Low

  • [type-prefix-mismatch] The PR title uses feat(#5594) while the issue title uses fix(repos). Per COMMITS.md, feat is appropriate since --skip-mint-check is a new user-facing CLI flag. No action needed.

Labels: PR modifies repos upgrade command (install/upgrade area) and adds mint verification pre-flight

Previous run (4)

Review

The code changes are clean, well-tested, and follow established codebase patterns. The mint verification pre-flight reuses repos.UpgradeMint() and mirrors the existing repos install pattern for --skip-mint-check. All four new tests cover the key scenarios, existing tests are correctly updated with skipMintCheck: true, and the prior docs-currency findings have been addressed by updating docs/cli/repos.md.

Findings

Medium

  • [docs-currency] docs/guides/getting-started/operations.md:88 — The command reference table describes repos upgrade as "Upgrade scaffold shim ref across manifest repos" but does not mention the new mint verification pre-flight check that now runs automatically before upgrading (unless --skip-mint-check is set).
    Remediation: Update the repos upgrade description to mention automatic mint verification.

  • [commit-convention-violation] PR title uses feat(#5594) but should use feat(repos). Per COMMITS.md, the scope should identify the subsystem — the (#NNNN) scope pattern is specifically for bug fixes ("When fixing a specific issue, prefer the issue number as scope: fix(#123)"). Since this is a feature, the scope should be the subsystem (repos). This matters because GoReleaser uses PR titles to build release notes — feat(#5594) is less informative to end users than feat(repos).
    Remediation: Change PR title to feat(repos): add mint verification pre-flight to repos upgrade.

Low

  • [stale-reference] internal/cli/repos.go:1422 — The cobra Long description for upgrade-mint still says "Run this before 'repos upgrade' to ensure mint compatibility." This is now misleading since repos upgrade runs mint verification automatically. The docs/cli/repos.md was updated to reflect this but the CLI help text was not.
    Remediation: Update the Long description to match the docs wording.

  • [docs-currency] docs/ADRs/0057-repos-management.md:76 — The command purpose table lists repos upgrade as "Upgrade scaffold shim ref across repos" without mentioning the new mint verification pre-flight. (Low because ADRs are architectural decision records, not live CLI references — they document the design decision, not current behavior.)
    Remediation: Consider adding a note about the pre-flight check if the ADR status permits amendments.

Previous run (5)

Review

The code changes are clean, well-tested, and follow established codebase patterns exactly. The mint verification pre-flight reuses repos.UpgradeMint() (a read-only verification function) and mirrors the existing repos install pattern for --skip-mint-check. All four new tests cover the key scenarios, and existing tests are correctly updated with skipMintCheck: true to avoid live GCF calls.

The documentation has not been updated to reflect the new behavior.

Findings

Medium

  • [docs-currency] docs/cli/repos.md:337 — The repos upgrade flags table does not include the new --skip-mint-check flag. Users will not discover the bypass option from the CLI reference.
    Remediation: Add a row to the flags table: | --skip-mint-check | | false | Skip mint URL verification before upgrading repos |

  • [docs-currency] docs/cli/repos.md:324 — The repos upgrade command description does not mention the new mint verification pre-flight behavior. The description still only covers scaffold ref upgrades.
    Remediation: Add a sentence noting that repos upgrade now verifies the mint deployment before proceeding, unless --skip-mint-check is set.

  • [docs-currency] docs/cli/repos.md:360 — The repos upgrade-mint section says "Run this before repos upgrade to ensure mint compatibility." This guidance is now stale — repos upgrade runs mint verification automatically as a pre-flight check.
    Remediation: Update to note that repos upgrade now includes automatic mint verification, and upgrade-mint remains available for standalone verification.

Low

  • [type-prefix-mismatch] The PR title uses feat(#5594) while the issue title uses fix(repos). The issue labels include type/feature, which aligns with the PR title. Per COMMITS.md, feat is appropriate since --skip-mint-check is a new user-facing CLI flag. No action needed — the PR title is correct.

Labels: PR modifies repos upgrade command (install/upgrade area) and adds mint verification pre-flight

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment component/install CLI install and app setup component/mint Token mint and cross-boundary credentials labels Jul 25, 2026
@ggallen
ggallen force-pushed the agent/5594-upgrade-mint-preflight branch from 7d28622 to 1bb1201 Compare July 25, 2026 16:29
@ggallen

ggallen commented Jul 25, 2026

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 25, 2026

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Started 4:40 PM UTC · Ended 4:46 PM UTC
Commit: 1bb1201 · View workflow run →

@ggallen
ggallen force-pushed the agent/5594-upgrade-mint-preflight branch from 1bb1201 to 4b6973c Compare July 25, 2026 16:45
@ggallen

ggallen commented Jul 25, 2026

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 25, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 4:48 PM UTC · Completed 5:02 PM UTC
Commit: 4b6973c · View workflow run →

fullsend-ai-review[bot]

This comment was marked as outdated.

@ggallen ggallen changed the title feat(#5594): add mint verification pre-flight to repos upgrade feat(repos): add mint verification pre-flight to repos upgrade Jul 25, 2026
@ggallen
ggallen force-pushed the agent/5594-upgrade-mint-preflight branch from 4b6973c to a4beacf Compare July 25, 2026 17:04
@ggallen

ggallen commented Jul 25, 2026

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 25, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 5:06 PM UTC · Completed 5:23 PM UTC
Commit: a4beacf · View workflow run →

fullsend-ai-review[bot]

This comment was marked as outdated.

@ggallen
ggallen force-pushed the agent/5594-upgrade-mint-preflight branch from a4beacf to eb2c5c5 Compare July 25, 2026 17:24
@ggallen

ggallen commented Jul 25, 2026

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 25, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 5:26 PM UTC · Completed 5:41 PM UTC
Commit: eb2c5c5 · View workflow run →

fullsend-ai-review[bot]

This comment was marked as outdated.

Signed-off-by: Greg Allen <gallen@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Greg Allen <gallen@redhat.com>
@ggallen
ggallen force-pushed the agent/5594-upgrade-mint-preflight branch from eb2c5c5 to 3424b98 Compare July 25, 2026 17:44
@ggallen

ggallen commented Jul 25, 2026

Copy link
Copy Markdown
Member

/fs-review

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 25, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 5:46 PM UTC · Completed 5:59 PM UTC
Commit: 3424b98 · View workflow run →

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: The following inline comments could not be posted on the diff (GitHub returned 422) and are included here instead:

  • docs/ADRs/0057-repos-management.md (file-level): Line 76 · [low] documentation-inconsistency

The command table in the Decision section describes repos upgrade as "Upgrade scaffold shim ref across repos" while other documentation tables (docs/cli/repos.md:21, docs/guides/getting-started/operations.md:88) were updated in this PR to "Verify mint deployment then upgrade scaffold shim ref across repos." A Note block was added after the table explaining the pre-flight behavior, but the table entry itself was not updated to match.

Suggested fix: Update the table entry to match the other tables, or note why the ADR Decision section table description was intentionally kept brief since the annotation below provides the detail.

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge and removed requires-manual-review Review requires human judgment labels Jul 25, 2026
@ggallen
ggallen enabled auto-merge July 25, 2026 18:09
@ggallen
ggallen added this pull request to the merge queue Jul 25, 2026
Merged via the queue into main with commit 1efdfa4 Jul 25, 2026
14 checks passed
@ggallen
ggallen deleted the agent/5594-upgrade-mint-preflight branch July 25, 2026 18:27
@fullsend-ai-retro

fullsend-ai-retro Bot commented Jul 25, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 6:29 PM UTC · Completed 6:38 PM UTC
Commit: c2cf96b · View workflow run →

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #5596 — mint verification pre-flight for repos upgrade

Timeline

Time (UTC) Event
14:49 ggallen files issue #5594
14:51–14:55 Triage agent runs, reclassifies bug→feature, provides technical guidance (no docs scope)
15:04 ggallen adds ready-to-code
15:05–15:16 Code agent runs, produces PR #5596 — clean code, 4 new tests, zero documentation updates
15:17–15:31 Review 1 (auto): 3 medium docs-currency in repos.md
16:29–16:45 ggallen force-pushes twice to fix repos.md
16:40–16:46 Review 2: cancelled (force-push during run)
16:48–17:02 Review 3: 2 new medium (operations.md, PR title convention) + 2 new low (CLI help text, ADR)
17:04 ggallen force-pushes, renames PR title
17:06–17:23 Review 4: 1 new medium (cli-internals.md missing flag) + 1 new low (repos.md summary table)
17:24 ggallen force-pushes
17:26–17:41 Review 5: 1 new medium (plans doc stale) + 1 low (ADR edit approach wrong)
17:44 ggallen force-pushes (reverts ADR inline edit, adds annotation)
17:46–17:59 Review 6: APPROVED with 1 informational low
18:04 ggallen approves
18:27 PR merged

Key observations

1. Code was clean from the start; all iteration was documentation. Every review noted the code was "clean, well-tested, and follows established codebase patterns." The 5 review rounds and ~2.5 hours of rework were entirely spent catching stale documentation across 7 locations.

2. Whack-a-mole review pattern. The review agent discovered documentation gaps in new files each round rather than surfacing all of them at once: repos.mdoperations.md + ADR + CLI help text → cli-internals.md + summary table → plans/repos-management.md + ADR approach. A comprehensive first-pass scan would have reduced the cycle from 5 rounds to 1–2.

3. Triage omitted documentation scope entirely. The triage summary gave excellent technical guidance for the code change but listed zero documentation files. The code agent had no hint that repos upgrade was referenced in 5+ documentation locations.

4. No fix agent was dispatched. All 4 force-pushes were manual fixes by ggallen. The human spent ~2.5 hours in a tight review-fix-retrigger loop.

5. Autonomy readiness is high. The human reviewer made zero independent findings — every fix was a direct response to an agent-identified issue. The agent drove the entire substantive review. The human's role was purely supervisory: triggering re-reviews, confirming fixes, and merging.

Existing issues this retro provides evidence for

  • #1733 (code agent proactive docs): This PR is a textbook case — 229 lines of feature code with zero doc updates, causing 5 review iterations. The code agent produced clean code but needed 5 rounds of review feedback to cover all 7 documentation locations.
  • #1061 and #3932 (review agent single-pass docs scanning): The review agent found stale docs in repos.md first, then operations.md next round, then cli-internals.md, then plans/repos-management.md — 4 files across 4 separate rounds. A single-pass grep-based scan when the first staleness is detected would have surfaced all 7 locations immediately.
  • #1616 (review agent flags missing CLI docs as medium): The review agent correctly flagged docs-currency issues as medium severity, which drove the fix cycle. This PR validates that policy.

Proposals filed

RaphaelBut pushed a commit to RaphaelBut/fullsend that referenced this pull request Aug 20, 2026
Contributors updating CLI command behavior had no way to discover all
documentation locations for a given command group — PR fullsend-ai#5596 needed 5
review iterations for this reason. Add docs/contributing/documentation.md
mapping the 7 major command groups to their doc touchpoints, plus a
general grep-based discovery rule for minor commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Shai Revivo <srevivo@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/install CLI install and app setup component/mint Token mint and cross-boundary credentials ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(repos): upgrade should verify mint before upgrading

1 participant