Keep the Forgejo and GitHub copies in sync #2

Open
opened 2026-10-18 11:22:01 +00:00 by noel · 0 comments
Owner

Owner asked (2026-10-18) for noel/supplychain (Forgejo) and noeljackson/supplychain (GitHub) to stay in sync, ideally both directions. Deferred; this records the state found while looking at it.

State on 2026-10-18 (read-only check)

  • Forgejo main = bcbae54; GitHub main = 883db6b. Merge base 95afa99.
  • GitHub has 57 commits not on Forgejo. Of Forgejo's 50 "Forgejo-only" commits, 35 are the same patches under different hashes (GitHub history was rewritten), 14 are PR merge commits, and one has no GitHub equivalent: e8ac9c5 (one line in action.yml, the Forgejo setup-go mirror), which infra records as retired: GitHub's action now uses its own pinned setup-go bootstrap.
  • infra already models Forgejo as a reviewed mirror of GitHub (clusters/system-hz-eu-1/migration/forgejo-infra-action-mirrors.json: source GitHub, target noel/supplychain, reviewed_commit bcbae54, plus a SHA-256 over every head and tag ref, enforced by tools/platform/checks/check-infra-action-mirrors). Any push to Forgejo has to update that record, or the infra check fails.
  • CI does not read the Forgejo repo for the scanner: the hermetic runner image carries a supplychain binary built at ee0abeb (GitHub-only commit; pinned in infra forgejo-hermetic-runner-image.json and check-system-hz-forgejo-ci, and in EXPECTED_SUPPLYCHAIN in codewire's and infra's source-approval.yml). pentest-image.yml uses noel/supplychain@bcbae548 as an action.
  • GitHub-side automation still merges there: IOC refresh PRs (GitHub App token, #66) and bounded Dependabot auto-merge (#59). The release workflow (attestations, Homebrew tap) also runs on GitHub.

Options

  1. GitHub canonical, Forgejo pull-mirrors it (smallest; matches what infra models): schedule a sync that fast-forwards Forgejo main from GitHub, then refresh the reviewed-mirror record (reviewed commit and ref digest) through the existing infra check. Forgejo-originated changes go to GitHub as PRs.
  2. Forgejo canonical, push-mirror to GitHub (the 2026-10-16 decision): merge GitHub main into Forgejo main once, add a Forgejo workflow that pushes main to GitHub with a GitHub App installation token (no PAT or deploy key; owner installs the App on noeljackson/supplychain; infra OpenBao policy for the new workflow), and stop merging on GitHub: move IOC refresh and Dependabot to Forgejo or turn them off. Rework the infra mirror record so it treats Forgejo as the source.
  3. Both directions: two writers race. It works only if each sync is a fast-forward and the job refuses (and alerts) on divergence instead of merging or forcing; GitHub automation keeps merging there and Forgejo pulls it, Forgejo merges are pushed out. Same App, OpenBao and infra-record work as option 2, plus a divergence alert.

Done when

  • Both copies' main agree (or the chosen direction is automatic), the infra mirror record and check pass, and the runner image / EXPECTED_SUPPLYCHAIN pins move to a commit on the canonical main through a normal infra and codewire PR, with a strict supplychain run on the new revision compared with the old one.
Owner asked (2026-10-18) for `noel/supplychain` (Forgejo) and `noeljackson/supplychain` (GitHub) to stay in sync, ideally both directions. Deferred; this records the state found while looking at it. ## State on 2026-10-18 (read-only check) - Forgejo `main` = `bcbae54`; GitHub `main` = `883db6b`. Merge base `95afa99`. - GitHub has 57 commits not on Forgejo. Of Forgejo's 50 "Forgejo-only" commits, 35 are the same patches under different hashes (GitHub history was rewritten), 14 are PR merge commits, and one has no GitHub equivalent: `e8ac9c5` (one line in `action.yml`, the Forgejo setup-go mirror), which infra records as retired: GitHub's action now uses its own pinned setup-go bootstrap. - infra already models Forgejo as a reviewed mirror of GitHub (`clusters/system-hz-eu-1/migration/forgejo-infra-action-mirrors.json`: source GitHub, target `noel/supplychain`, `reviewed_commit` `bcbae54`, plus a SHA-256 over every head and tag ref, enforced by `tools/platform/checks/check-infra-action-mirrors`). Any push to Forgejo has to update that record, or the infra check fails. - CI does not read the Forgejo repo for the scanner: the hermetic runner image carries a `supplychain` binary built at `ee0abeb` (GitHub-only commit; pinned in infra `forgejo-hermetic-runner-image.json` and `check-system-hz-forgejo-ci`, and in `EXPECTED_SUPPLYCHAIN` in codewire's and infra's `source-approval.yml`). `pentest-image.yml` uses `noel/supplychain@bcbae548` as an action. - GitHub-side automation still merges there: IOC refresh PRs (GitHub App token, #66) and bounded Dependabot auto-merge (#59). The release workflow (attestations, Homebrew tap) also runs on GitHub. ## Options 1. **GitHub canonical, Forgejo pull-mirrors it** (smallest; matches what infra models): schedule a sync that fast-forwards Forgejo `main` from GitHub, then refresh the reviewed-mirror record (reviewed commit and ref digest) through the existing infra check. Forgejo-originated changes go to GitHub as PRs. 2. **Forgejo canonical, push-mirror to GitHub** (the 2026-10-16 decision): merge GitHub `main` into Forgejo `main` once, add a Forgejo workflow that pushes `main` to GitHub with a GitHub App installation token (no PAT or deploy key; owner installs the App on `noeljackson/supplychain`; infra OpenBao policy for the new workflow), and stop merging on GitHub: move IOC refresh and Dependabot to Forgejo or turn them off. Rework the infra mirror record so it treats Forgejo as the source. 3. **Both directions**: two writers race. It works only if each sync is a fast-forward and the job refuses (and alerts) on divergence instead of merging or forcing; GitHub automation keeps merging there and Forgejo pulls it, Forgejo merges are pushed out. Same App, OpenBao and infra-record work as option 2, plus a divergence alert. ## Done when - Both copies' `main` agree (or the chosen direction is automatic), the infra mirror record and check pass, and the runner image / `EXPECTED_SUPPLYCHAIN` pins move to a commit on the canonical `main` through a normal infra and codewire PR, with a strict supplychain run on the new revision compared with the old one.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
noel/supplychain#2
No description provided.