Skip to content

ci: add gofmt enforcement and mint embed sync checks#1714

Merged
rh-hemartin merged 8 commits into
fullsend-ai:mainfrom
jhutar:1-gofmt
Jun 15, 2026
Merged

ci: add gofmt enforcement and mint embed sync checks#1714
rh-hemartin merged 8 commits into
fullsend-ai:mainfrom
jhutar:1-gofmt

Conversation

@jhutar

@jhutar jhutar commented May 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Run gofmt across all Go source files, fixing 18 formatting violations (including the switch role{ regression from feat(appsetup): add retro agent app configuration #828)
  • Add gofmt pre-commit hook that fails on unformatted Go files
  • Add lint-mint-embed-sync pre-commit hook that detects drift between internal/mint/ source files and their .embed copies in internal/dispatch/gcf/mintsrc/

Closes #960

Test plan

  • gofmt -l . returns empty after formatting
  • pre-commit run go-fmt --all-files passes clean
  • pre-commit run go-fmt fails when a gofmt violation is introduced
  • pre-commit run lint-mint-embed-sync --all-files passes clean
  • pre-commit run lint-mint-embed-sync fails when embed copy diverges from source
  • go vet ./... passes

🤖 Generated with Claude Code

@fullsend-ai-review

fullsend-ai-review Bot commented May 31, 2026

Copy link
Copy Markdown

Review

Findings

Medium

  • [protected-path] .pre-commit-config.yaml — This file is under a protected path requiring human approval. The PR links to issue Add gofmt check to pre-commit hooks or CI lint target #960 and explains the rationale for adding go-fmt and lint-mint-embed-sync hooks. Human approval is always required for protected-path changes regardless of context.

Low

  • [edge-case] hack/lint-mint-embed-sync:17 — The script only iterates source files (SRC → DST direction), so orphaned .embed files in the destination that no longer have a corresponding source file will not be detected. If a source file is deleted from internal/mint/ or internal/mintcore/, the stale .embed copy persists undetected.

  • [error-handling] hack/lint-mint-embed-sync:25 — The temp file created by mktemp for the go.mod special case is not cleaned up via a trap. If the script exits unexpectedly between mktemp and rm, the temp file leaks in /tmp. Consider adding trap 'rm -f "$ff"' EXIT or similar.

Info

  • [scope-creep] hack/lint-mint-embed-sync — The lint-mint-embed-sync pre-commit hook is not mentioned in the authorizing issue Add gofmt check to pre-commit hooks or CI lint target #960, which specifically requested gofmt enforcement. The hook addresses deployment correctness rather than CI formatting enforcement. However, it aligns well with CLAUDE.md's documented requirement that mint source and embed files "must stay in sync," follows the established pattern of custom lint hooks, and the PR title is transparent about including both concerns.

  • [pattern-inconsistency] hack/lint-mint-embed-sync — The script uses a custom DESYNC: prefix and bare echo for output. Some lint scripts in hack/ use error()/success() helper functions, but not all (lint-workflow-size also uses bare echo), so the inconsistency is not uniform across the codebase.

Previous run

Review

Findings

Medium

  • [protected-path] .pre-commit-config.yaml — This file is under a protected path requiring human approval. The PR links to issue Add gofmt check to pre-commit hooks or CI lint target #960 and explains the rationale for adding go-fmt and lint-mint-embed-sync hooks. Human approval is always required for protected-path changes regardless of context.

Low

  • [edge-case] hack/lint-mint-embed-sync:17 — The script only iterates source files (SRC → DST direction), so orphaned .embed files in the destination that no longer have a corresponding source file will not be detected. If a source file is deleted from internal/mint/ or internal/mintcore/, the stale .embed copy persists undetected.

  • [error-handling] hack/lint-mint-embed-sync:25 — The temp file created by mktemp for the go.mod special case is not cleaned up via a trap. If the script exits unexpectedly between mktemp and rm, the temp file leaks in /tmp. Consider adding trap 'rm -f "$ff"' EXIT or similar.

Info

  • [scope-creep] hack/lint-mint-embed-sync — The lint-mint-embed-sync pre-commit hook is not mentioned in the authorizing issue Add gofmt check to pre-commit hooks or CI lint target #960, which specifically requested gofmt enforcement. The hook addresses deployment correctness rather than CI formatting enforcement. However, it aligns well with CLAUDE.md's documented requirement that mint source and embed files "must stay in sync," follows the established pattern of custom lint hooks, and the PR title is transparent about including both concerns.

  • [pattern-inconsistency] hack/lint-mint-embed-sync — The script uses a custom DESYNC: prefix and bare echo for output. Some lint scripts in hack/ use error()/success() helper functions, but not all (lint-workflow-size also uses bare echo), so the inconsistency is not uniform across the codebase.

Previous run (2)

Review

Findings

Medium

  • [protected-path] .pre-commit-config.yaml — This file is under a protected path requiring human approval. The PR links to issue Add gofmt check to pre-commit hooks or CI lint target #960 and explains the rationale for adding go-fmt and lint-mint-embed-sync hooks. Human approval is always required for protected-path changes regardless of context.

Low

  • [scope-creep] hack/lint-mint-embed-sync — The lint-mint-embed-sync pre-commit hook is not mentioned in the authorizing issue Add gofmt check to pre-commit hooks or CI lint target #960, which specifically requested gofmt enforcement. The hook addresses deployment correctness rather than CI formatting enforcement. However, it aligns well with CLAUDE.md's documented requirement that mint source and embed files "must stay in sync," follows the established pattern of custom lint hooks, and the PR title is transparent about including both concerns.

  • [edge-case] hack/lint-mint-embed-sync:17 — The script only iterates source files (SRC → DST direction), so orphaned .embed files in the destination that no longer have a corresponding source file will not be detected. If a source file is deleted from internal/mint/ or internal/mintcore/, the stale .embed copy persists undetected.

  • [error-handling] hack/lint-mint-embed-sync:25 — The temp file created by mktemp for the go.mod special case is not cleaned up via a trap. If the script exits unexpectedly between mktemp and rm, the temp file leaks in /tmp. Consider adding trap 'rm -f "$ff"' EXIT or similar.

Info

  • [pattern-inconsistency] hack/lint-mint-embed-sync — The script uses a custom DESYNC: prefix and bare echo for output. Some lint scripts in hack/ use error()/success() helper functions, but not all (lint-workflow-size also uses bare echo), so the inconsistency is not uniform across the codebase.
Previous run (3)

Review

Findings

Medium

  • [protected-path] .pre-commit-config.yaml — This file is under a protected path requiring human approval. The PR links to issue Add gofmt check to pre-commit hooks or CI lint target #960 and explains the rationale for adding go-fmt and lint-mint-embed-sync hooks. Human approval is always required for protected-path changes regardless of context.

Low

  • [scope-creep] hack/lint-mint-embed-sync — The lint-mint-embed-sync pre-commit hook is not mentioned in the authorizing issue Add gofmt check to pre-commit hooks or CI lint target #960, which specifically requested gofmt enforcement. The hook addresses deployment correctness rather than CI formatting enforcement. However, it aligns well with CLAUDE.md's documented requirement that mint source and embed files "must stay in sync," follows the established pattern of custom lint hooks, and the PR title is transparent about including both concerns.

  • [edge-case] hack/lint-mint-embed-sync:17 — The script only iterates source files (SRC → DST direction), so orphaned .embed files in the destination that no longer have a corresponding source file will not be detected. If a source file is deleted from internal/mint/ or internal/mintcore/, the stale .embed copy persists undetected.

  • [error-handling] hack/lint-mint-embed-sync:25 — The temp file created by mktemp for the go.mod special case is not cleaned up via a trap. If the script exits unexpectedly between mktemp and rm, the temp file leaks in /tmp. Consider adding trap 'rm -f "$ff"' EXIT or similar.

Info

  • [pattern-inconsistency] hack/lint-mint-embed-sync — The script uses a custom DESYNC: prefix and bare echo for output. Some lint scripts in hack/ use error()/success() helper functions, but not all (lint-workflow-size also uses bare echo), so the inconsistency is not uniform across the codebase.
Previous run (4)

Review

Findings

Medium

  • [protected-path] .pre-commit-config.yaml — This file is under a protected path requiring human approval. The PR links to issue Add gofmt check to pre-commit hooks or CI lint target #960 and explains the rationale for adding go-fmt and lint-mint-embed-sync hooks. Human approval is always required for protected-path changes regardless of context.

  • [scope-creep] hack/lint-mint-embed-sync — The lint-mint-embed-sync pre-commit hook is not mentioned in the authorizing issue Add gofmt check to pre-commit hooks or CI lint target #960, which specifically requested gofmt enforcement. The mint/embed sync hook addresses a different problem area (deployment correctness) than the authorized work (CI formatting enforcement). CONTRIBUTING.md advises keeping PRs focused to one problem area. That said, the hook aligns well with CLAUDE.md's documented requirement that mint source and embed files "must stay in sync," and follows the established pattern of adding custom lint hooks for documented requirements.

Low

  • [edge-case] hack/lint-mint-embed-sync:17 — The script only iterates source files (SRC → DST), so it will not detect orphaned .embed files in the destination that no longer have a corresponding source file. If a source file is deleted from internal/mint/ or internal/mintcore/, the stale .embed copy will persist undetected. Consider adding a reverse loop over DST/*.embed files to check each has a corresponding source.

  • [pattern-inconsistency] hack/lint-mint-embed-sync — The script uses a custom DESYNC: prefix and bare echo for output instead of the error()/success() helper functions used consistently across other lint scripts in hack/ (lint-adr-status, lint-adr-numbers, lint-broken-symlinks). Consider adding the standard helpers for consistency.

Previous run (5)

Review

Findings

Medium

  • [protected-path] .pre-commit-config.yaml — This file is under a protected path requiring human approval. The PR links to issue Add gofmt check to pre-commit hooks or CI lint target #960 and explains the rationale for adding go-fmt and lint-mint-embed-sync hooks. Human approval is always required for protected-path changes regardless of context.

  • [scope-creep] hack/lint-mint-embed-sync — The lint-mint-embed-sync pre-commit hook is not mentioned in the authorizing issue Add gofmt check to pre-commit hooks or CI lint target #960, which specifically requested gofmt enforcement. The mint/embed sync hook addresses a different problem area (deployment correctness) than the authorized work (CI formatting enforcement). CONTRIBUTING.md advises keeping PRs focused to one problem area. That said, the hook aligns well with CLAUDE.md's documented requirement that mint source and embed files "must stay in sync," and follows the established pattern of adding custom lint hooks for documented requirements.

Low

  • [edge-case] hack/lint-mint-embed-sync:17 — The script only iterates source files (SRC → DST), so it will not detect orphaned .embed files in the destination that no longer have a corresponding source file. If a source file is deleted from internal/mint/ or internal/mintcore/, the stale .embed copy will persist undetected. Consider adding a reverse loop over DST/*.embed files to check each has a corresponding source.

  • [pattern-inconsistency] hack/lint-mint-embed-sync — The script uses a custom DESYNC: prefix and bare echo for output instead of the error()/success() helper functions used consistently across all other lint scripts in hack/ (lint-adr-status, lint-adr-numbers, lint-broken-symlinks, lint-workflow-size, lint-agent-docs). Consider adding the standard helpers for consistency.

Previous run (6)

Review

Findings

High

  • [logic-error] hack/lint-mint-embed-sync:16 — Script only iterates over internal/mint/* files but the documented mint/embed sync requirement (CLAUDE.md) also covers internal/mintcore/ files. The existing Go test in provisioner_test.go (lines 1596–1609) checks both internal/mint/ and internal/mintcore/ directories, but this pre-commit hook misses mintcore entirely. A developer modifying e.g. internal/mintcore/handler.go would get a clean pass from this hook despite the embed copy being out of sync.
    Remediation: Add a second loop over $REPO_ROOT/internal/mintcore/ that compares each non-test .go file (plus go.mod and go.sum) against $DST/mintcore/$name.embed. Also update the pre-commit files pattern to include ^internal/mintcore/.

Medium

  • [logic-error] .pre-commit-config.yaml:95 — The files trigger pattern ^(internal/mint/|internal/dispatch/gcf/mintsrc/) does not include ^internal/mintcore/. Even if the script is fixed to check mintcore files, the hook will not trigger when a file in internal/mintcore/ is modified. See also: [logic-error] finding at hack/lint-mint-embed-sync:16.
    Remediation: Expand the files pattern to ^(internal/mint/|internal/mintcore/|internal/dispatch/gcf/mintsrc/).

  • [protected-path] .pre-commit-config.yaml — Protected file modified. The PR links to issue Add gofmt check to pre-commit hooks or CI lint target #960 and the description explains the rationale for adding gofmt and mint embed sync hooks. Human approval is always required for protected-path changes regardless of context.

  • [scope-creep] .pre-commit-config.yaml — The lint-mint-embed-sync hook was not authorized by issue Add gofmt check to pre-commit hooks or CI lint target #960, which only covers gofmt enforcement. The extension is architecturally justified by CLAUDE.md's mint/embed sync requirement and follows the pattern of existing hack/lint-* scripts, but it constitutes scope beyond the linked issue's authorization.

Low

  • [resource-leak] hack/lint-mint-embed-sync:24mktemp creates a temporary file for the go.mod sed transformation but it is never cleaned up. Add a trap 'rm -f "$ff"' EXIT or use process substitution to avoid creating a temp file.

  • [naming-convention] hack/lint-mint-embed-sync:30 — Error message uses DESYNC: prefix, diverging from the ERROR:/OK: pattern established by lint-adr-status, lint-adr-numbers, lint-broken-symlinks, and lint-workflow-size which all use error() helper functions.

Info

  • [gofmt-vs-goimports] .pre-commit-config.yaml:80 — Hook uses gofmt -w which formats code but does not enforce import ordering. The diff includes import reordering changes (e.g., internal/cli/admin.go, internal/cli/postreview_test.go), suggesting goimports was used during development. Consider whether goimports should be the enforced tool to also maintain consistent import grouping.
Previous run (7)

Review

Findings

Medium

  • [protected-path] .pre-commit-config.yaml — This PR modifies a protected infrastructure file. The change is well-motivated (linked to Add gofmt check to pre-commit hooks or CI lint target #960, adds gofmt enforcement and mint embed sync hooks) and the rationale is clear, but human approval is always required for protected-path changes regardless of context.

Low

  • [scope-creep] hack/lint-mint-embed-sync — The lint-mint-embed-sync hook is not authorized by issue Add gofmt check to pre-commit hooks or CI lint target #960, which specifically requests gofmt enforcement and fixing the switch role{ violation. The mint embed sync hook enforces a separate CLAUDE.md requirement. The PR title is transparent about including both concerns, and the addition is well-motivated, but it would be cleaner to track this as a separate issue.

  • [edge-case] hack/lint-mint-embed-sync — The script uses cmp -s which suppresses all output including stderr. If a source or embed file is missing entirely (e.g., a new file added to internal/mint/ without a corresponding .embed copy), the user sees a generic "DESYNC" message rather than a "file not found" error. The exit code is still non-zero (safe behavior), but the error message is imprecise. Consider adding explicit existence checks before cmp, or not suppressing stderr.

Info

  • [import-organization] internal/cli/postreview_test.go:9gofmt sorted stdlib imports (io, testing) after third-party imports (testify/assert, testify/require) because they were in a single ungrouped import block with no blank-line separator. This is correct gofmt behavior (alphabetical within a block), but not idiomatic Go style (stdlib and third-party are conventionally separated). A follow-up with goimports would restore conventional grouping across the codebase.
Previous run (8)

Review

Findings

Medium

  • [protected-path] .pre-commit-config.yaml — This PR modifies a protected infrastructure file. The change is well-motivated (linked to Add gofmt check to pre-commit hooks or CI lint target #960, adds gofmt enforcement and mint embed sync hooks) and the rationale is clear, but human approval is always required for protected-path changes regardless of context.

Low

  • [scope-creep] hack/lint-mint-embed-sync — The lint-mint-embed-sync hook is not authorized by issue Add gofmt check to pre-commit hooks or CI lint target #960, which specifically requests gofmt enforcement and fixing the switch role{ violation. The mint embed sync hook enforces a separate CLAUDE.md requirement. The PR title is transparent about including both concerns, and the addition is well-motivated, but it would be cleaner to track this as a separate issue.

  • [edge-case] hack/lint-mint-embed-sync — The script uses cmp -s which suppresses all output including stderr. If a source or embed file is missing entirely (e.g., a new file added to internal/mint/ without a corresponding .embed copy), the user sees a generic "DESYNC" message rather than a "file not found" error. The exit code is still non-zero (safe behavior), but the error message is imprecise. Consider adding explicit existence checks before cmp, or not suppressing stderr.

Info

  • [import-organization] internal/cli/postreview_test.go:4gofmt sorted stdlib imports (io, testing) after third-party imports (testify/assert, testify/require) because they were in a single ungrouped import block with no blank-line separator. This is correct gofmt behavior (alphabetical within a block), but not idiomatic Go style (stdlib and third-party are conventionally separated). A follow-up with goimports would restore conventional grouping across the codebase.
Previous run (9)

Review

Findings

Medium

  • [protected-path] .pre-commit-config.yaml — This PR modifies a protected infrastructure file. The change is well-motivated (linked to Add gofmt check to pre-commit hooks or CI lint target #960, adds gofmt enforcement and mint embed sync hooks) and the rationale is clear, but human approval is always required for protected-path changes regardless of context.

Low

  • [scope-creep] hack/lint-mint-embed-sync — The lint-mint-embed-sync hook is not authorized by issue Add gofmt check to pre-commit hooks or CI lint target #960, which specifically requests gofmt enforcement and fixing the switch role{ violation. The mint embed sync hook enforces a separate CLAUDE.md requirement. The PR title is transparent about including both concerns, and the addition is well-motivated, but it would be cleaner to track this as a separate issue.

  • [edge-case] hack/lint-mint-embed-sync — The script uses cmp -s which suppresses all output including stderr. If a source or embed file is missing entirely (e.g., internal/mint/go.sum), the user sees a generic "DESYNC" message rather than a "file not found" error. The exit code is still non-zero (safe behavior), but the error message is imprecise. Consider adding explicit existence checks or not suppressing stderr.

Info

  • [import-organization] internal/cli/postreview_test.go:4gofmt sorted stdlib imports (io, testing) after third-party imports (testify/assert, testify/require) because they were in a single ungrouped import block with no blank-line separator. This is correct gofmt behavior (alphabetical within a block), but not idiomatic Go style (stdlib and third-party are conventionally separated). A follow-up with goimports would restore conventional grouping across the codebase.
Previous run (10)

Review

Findings

Medium

  • [protected-path] .pre-commit-config.yaml — This PR modifies a protected infrastructure file. The change is well-motivated (linked to Add gofmt check to pre-commit hooks or CI lint target #960, adds gofmt enforcement and mint embed sync hooks) and the rationale is clear, but human approval is always required for protected-path changes regardless of context.

Low

  • [scope-creep] hack/lint-mint-embed-sync — The lint-mint-embed-sync hook is not authorized by issue Add gofmt check to pre-commit hooks or CI lint target #960, which specifically requests gofmt enforcement and fixing the switch role{ violation. The mint embed sync hook enforces a separate CLAUDE.md requirement. The PR title is transparent about including both concerns, and the addition is well-motivated, but it would be cleaner to track this as a separate issue.

  • [edge-case] hack/lint-mint-embed-sync — The script suppresses stderr from diff -q, so if a source or embed file is missing entirely, the user sees a generic "DESYNC" message rather than a "file not found" error. The exit code is still non-zero (safe behavior), but the error message is imprecise. Consider adding explicit existence checks or not suppressing stderr.

Previous run (11)

Review

Findings

Medium

  • [protected-path] .pre-commit-config.yaml — This PR modifies a protected governance file. The change is well-justified (closes Add gofmt check to pre-commit hooks or CI lint target #960, adds gofmt and mint-embed-sync enforcement), but human approval is always required for protected-path changes regardless of context.

Info

  • [style] internal/cli/postreview_test.go:7gofmt sorted stdlib imports (io, testing) into the same block as third-party imports (testify/assert, testify/require) because they were in a single ungrouped import block. This is valid gofmt output but not idiomatic Go style (stdlib and third-party are conventionally separated by a blank line). A follow-up with goimports would restore conventional grouping across the codebase.

@fullsend-ai-review fullsend-ai-review Bot added the requires-manual-review Review requires human judgment label May 31, 2026
Comment thread .pre-commit-config.yaml Outdated
Comment thread .pre-commit-config.yaml Outdated
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

Site preview

Preview: https://728c13bb-site.fullsend-ai.workers.dev

Commit: 7f6d68bae192af63a50c289489454cd73f3ed73e

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment and removed requires-manual-review Review requires human judgment labels Jun 2, 2026
Comment thread hack/lint-mint-embed-sync Outdated

rc=0
for f in main.go go.mod go.sum; do
if ! diff -q "$SRC/$f" "$DST/$f.embed" >/dev/null 2>&1; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can use cmp here which is a little faster.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Hello! Thank you, doing that.

Comment thread hack/lint-mint-embed-sync Outdated
DST="$REPO_ROOT/internal/dispatch/gcf/mintsrc"

rc=0
for f in main.go go.mod go.sum; do

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I thing its dangarous to assume here that no additional files would be added to the mint codebase, we already have PRs in flight that add files

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Hello Barak. Does it mean we should require anything in internal/mint/ that is not "*_test.go" needs to be mirrored to internal/dispatch/gcf/mintsrc/?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hello Barak. Does it mean we should require anything in internal/mint/ that is not "*_test.go" needs to be mirrored to internal/dispatch/gcf/mintsrc/?

probably, yes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thank you. Did that. Please take a look again.

@rh-hemartin rh-hemartin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree with @ifireball comments, but I'm approving as my concerns were covered and he still have @ifireball request for changes.

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment and removed requires-manual-review Review requires human judgment labels Jun 3, 2026
@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment and removed requires-manual-review Review requires human judgment labels Jun 4, 2026
@jhutar jhutar force-pushed the 1-gofmt branch 2 times, most recently from fa7a184 to 4ce766e Compare June 4, 2026 15:04
@jhutar

jhutar commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased due to conflicts.

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment and removed requires-manual-review Review requires human judgment labels Jun 4, 2026
@jhutar jhutar force-pushed the 1-gofmt branch 2 times, most recently from 4ade97e to a4e44e2 Compare June 5, 2026 04:46
@jhutar

jhutar commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased due to conflicts and added workaround for eecac65.

@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.

See the review comment for full details.

Comment thread hack/lint-mint-embed-sync
Comment thread .pre-commit-config.yaml
Comment thread hack/lint-mint-embed-sync
Comment thread hack/lint-mint-embed-sync
Comment thread .pre-commit-config.yaml
@fullsend-ai-review fullsend-ai-review Bot removed the requires-manual-review Review requires human judgment label Jun 5, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Jun 12, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 5:52 AM UTC · Completed 6:00 AM UTC
Commit: cf46b6e · View workflow run →

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment and removed requires-manual-review Review requires human judgment labels Jun 12, 2026

@ralphbean ralphbean left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

jhutar added 8 commits June 13, 2026 13:54
Enforce gofmt formatting via pre-commit so violations fail before
commit. Placed before go-vet in the local hooks section.

Ref fullsend-ai#960

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generated-by: Claude

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

Signed-off-by: Jan Hutar <jhutar@redhat.com>
Let pre-commit pass staged Go files to gofmt instead of scanning the
entire tree. Uses gofmt -w to auto-fix formatting in place.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generated-by: Claude

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED

Signed-off-by: Jan Hutar <jhutar@redhat.com>
Add lint-mint-embed-sync hook that verifies main.go, go.mod, and
go.sum in internal/mint/ match their .embed copies in
internal/dispatch/gcf/mintsrc/. Runs only when either directory
is touched.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generated-by: Claude

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

Signed-off-by: Jan Hutar <jhutar@redhat.com>
cmp -s is faster for byte-level equality checks where we don't need
the actual diff output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generated-by: Claude

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED

Signed-off-by: Jan Hutar <jhutar@redhat.com>
Instead of hardcoding the three files to check, glob all non-test files
in internal/mint/ so newly added files are automatically covered.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generated-by: Claude

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED

Signed-off-by: Jan Hutar <jhutar@redhat.com>
Since commit eecac65 there is intentional difference between
internal/mint/go.mod and internal/dispatch/gcf/mintsrc/go.mod.embed
with replace directive.

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED

Signed-off-by: Jan Hutar <jhutar@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED

Signed-off-by: Jan Hutar <jhutar@redhat.com>
rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED

Signed-off-by: Jan Hutar <jhutar@redhat.com>
@jhutar

jhutar commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased due to conflict

@fullsend-ai-review

fullsend-ai-review Bot commented Jun 13, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 12:04 PM UTC · Completed 12:13 PM UTC
Commit: 7f6d68b · View workflow run →

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment and removed requires-manual-review Review requires human judgment labels Jun 13, 2026
@rh-hemartin

Copy link
Copy Markdown
Member

@jhutar merge it and let's be done with this, it is a pain for you to be rebasing every time 🤣 We can address any concern Barak has after the merge.

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/cli/bootstrap_input.go 50.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@jhutar

jhutar commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

@jhutar merge it and let's be done with this, it is a pain for you to be rebasing every time 🤣 We can address any concern Barak has after the merge.

Hello Hector! Thank you. I do not have permissions to merge. Could you please do it?

@rh-hemartin rh-hemartin dismissed stale reviews from fullsend-ai-review[bot] and ifireball June 15, 2026 07:56

Not relevant.

@rh-hemartin rh-hemartin added this pull request to the merge queue Jun 15, 2026
Merged via the queue into fullsend-ai:main with commit 9ca6edc Jun 15, 2026
12 checks passed
@fullsend-ai-retro

fullsend-ai-retro Bot commented Jun 15, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 8:05 AM UTC · Completed 8:11 AM UTC
Commit: 7f6d68b · View workflow run →

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #1714ci: add gofmt enforcement and mint embed sync checks

Timeline

This PR added gofmt pre-commit hooks and a mint embed drift-detection script. It was open for 15 days (May 31 – June 15) with 8 commits, 11 force pushes (mostly rebases), and 12 review bot runs.

  • May 31–Jun 2: PR opened, human reviewers (rh-hemartin, ifireball) provided actionable feedback on hook design (use native pre-commit filtering, use cmp instead of diff, dynamically discover files).
  • Jun 3–5: Author addressed all feedback. Review bot caught a genuine high-severity logic error (script missed internal/mintcore/ sync) and a medium missing trigger pattern — both were fixed.
  • Jun 5–12: Multiple rebases to resolve conflicts with main. Each rebase triggered a new review bot run. ifireball never formally re-reviewed. ralphbean approved with "LGTM" on Jun 12.
  • Jun 15: Merged after rh-hemartin explicitly said to merge and address remaining concerns post-merge.

Assessment

Review quality was good. The review bot's high-severity finding about missing mintcore/ coverage was genuinely valuable and was fixed. Human reviewers provided solid design feedback (native pre-commit filtering, cmp vs diff, dynamic discovery).

The main waste was 12 review runs for ~2-3 runs' worth of meaningful changes. Most runs were triggered by rebase-only force pushes that didn't change the actual diff. This is a well-known pattern with extensive existing issue coverage:

  • #1287 — Skip or diff-gate re-review when PR changes are rebase-only
  • #1356 — Skip re-review when PR diff is unchanged after rebase/reopen
  • #1422 — Deduplicate review runs on rapid successive rebases
  • #1552 — Pass prior findings to follow-up reviews for targeted verification
  • #1014 — Debounce review dispatch on rapid synchronize events

The 15-day cycle time was driven primarily by human reviewer availability (ifireball's review was never formally resolved) and rebase churn from a busy main branch — not agent issues.

Proposals

No new proposals filed. The primary improvement opportunity (reducing redundant review runs on rebase-only pushes) is already thoroughly covered by at least 6 open issues (#1287, #1356, #1422, #1014, #766, #963). Prioritizing and implementing those existing issues — particularly #1287 and #1356 which are the most directly applicable — would have prevented ~9 of the 12 review runs on this PR.

@jhutar jhutar deleted the 1-gofmt branch June 15, 2026 08:31
@jhutar

jhutar commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

Thank you all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires-manual-review Review requires human judgment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add gofmt check to pre-commit hooks or CI lint target

4 participants