Skip to content

Commit 31cdef6

Browse files
authored
ci(upgrade-deps): teach autofix agent to handle sync-remote failures (#1468)
1 parent bf51bcc commit 31cdef6

1 file changed

Lines changed: 32 additions & 11 deletions

File tree

.github/workflows/upgrade-deps.yml

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,30 +74,51 @@ jobs:
7474
show_full_output: 'true'
7575
prompt: |
7676
Your goal: after the daily upstream-dependency upgrade, bring the project back
77-
to a fully green state. The upgrade script has already bumped every dep to the
78-
latest version and the `build-upstream` action has attempted a build — your job
79-
is to diagnose and fix every error that surfaced, then prove the fix is complete
80-
by running a final validation pass.
77+
to a fully green state. The upgrade script has bumped every dep to the latest
78+
version, the `Sync remote and build` step has attempted to merge the rolldown
79+
and vite catalogs into the workspace, and the `build-upstream` action has
80+
attempted a build — your job is to diagnose and fix every error that surfaced,
81+
then prove the fix is complete by running a final validation pass.
8182
8283
### Background
8384
- Upgrade script: `./.github/scripts/upgrade-deps.mjs`
85+
- Sync-remote tool: `pnpm tool sync-remote` (source in
86+
`packages/tools/src/sync-remote-deps.ts`) — clones rolldown/vite into the
87+
working tree and merges their pnpm-workspace catalogs into the root
88+
`pnpm-workspace.yaml`.
8489
- Build-upstream action: `./.github/actions/build-upstream/action.yml`
8590
- Package manager: `pnpm`. Do NOT downgrade any dep — we want the latest.
8691
92+
### Outcomes from earlier steps (both ran with continue-on-error)
93+
- Sync remote and build: ${{ steps.build.outcome }}
94+
- build-upstream action: ${{ steps.build-upstream.outcome }}
95+
8796
### Fixups to perform (in order)
88-
1. Re-run the steps in `./.github/actions/build-upstream/action.yml`; fix any
97+
1. If the `Sync remote and build` outcome above is `failure`, fix it FIRST —
98+
nothing else will work until the merged workspace is correct. Re-run
99+
`pnpm tool sync-remote` and read the error. The most common cause is a
100+
cross-major semver conflict in the merged catalog, e.g.
101+
`Incompatible semver ranges for <pkg>: ^X vs ^Y`. The merger refuses to
102+
auto-resolve cross-major conflicts for packages outside its synced list
103+
(oxc-*, vitest deps). For passthrough deps that vp does NOT import
104+
directly (e.g. `diff`, `acorn`, `astring`, anything only present in
105+
`rolldown/scripts/package.json` or vite's internals), bump vp's
106+
`pnpm-workspace.yaml` catalog entry to match the rolldown/vite version,
107+
then re-run `pnpm tool sync-remote` until it exits 0. Finish with
108+
`pnpm install --no-frozen-lockfile`.
109+
2. Re-run the steps in `./.github/actions/build-upstream/action.yml`; fix any
89110
non-zero exits.
90-
2. If the rolldown hash changed, follow `.claude/agents/cargo-workspace-merger.md`
111+
3. If the rolldown hash changed, follow `.claude/agents/cargo-workspace-merger.md`
91112
to resync the workspace.
92-
3. Compare tsdown CLI options with `vp pack` and sync new/removed options per
113+
4. Compare tsdown CLI options with `vp pack` and sync new/removed options per
93114
`.claude/skills/sync-tsdown-cli/SKILL.md`.
94-
4. Install the global CLI:
115+
5. Install the global CLI:
95116
- `pnpm bootstrap-cli:ci`
96117
- `echo "$HOME/.vite-plus/bin" >> $GITHUB_PATH`
97-
5. If any Rust code or `Cargo.toml` was modified, run `cargo check
118+
6. If any Rust code or `Cargo.toml` was modified, run `cargo check
98119
--all-targets --all-features` and `cargo shear`; fix anything they report.
99-
6. Run `pnpm run lint` (requires a prior `just build`); fix any errors.
100-
7. Smoke-test the CLI: `vp -h`, `vp run -h`, `vp lint -h`, `vp test -h`,
120+
7. Run `pnpm run lint` (requires a prior `just build`); fix any errors.
121+
8. Smoke-test the CLI: `vp -h`, `vp run -h`, `vp lint -h`, `vp test -h`,
101122
`vp build -h`, `vp fmt -h`, `vp pack -h`.
102123
103124
### Final validation (this step is complete ONLY when all pass)

0 commit comments

Comments
 (0)