Repository navigation
Commit ec5756e
feat(fork-sync): a pushed resolution reruns the sync from the trunk (#1850)
## Problem
A resolution an agent pushes to `sync/resolution` waits up to six hours for the next scheduled sync.
A `push` trigger cannot rerun it safely: it runs the pushed commit's workflow files, with repository secrets.
## Change
New `hyprws-sync-resolution.yml` dispatches the trunk's own sync:
1. rsi-pr-agent pushes `sync/resolution`
2. Its `<!-- rsi:fork-sync -->` comment turns `**pushed**`
3. `issue_comment` runs this file from `hyprws`
4. The job runs `gh workflow run hyprws-upstream-sync.yml --ref hyprws`
5. The sync imports the branch as data (stacked layer below)
- **Gate:** author `rsi-pr-agent[bot]`, marker, `**pushed**`
- **Permissions:** `actions: write` only; no secret
- **Queue:** the sync's `hyprws-sync` group, not cancelled
- **Fallback:** the 6-hour schedule
A separate file keeps every repository comment out of the sync's concurrency group.
### Residual risk
This PR runs no code or workflow from `sync/resolution`, but the push itself can:
- **Vector:** a pushed commit adding an `on: push` workflow
- **Runs with:** `HYPRWS_MIRROR_TOKEN`, an elevatable `GITHUB_TOKEN`
- **Enabled by:** rsi-pr-agent push tokens carry `workflows: write`
No change in this repository closes it; it needs a settings change:
- a) Move `HYPRWS_MIRROR_TOKEN` to an environment restricted to `hyprws` (recommended)
- b) Drop `workflows: write` from the `fork-sync` push token; the resolution commit never needs it
Agent-authored resolutions also reach candidate CI and `vp run fork:ci`, as upstream code already does.
## Scope and approval
Refs #1844
Refs #1841
The close condition needs a live push after merge: "A sync/resolution push reruns the sync".
The App never pushes `hyprws`; no ruleset bypass.
## Verification
- [x] `actionlint .github/workflows/hyprws-sync-resolution.yml` → exit 0
- [x] `vp run fork:ci` → exit 0
**Unverified:** the live trigger; the `rsi:fork-sync` definition lands in #1848.
Claude Opus 5.5, Claude Code in T3 Code.
## Fork trailers
Fork-Domain: fork-meta
Fork-Tier: core
Co-authored-by: donjor <[email protected]>1 parent 6f33ca0 commit ec5756e
4 files changed
Lines changed: 40 additions & 1 deletion
File tree
- .agents/skills/fork-sync
- .github/workflows
- docs/fork
- internals
- operations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| 397 | + | |
397 | 398 | | |
398 | 399 | | |
399 | 400 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| |||
0 commit comments