Skip to content

chore(sync): patch in git-author config + bump pin v0.2.5 -> v0.3.1 - #197

Closed
norrietaylor wants to merge 4 commits into
mainfrom
chore/sync-wrapper-add-git-config
Closed

norrietaylor wants to merge 4 commits into
mainfrom
chore/sync-wrapper-add-git-config

Conversation

@norrietaylor

@norrietaylor norrietaylor commented May 7, 2026 •

Copy link
Copy Markdown
Member

Hand-patches the installed sync-wrapper to backport the v0.2.7 fixes from gominimal/min-aw#121. Required to unblock Phase 0b acceptance on this repo.

Why this is needed

The installed .github/workflows/sync-from-source-of-truth.yml (from quick-setup at v0.2.5, refreshed at v0.2.6 via #189) ships with two latent bugs that block any workflow_dispatch of the sync:

  1. Missing git config user.name/user.email — when the wrapper invokes ./sync-workflows.sh, the runner has no git identity; git commit exits 128 with empty ident name. Observed on runs 25524419155 and 25525573086.
  2. Pinned source_ref points at v0.2.5/v0.2.6 — those tags contain a destructive deletion bug in sync-workflows.sh that would delete target-owned *.yml files (ci.yml, promote.yml) and the script's own caller wrappers. Both runs failed at git commit (bug 1, unintended safety net) before the deletion could push.

Both fixed in gominimal/min-aw#121 and shipped in v0.2.7.

What this patch does

  1. Adds a Configure git author for the sync commit step using the canonical 41898282+github-actions[bot]@users.noreply.github.com email so GitHub attributes the synced-workflows commit to the bot.
  2. Bumps the pinned default source_ref from v0.2.5 to v0.2.7 in both places (workflow_dispatch input + in-script fallback). The next sync run pulls the FIXED sync-workflows.sh (.md-only deletion scope), preserving ci.yml, promote.yml, and the caller wrappers.

The historical comments on lines 78/84/86/93 still mention v0.2.5; that's doc-drift, not behavior. Will be cleaned up the next time quick-setup.sh --source-ref v0.2.7 is re-run against this repo (lays down a freshly-substituted wrapper).

Verification (after merge)

gh workflow run sync-from-source-of-truth.yml --repo gominimal/minimal

Expected: pulls workflows/*.md from gominimal/min-aw@v0.2.7; preserves all *.yml files in .github/workflows/; git commit succeeds with the bot identity; opens a PR with the additive .md files.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Improved CI workflow reliability by adding automatic git author configuration so sync commits proceed consistently.
  • Chores

    • Updated the workflow default reference and fallback value to v0.3.1.

Review Change Stack

The installed sync-from-source-of-truth.yml shipped from quick-setup
at v0.2.5 (later refreshed at v0.2.6 via #189). Both versions of the
caller-wrapper template lacked a `git config user.name`/`user.email`
step. When the wrapper invoked `./sync-workflows.sh`, the script's
`git commit` exited 128 with `empty ident name` (observed on runs
25524419155 and 25525573086).

The same v0.2.5/v0.2.6 wrappers also pin v0.2.5 / v0.2.6 source_refs
that contain a destructive deletion bug in sync-workflows.sh
(deletes target-owned `*.yml` files including this repo's `ci.yml`,
`promote.yml`, and the script's own caller wrappers). Both bugs are
fixed in gominimal/min-aw v0.2.7 (PR #121).

This patch backports the v0.2.7 wrapper changes manually:

1. Add the `Configure git author` step using the canonical
   `41898282+github-actions[bot]@users.noreply.github.com` email
   so GitHub attributes the synced-workflows commit to the bot.
2. Bump the pinned `default` source_ref from v0.2.5 to v0.2.7 in
   both the workflow_dispatch input and the in-script fallback,
   so the next scheduled or manual sync run pulls the FIXED
   sync-workflows.sh (with `*.md`-only deletion scope) and
   preserves `ci.yml`, `promote.yml`, and the caller wrappers.

The historical comments on lines 78, 84, 86, 93 still mention v0.2.5;
those are doc-drift, not behavior. They will be cleaned up next time
quick-setup --source-ref v0.2.7 is re-run against this repo, which
will lay down a freshly-substituted wrapper.

## Verification (after merge)

Manual `gh workflow run sync-from-source-of-truth.yml --repo
gominimal/minimal` should:
- Pull workflows/*.md from gominimal/min-aw@v0.2.7
- Preserve ci.yml, promote.yml, sync-from-source-of-truth.yml,
  worker-fix.yml, worker-iterate.yml
- git commit succeeds with the configured bot identity
- Open a PR with only the additive workflow .md files

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e477beb6-dad8-46cd-bd4b-712a3b40ad10

📥 Commits

Reviewing files that changed from the base of the PR and between 14490f7 and 3eca0c1.

📒 Files selected for processing (1)
  • .github/workflows/sync-from-source-of-truth.yml

📝 Walkthrough

Walkthrough

The workflow's source_ref default and the SOURCE_REF fallback were bumped from v0.2.5 to v0.3.1. A new conditional step sets global git user.email and user.name to github-actions[bot] before running the sync script so the sync commit has an author identity.

Changes

Sync Workflow Version and Git Configuration

Layer / File(s) Summary
Workflow Version Defaults
.github/workflows/sync-from-source-of-truth.yml
Workflow workflow_dispatch input source_ref default and the "Set source ref" step fallback updated from v0.2.5 to v0.3.1.
Git Author Configuration
.github/workflows/sync-from-source-of-truth.yml
New conditional step sets global git user.email and user.name to github-actions[bot] before executing sync-workflows.sh.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I nudged the tag to v0.3.1,
Gave commits a name so work is done,
github-actions[bot] signs with cheer,
The sync runs smooth — no author fear,
Hoppity-hop, the workflows run!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically identifies the main changes: adding git-author configuration and bumping the version pin from v0.2.5 to v0.3.1.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/sync-from-source-of-truth.yml (1)

76-94: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update stale operator messaging to match current ref/source semantics.

Line 78 and Line 93 still reference workflow_call / v0.2.5, while runtime now uses workflow_dispatch + v0.2.7. Keeping these strings current will reduce confusion during failure triage.

Suggested text-only patch
-          # 2. workflow_call default (v0.2.5, substituted by quick-setup
+          # 2. workflow_dispatch input default (v0.2.7, substituted by quick-setup
           #    at install time, bumped via PR thereafter)
@@
-          # names (main, master, dev) and the unsubstituted 'v0.2.5'
+          # names (main, master, dev) and the unsubstituted 'v0.2.7'
           # token both fail this check. A separate unsubstituted-token guard
-          # used to live above, but quick-setup.sh substitutes 'v0.2.5'
+          # used to live above, but quick-setup.sh substitutes 'v0.2.7'
           # globally including inside that guard's literal — which made the
           # guard self-rejecting post-substitution. Dropped; the regex below
           # catches the same condition correctly.
@@
-            echo "Got: '${SOURCE_REF}'. Branch names and the unsubstituted 'v0.2.5' token are not accepted." >&2
+            echo "Got: '${SOURCE_REF}'. Branch names and the unsubstituted 'v0.2.7' token are not accepted." >&2
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/sync-from-source-of-truth.yml around lines 76 - 94, Update
the outdated operator-facing strings to reflect current semantics: replace
mentions of "workflow_call" and the old token "v0.2.5" in the SOURCE_REF
handling block so user-facing messages and comments match the actual runtime
defaults ("workflow_dispatch" and "v0.2.7"); specifically update the explanatory
comment above the SOURCE_REF assignment and the echo error messages that
reference the unsubstituted token and invocation method so they mention
workflow_dispatch and v0.2.7 (while leaving the regex and SOURCE_REF logic
unchanged).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/sync-from-source-of-truth.yml:
- Around line 76-94: Update the outdated operator-facing strings to reflect
current semantics: replace mentions of "workflow_call" and the old token
"v0.2.5" in the SOURCE_REF handling block so user-facing messages and comments
match the actual runtime defaults ("workflow_dispatch" and "v0.2.7");
specifically update the explanatory comment above the SOURCE_REF assignment and
the echo error messages that reference the unsubstituted token and invocation
method so they mention workflow_dispatch and v0.2.7 (while leaving the regex and
SOURCE_REF logic unchanged).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ef0bca87-e0f3-41ff-a2be-67542b82195d

📥 Commits

Reviewing files that changed from the base of the PR and between b6e5af6 and b19324c.

📒 Files selected for processing (1)
  • .github/workflows/sync-from-source-of-truth.yml

v0.2.8 ships #122 route race fix, #127 Phase 3 stages 1+2, #126 worker-fix
ready-for-review default, #123/#124 doc-drift fixes.
See https://github.com/gominimal/min-aw/releases/tag/v0.2.8

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/sync-from-source-of-truth.yml (1)

78-94: ⚡ Quick win

Refresh stale source_ref comments/error text to avoid future drift.

This block still references workflow_call and hard-coded v0.2.5, which is now outdated and can confuse maintenance/debugging.

Proposed edit
-          # 2. workflow_call default (v0.2.5, substituted by quick-setup
+          # 2. workflow_dispatch default (v0.2.8, substituted by quick-setup
           #    at install time, bumped via PR thereafter)
           SOURCE_REF="${{ github.event.inputs.source_ref || 'v0.2.8' }}"

           # Immutability + substitution-check in one regex pair. source_ref
           # must be a pinned tag (vN.N.N pattern) or full 40-char SHA. Branch
-          # names (main, master, dev) and the unsubstituted 'v0.2.5'
+          # names (main, master, dev) and an unsubstituted default token
           # token both fail this check. A separate unsubstituted-token guard
-          # used to live above, but quick-setup.sh substitutes 'v0.2.5'
+          # used to live above, but quick-setup.sh substitutes the default
           # globally including inside that guard's literal — which made the
           # guard self-rejecting post-substitution. Dropped; the regex below
           # catches the same condition correctly.
@@
-            echo "Got: '${SOURCE_REF}'. Branch names and the unsubstituted 'v0.2.5' token are not accepted." >&2
+            echo "Got: '${SOURCE_REF}'. Branch names and unsubstituted default tokens are not accepted." >&2
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/sync-from-source-of-truth.yml around lines 78 - 94, Update
the stale explanatory text and error messages around SOURCE_REF and the regex
check to remove references to "workflow_call" and the hard-coded 'v0.2.5' token
and make the guidance current; edit the echo lines that print the error and the
"If you see the literal token..." guidance so they no longer mention the old
token or workflow type, instead describe that SOURCE_REF must be a pinned tag
(e.g. v1.2.3) or a 40-char SHA and instruct users to re-run the quick-setup
script from the source repo at a pinned ref if they see an unsubstituted token;
keep the existing validation logic (the regex checks on SOURCE_REF) and only
change the human-facing strings around SOURCE_REF, the two echo "...Got:
'${SOURCE_REF}'..." and the final guidance line.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/sync-from-source-of-truth.yml:
- Around line 78-94: Update the stale explanatory text and error messages around
SOURCE_REF and the regex check to remove references to "workflow_call" and the
hard-coded 'v0.2.5' token and make the guidance current; edit the echo lines
that print the error and the "If you see the literal token..." guidance so they
no longer mention the old token or workflow type, instead describe that
SOURCE_REF must be a pinned tag (e.g. v1.2.3) or a 40-char SHA and instruct
users to re-run the quick-setup script from the source repo at a pinned ref if
they see an unsubstituted token; keep the existing validation logic (the regex
checks on SOURCE_REF) and only change the human-facing strings around
SOURCE_REF, the two echo "...Got: '${SOURCE_REF}'..." and the final guidance
line.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 552e6dc4-44c4-4143-8201-6d1241ba8a55

📥 Commits

Reviewing files that changed from the base of the PR and between b19324c and ecbc0e8.

📒 Files selected for processing (1)
  • .github/workflows/sync-from-source-of-truth.yml

Comments and the error message in the SOURCE_REF resolution block still
referenced workflow_call and the v0.2.5 token, both of which are no longer
the runtime defaults (now workflow_dispatch + v0.2.8). Also softens the
v0.2.7+ phrasing in the git-author step rationale.

Comment-only refresh per CodeRabbit review on PR #197; the validation
regex and SOURCE_REF logic are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@norrietaylor norrietaylor changed the title chore(sync): patch in git-author config + bump pin v0.2.5 -> v0.2.7 chore(sync): patch in git-author config + bump pin v0.2.5 -> v0.2.8 May 9, 2026
@norrietaylor

Copy link
Copy Markdown
Member Author

Applied CodeRabbit nitpick on the Set source ref block (commit 14490f7) — refreshed the stale workflow_call / v0.2.5 references to drift-resistant phrasing ("workflow_dispatch input default", "unsubstituted default token") rather than rev-locking comments to a specific version. Validation regex and SOURCE_REF resolution logic unchanged.

Also corrected the PR title from v0.2.5 -> v0.2.7 to v0.2.5 -> v0.2.8 to match the implementation (CodeRabbit pre-merge title-check warning).

@norrietaylor
norrietaylor enabled auto-merge (squash) May 9, 2026 03:33
Carries the worker-gates fixes (#138), drift CI guard (#144), and the
auto-merge sidecar template (#144) from the upstream chore-suite. Note:
the auto-merge sidecar (templates/.github/workflows/auto-merge.yml in
min-aw) is intentionally NOT installed on minimal — auto-merge stays
opt-out on this repo. Only the workflow.md/lock.yml content sync is
needed here; the sidecar template would require a separate one-shot.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@norrietaylor norrietaylor changed the title chore(sync): patch in git-author config + bump pin v0.2.5 -> v0.2.8 chore(sync): patch in git-author config + bump pin v0.2.5 -> v0.3.1 May 9, 2026
@norrietaylor

Copy link
Copy Markdown
Member Author

Bumped pin v0.2.8 → v0.3.1 to carry the worker-gates fixes (#138), drift CI guard (#144), and the auto-merge sidecar template from the upstream chore-suite.

Note: per maintainer direction the auto-merge sidecar is intentionally NOT installed on this repo — templates/.github/workflows/auto-merge.yml would normally come via a separate one-shot, but on minimal that path stays opt-out. allow_auto_merge repo flag also untouched on this repo.

auto-merge was automatically disabled May 9, 2026 16:57

Pull request was closed

@norrietaylor

Copy link
Copy Markdown
Member Author

Closing for now. Will reopen once I am happy with the workflow on dogfood repo.

@norrietaylor
norrietaylor deleted the chore/sync-wrapper-add-git-config branch May 27, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant