Skip to content

feat: add sync-main-to-edge workflow + .gitupstream - #559

Merged
nsheaps merged 1 commit into
mainfrom
feat/edge-sync-workflow
May 28, 2026
Merged

nsheaps merged 1 commit into
mainfrom
feat/edge-sync-workflow

Conversation

@alex-nsheaps

@alex-nsheaps alex-nsheaps Bot commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the edge-sync consumer workflow + .gitupstream config to this repo. The workflow delegates to the reusable workflow in nsheaps/github-actions#24; the config lists which */edge branches to keep in sync with main.

  • .github/workflows/sync-main-to-edge.yaml — fires on push-to-main (and workflow_dispatch)
  • .gitupstream — YAML config listing edge targets

The workflow file is also distributed by nsheaps/.github#63 via sync-files; we're seeding it here so the repo works standalone and sync-files will pick up from there idempotently.

Depends on

Test plan

  • Merge after github-actions#24 lands
  • Verify next push to main triggers the workflow and syncs configured edge branches (no-op when targets already up-to-date or missing)

Open Questions

  1. For repos without an existing edge branch, .gitupstream currently has sync: [] as a placeholder. Should I instead pre-seed with alex/edge even though the branch doesn't exist? The reusable workflow skips missing targets, so either works.
  2. The workflow uses: points at @main (the reusable). Want a SHA-pin instead for reproducibility?

Refs nsheaps/.ai-agent-alex#685.

🤖 Generated with Claude Code

Decisions (Q1/Q2/Q3 follow-up 2026-05-28)

Nate answered the original Open Questions (Discord msg):

  • Q1 (ref pinning): Keep uses: ...@main for the reusable.
  • Q2 (placeholder .gitupstream): Seed each agent repo with <agent>/edge target + create the branch. Done in this PR set; alex/edge, jack/edge, henry/edge now exist on their respective repos.
  • Q3 (triggers): All three — push: branches:[main], schedule: '0 6 * * *' (nightly UTC), workflow_dispatch:.

Full follow-up: https://github.com/nsheaps/.ai-agent-alex/blob/main/docs/journal/2026/05/28/edge-sync-q2q3-followup.md

Calls the reusable workflow at
nsheaps/github-actions/.github/workflows/sync-main-to-edge.yaml@main
on every push to main, syncing main into the */edge branches listed in
.gitupstream.

Depends on nsheaps/github-actions#24 landing first.

Refs nsheaps/.ai-agent-alex#685.

Co-Authored-By: Agent Alex Picard <alex-nsheaps[bot]@users.noreply.github.com>
@alex-nsheaps alex-nsheaps Bot added the request-review Force an AI code review on a draft PR (open non-draft PRs review automatically) label May 28, 2026
@alex-nsheaps
alex-nsheaps Bot requested a review from nsheaps as a code owner May 28, 2026 20:50
@henry-nsheaps henry-nsheaps Bot removed the request-review Force an AI code review on a draft PR (open non-draft PRs review automatically) label May 28, 2026
henry-nsheaps[bot]

This comment was marked as outdated.

@nsheaps
nsheaps merged commit 24873a5 into main May 28, 2026
9 of 12 checks passed
@nsheaps
nsheaps deleted the feat/edge-sync-workflow branch May 28, 2026 20:55

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

👍 Already merged — recap + one open follow-up

✅ PR merged at 20:55:10Z; dep nsheaps/github-actions#24 merged 75s earlier at 20:53:55Z — merge ordering OK
✅ Reusable workflow now on main of nsheaps/github-actions (verified via contents API)
✅ test_mode boolean coercion safe across triggers (verified previously)
✅ .gitupstream schema matches reusable workflow's yq parser
⚠️ Still on @main ref — repo convention is SHA-pin; tracking as a follow-up

🖱️ Click to expand for full details

State at review time

This PR is already merged (by @nsheaps at 2026-05-28T20:55:10Z). This is a post-merge follow-up review consolidating what was flagged previously.

What resolved itself

  • Merge ordering (thread): nsheaps/github-actions#24 landed first (20:53:55Z vs 20:55:10Z), so the first push-to-main after merge had the reusable workflow available. Thread resolved.
  • Open question #1 (pre-seed alex/edge): confirmed safe — reusable workflow skips missing targets.
  • test_mode coercion: verified across push, workflow_dispatch default, and workflow_dispatch true paths.

What's still open (non-blocking, follow-up only)

  • SHA-pin (thread): uses: nsheaps/github-actions/.github/workflows/sync-main-to-edge.yaml@main was merged as-is. Every other nsheaps/github-actions reference in this repo is SHA-pinned per .claude/rules/ci-cd/conventions.md. Because this file is sync-files–managed from nsheaps/.github, the pin needs to land in the upstream template (nsheaps/.github#63) — otherwise any direct edit here would revert on the next sync.

Scoring rationale

  • Quality 95%: same as prior review — clean, minimal, well-commented. -5 for the unresolved @main deviation from repo convention (still present in merged code).
  • Security 85%: unchanged — @main for a contents: write reusable workflow is the only risk; same-org so blast radius is low.
  • Simplicity 100%: two small files, no abstractions beyond what's needed.
  • Confidence 98%: +3 over prior review now that both the dep workflow file and this PR are on main and verifiable.

Recommended follow-ups (non-blocking):

  • SHA-pin the reusable workflow ref. Best done by updating the template in nsheaps/.github#63 so the next sync-files run propagates a pinned @<sha> # sync-main-to-edge@main form into all consumer repos. Direct edits here will be overwritten.
  • Optional: explicitly set config_path: .gitupstream in the caller for future-proofing if the schema location ever moves (currently defaulting is fine).

Notes:12345

Footnotes

  1. Workflow Run: https://github.com/nsheaps/ai-mktpl/actions/runs/26601481970/attempts/1 ↩

  2. PR: #559 ↩

  3. Dependency PR (now merged): nsheaps/github-actions#24 ↩

  4. Distribution PR (sync-files template): nsheaps/.github#63 ↩

  5. Repo CI/CD conventions: .claude/rules/ci-cd/conventions.md ↩

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