What happened
Renovate opened PR #2854 to bump functions-framework-go from v1.9.0 to v1.9.2 in internal/mint/go.mod. CI ran make lint-all which executes pre-commit run --all-files. The lint-mint-embed-sync hook detected that internal/mint/go.mod and go.sum differ from their .embed counterparts in internal/dispatch/gcf/mintsrc/, printing two DESYNC errors. The PR has been open since 2026-07-01 with auto-merge enabled but blocked by this CI failure. No human or agent review occurred because CI never passed.
What could go better
The repo has hack/lint-mint-embed-sync to detect desync but no companion script to fix it. The AGENTS.md documents a manual copy process for syncing these files. This means any change to internal/mint/ — whether from Renovate, a code agent, or a human — requires manual knowledge of the embed sync requirement. A fixer script would enable automation (Renovate postUpgradeTasks, pre-commit auto-fix hooks) and reduce the cognitive burden on contributors.
Proposed change
Create hack/sync-mint-embed that performs the inverse of the lint script:
- For each non-test file in
internal/mint/, copy it to internal/dispatch/gcf/mintsrc/<name>.embed. For go.mod, apply the replace-directive rewrite (=> ../mintcore → => ./mintcore) before writing.
- For each non-test file in
internal/mintcore/, copy it to internal/dispatch/gcf/mintsrc/mintcore/<name>.embed.
- Add a Makefile target
sync-mint-embed: hack/sync-mint-embed.
The logic should mirror hack/lint-mint-embed-sync exactly (same file iteration, same go.mod special case, same test-file exclusion) to guarantee that running sync followed by lint always succeeds.
Validation criteria
Running hack/sync-mint-embed && hack/lint-mint-embed-sync exits 0 after any modification to files in internal/mint/ or internal/mintcore/. Verify by modifying internal/mint/go.mod and confirming the sync script updates internal/dispatch/gcf/mintsrc/go.mod.embed with the correct replace-directive rewrite.
Generated by retro agent from #2854
What happened
Renovate opened PR #2854 to bump
functions-framework-gofrom v1.9.0 to v1.9.2 ininternal/mint/go.mod. CI ranmake lint-allwhich executespre-commit run --all-files. Thelint-mint-embed-synchook detected thatinternal/mint/go.modandgo.sumdiffer from their.embedcounterparts ininternal/dispatch/gcf/mintsrc/, printing two DESYNC errors. The PR has been open since 2026-07-01 with auto-merge enabled but blocked by this CI failure. No human or agent review occurred because CI never passed.What could go better
The repo has
hack/lint-mint-embed-syncto detect desync but no companion script to fix it. The AGENTS.md documents a manual copy process for syncing these files. This means any change tointernal/mint/— whether from Renovate, a code agent, or a human — requires manual knowledge of the embed sync requirement. A fixer script would enable automation (Renovate postUpgradeTasks, pre-commit auto-fix hooks) and reduce the cognitive burden on contributors.Proposed change
Create
hack/sync-mint-embedthat performs the inverse of the lint script:internal/mint/, copy it tointernal/dispatch/gcf/mintsrc/<name>.embed. Forgo.mod, apply the replace-directive rewrite (=> ../mintcore→=> ./mintcore) before writing.internal/mintcore/, copy it tointernal/dispatch/gcf/mintsrc/mintcore/<name>.embed.sync-mint-embed: hack/sync-mint-embed.The logic should mirror
hack/lint-mint-embed-syncexactly (same file iteration, samego.modspecial case, same test-file exclusion) to guarantee that running sync followed by lint always succeeds.Validation criteria
Running
hack/sync-mint-embed && hack/lint-mint-embed-syncexits 0 after any modification to files ininternal/mint/orinternal/mintcore/. Verify by modifyinginternal/mint/go.modand confirming the sync script updatesinternal/dispatch/gcf/mintsrc/go.mod.embedwith the correct replace-directive rewrite.Generated by retro agent from #2854