Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflow-templates/fe/fe-check-upmerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ jobs:
uses: collaborationFactory/github-actions/.github/workflows/fe-check-upmerge.yml@master
secrets:
SLACK_TOKEN_UPMERGE: ${{ secrets.SLACK_TOKEN_UPMERGE }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
GIT_USER: ${{ secrets.GIT_USER }}
16 changes: 11 additions & 5 deletions .github/workflows/fe-check-upmerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
secrets:
SLACK_TOKEN_UPMERGE:
required: true
# Unused since PFM-ISSUE-33676 (the git identity is the github-actions bot). Kept optional so
# callers that still pass them keep working; removed by the FE migration/cleanup ticket.
GIT_USER_EMAIL:
required: true
required: false
GIT_USER:
required: true
required: false

jobs:
check-upmerge:
Expand All @@ -17,9 +19,15 @@ jobs:
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ref: ${{ inputs.GHA_REF }}
fetch-depth: 0

# cplace-cli makes local merge commits (--no-push), which need an author. --global, as before,
# in case the CLI merges outside the checkout.
- name: Configure git identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24.22.1
Expand All @@ -35,5 +43,3 @@ jobs:
uses: collaborationFactory/github-actions/.github/actions/upmerge@master
env:
SLACK_TOKEN_UPMERGE: ${{ secrets.SLACK_TOKEN_UPMERGE }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
GIT_USER: ${{ secrets.GIT_USER }}
13 changes: 6 additions & 7 deletions .github/workflows/fe-release-flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ on:
required: true
DOT_NPMRC:
required: true
# Unused since PFM-ISSUE-33676 (the git identity is the github-actions bot). Kept optional so
# callers that still pass them keep working; removed by the FE migration/cleanup ticket.
GIT_USER:
required: true
required: false
GIT_USER_EMAIL:
required: true
required: false
PERCY_TOKEN:
required: false

Expand Down Expand Up @@ -138,12 +140,9 @@ jobs:
run: npm ci

- name: Configure git user
env:
GIT_USER: ${{ secrets.GIT_USER }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
run: |
git config user.name "$GIT_USER"
git config user.email "$GIT_USER_EMAIL"
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'

- name: Publish to Jfrog NPM Registry and Tag
id: release
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,18 @@ run ends green with the warning "FORCE is ignored".
### Required secrets

Passed with `secrets: inherit`: `JFROG_BASE64_TOKEN`, `JFROG_URL`, `JFROG_USER`, `DOT_NPMRC`,
`GIT_USER`, `GIT_USER_EMAIL`, and optionally `PERCY_TOKEN`. The caller needs
`permissions: contents: write`; the flow grants it only to the `release` and `github-release` jobs.
and optionally `PERCY_TOKEN`. The caller needs `permissions: contents: write`; the flow grants it
only to the `release` and `github-release` jobs. The flow sets the `github-actions[bot]` git
identity itself; `GIT_USER` and `GIT_USER_EMAIL` are still accepted but unused. The upmerge check
(`fe-check-upmerge.yml`) needs only `SLACK_TOKEN_UPMERGE`.

The tag is pushed with `GITHUB_TOKEN`; the flow does not use `GIT_USER_TOKEN`. The deprecated
`fe-tag.yml` and `workflows/fe-release.yml` still need it: remove it from a repo only once none of
its branches calls them.

A repo can delete `GIT_USER` and `GIT_USER_EMAIL` once no caller passes them explicitly, and
`GIT_USER_TOKEN` once none of its branches calls `fe-tag.yml` or `workflows/fe-release.yml`.

### Tag rulesets

The tag is pushed as GitHub Actions (`GITHUB_TOKEN`), after publish and promote. A ruleset that
Expand Down
288 changes: 288 additions & 0 deletions specs/2026-11-26_PFM-ISSUE-33676_replace-shared-github-user/design.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# PFM-ISSUE-33676 live-test log (clone-cplace-fe)

Repo: `collaborationFactory/clone-cplace-fe`. Test branch in github-actions: `test/PFM-ISSUE-33676-bot-identity`
(Phase 1 commit, plus a ref rewrite to itself, plus the e2e job and the `RUN_E2E` input dropped by hand, because the
cherry-pick of the 34282 e2e-drop commit conflicted).

## Setup (2026-11-27)

One commit per clone branch, "PFM-ISSUE-33676 - Drop shared-account secrets and squad-fe identity (test branch …)":

| Branch | Changes |
|---|---|
| `release/26.4` | `cron_check_upmerge.yaml` → `@test/PFM-ISSUE-33676-bot-identity`, without `GIT_USER*`. `deploy_storybook.yaml` → `github-actions[bot]`. `fe-release.yml` → `@test/PFM-ISSUE-33676-bot-identity`, with `RUN_E2E: false` commented out (deviation from the plan: the test branch drops the input, so passing it would fail validation). `push_main.yaml` without `GIT_USER_TOKEN` (`fe-snapshot.yml@release/26.4` declares it optional). |
| `release/26.3` | Same, except that `fe-release.yml` had no active `RUN_E2E`. Its old ref was the 34283 test branch. |
| `main` | `cron_check_upmerge.yaml` and `deploy_storybook.yaml` only. The 34282/34293 test refs are untouched. |

## L0 — pushes, with the secrets still present

| ID | Run | Branch | Result |
|---|---|---|---|
| L0a | 46025367521 | `release/26.4` | success. guard, install-deps, build and release succeeded. github-release was skipped and no tag was created (latest is still `version/26.4.12`), so nothing was affected, as expected. |
| L0b | 46025377463 | `release/26.3` | success. Same jobs as L0a. github-release was skipped and no new tag was created (`version/26.3.1` is older and points at the previous head). |
| L0c | 46025386669 | `main` (Frontend Main CI) | success. install-deps, build and snapshot all succeeded. |

`SLACK_TOKEN_UPMERGE` was set to a dummy value by the user on 2026-11-27.

## Secrets deleted (2026-11-27)

After L0 passed, the user deleted `GIT_USER_TOKEN`, `GIT_USER` and `GIT_USER_EMAIL`. Afterwards,
`gh secret list -R collaborationFactory/clone-cplace-fe | grep -E "^GIT_USER"` printed nothing.

## L1–L4 — with the secrets deleted

| ID | Run | Trigger | Result |
|---|---|---|---|
| L1 Release | 46057064738 | `fe-release.yml` dispatch on `release/26.4`, `force=true` | success. guard, install-deps, build, release and github-release all succeeded. `Uses: …fe-release-flow.yml@refs/heads/test/PFM-ISSUE-33676-bot-identity (6a8808e)`. "Configure git user" ran with the fixed `github-actions[bot]` values and no secret env. `refs/tags/version/26.4.13` is lightweight (`object.type = commit`, `d5b628a55`). The release author is `github-actions[bot]`. There was no "Secret … is required" error. |
| L2 Upmerge | 46057069124 → **46057315523** | `cron_check_upmerge.yaml` dispatch on `main` | success (see the notes below). `Uses: …fe-check-upmerge.yml@refs/heads/test/PFM-ISSUE-33676-bot-identity`. "Configure git identity" ran. Slack failed with `invalid_auth`, as expected, and the log ends with `finished upmerge workflow`. |
| L3 Snapshot PR | 46057137170 | PR [#5](https://github.com/collaborationFactory/clone-cplace-fe/pull/5) from `test/33676-snapshot`, label `snapshot` (added through REST; `gh pr edit` failed on a GraphQL Projects-classic deprecation error) | success. Exactly one comment, by `github-actions[bot]`, containing `<!-- published-artifacts -->`. It lists the `0.0.0-test-33676-snapshot-5` versions. PR closed and branch deleted afterwards (close/cleanup run 46059569820). |
| L4 Main push | 46057190970 | Empty commit "33676 L4: main CI without GIT_USER secrets" on `main` | success. install-deps, build and snapshot all succeeded. |

### L2 notes

- **First attempt (46057069124), invalid.** cplace-cli refused with `current branch is 1 commits behind origin/main`, because
the L4 push landed on `main` between the dispatch checkout and the CLI's fetch. It was re-dispatched once `main` was
stable.
- **Retry (46057315523).** cplace-cli reported `Merge failed when merging upmerge-…/release/26.4`, so there was no
`cliResult:` line. That is a content conflict that already existed in the clone: `release/26.4` and `main` each add
their own `fe-release.yml` (add/add). `git merge-tree` shows the same conflict at the pre-33676 heads (`bf607143b`
and `c65717355`). The preceding `release/26.3 → release/26.4` step does succeed, and it is a real merge commit
(reproduced locally), which git can create only with an author identity. So the `github-actions[bot]` identity was
exercised and there was no identity error. The plan's `cliResult:` expectation is not met, for this unrelated
reason.

## Phase 3 — heal with the App token

cplace-fe `improvement/PFM-ISSUE-33676-Replace-shared-GitHub-user-account-in-frontend` commit "PFM-ISSUE-33676 - Push
visual-baseline heals with the sva-actions-upmerge App and drop the squad-fe storybook identity" (local, not pushed
yet). `node --test .github/scripts/*.test.mjs` gives 15/15. actionlint is clean on the heal workflow. Its two findings
on `deploy_storybook.yaml` (`runs-on: medium`, `setup-node@v3`) are identical on `origin/main` and unrelated.

| ID | Run / evidence | Result |
|---|---|---|
| H0 | Clone `main` commits "33676 H0: add the heal-visual-baselines workflow from cplace-fe (App token)" and "33676 H0: force visual drift for the heal test" (`accordion.cy.ts-types.png` copied over `accordion.cy.ts-states.png`). Heal run 46068133820, main CI 46068134372. | The workflow is byte-identical to cplace-fe `FB`. The gate reported `event=push proceed=false apps=[] reason=not an upmerge commit`, and heal was skipped. |
| H1a–c | Run by the user on 2026-11-27 | The clone was added to installation 126667289 and to the selected repos of `SVA_ACTIONS_UPMERGE_ID`/`_KEY`. Ruleset **28262840** `33676-heal-test` is active on `~DEFAULT_BRANCH` with rules `pull_request`, `non_fast_forward` and `deletion`. Its only bypass actor is the Integration 3487076. All three were verified read-only. |
| H1d | Empty commit pushed with the user's credentials | **Rejected**: `GH013: Repository rule violations found for refs/heads/main … Changes must be made through a pull request.` The local branch was reset to `origin/main`. |
| H2 | 46069252083 (`workflow_dispatch`, app=helles-ui-visual-e2e, ref=main) | success. The gate reported `event=workflow_dispatch proceed=true apps=["helles-ui-visual-e2e"] reason=workflow_dispatch override`. Both renders failed (`1 failing`; each step exited 1 under `continue-on-error`). "Get sva-actions-upmerge token" succeeded. The push log shows `remote: Bypassed rule violations for refs/heads/main: - Changes must be made through a pull request.` and then `6b6d64e95..e753f8fa9 HEAD -> main`. The heal commit `e753f8fa9` "chore: heal visual baselines for helles-ui-visual-e2e [skip visual-heal]" has author and committer `sva-actions-upmerge[bot] <278916743+sva-actions-upmerge[bot]@users.noreply.github.com>` (GitHub `author.login = sva-actions-upmerge[bot]`). It changes only `apps/helles-ui-visual-e2e/visual-regression/baseline/accordion.cy.ts-states.png` (8222 → 23722 bytes; a fresh CI render, not byte-identical to the pre-H0 file). "Announce heal" ran with the dummy token. The Slack action is configured with `errors: false`, so it does not fail. |
| H3 | 46071111582 (push of `e753f8fa9`) | success. The gate reported `event=push proceed=false apps=[] reason=loop-break: heal marker present`, and heal was skipped. Main CI 46071111820 also succeeded. |
| H4 | Run by the user, 2026-11-30 | Ruleset 28262840 deleted (`gh api repos/…/rulesets --jq length` → `0`). The clone was removed from installation 126667289 and from the selected repos of `SVA_ACTIONS_UPMERGE_ID`/`_KEY`. All verified read-only. The heal workflow stays in the clone. |

## cplace-fe PR

[cplace-fe#3101](https://github.com/collaborationFactory/cplace-fe/pull/3101), opened 2026-11-30 from `improvement/PFM-ISSUE-33676-Replace-shared-GitHub-user-account-in-frontend`.
Loading
Loading