Auto-upgrade: daily workflow to propagate upstream changes to installed repos
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng việc đọc quy trình cài đặt gh aw add hiện có cùng các mã nguồn workflows/autoloop.md và workflows/sync-branches.md. Theo dõi cách các workflow đã cài đặt được biên dịch và xác định entry point của CLI để thêm hành vi nâng cấp và theo dõi phiên bản. Công việc được coi là hoàn tất khi thiết kế nâng cấp đã thống nhất được triển khai trên CLI và workflow upgrade-check.md, với các tùy chỉnh cục bộ và việc xác thực được xử lý như đã chỉ định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
When autoloop's source workflows change (bug fixes, new features, breaking changes), installed copies in downstream repos become stale. There is no upgrade mechanism — the install is a one-time file copy + compile. This means fixes like #18, #20, #23, #25 don't reach repos like githubnext/tsessebe until someone manually re-copies and recompiles.
The tsessebe case demonstrates the cost: 18 duplicate PRs were created because the stale .lock.yml didn't include the reset-if-merged fix from PR #25.
Goal
A smooth, automated upgrade path that:
- Detects upstream changes daily
- Creates a PR in the downstream repo with the updated workflows
- Handles breaking changes gracefully (adapts local customizations)
- Requires minimal human intervention for non-breaking updates
Design
Component 1: upgrade-check agentic workflow (lives in autoloop repo, installed into downstream repos)
A new gh-aw agentic workflow that runs daily in the downstream repo:
on:
schedule: daily
workflow_dispatch:
What it does each run:
-
Detect upstream version: Fetch the latest autoloop source from
githubnext/autoloop(usinggh apior cloning to/tmp). Compare the upstreamworkflows/autoloop.mdandworkflows/sync-branches.mdagainst the local.github/workflows/copies. -
Diff classification: Classify changes as:
- Non-breaking: Documentation, prompt wording, new optional features, bug fixes that don't change the frontmatter schema. These can be applied automatically.
- Breaking: Changes to frontmatter keys, step structure, tool configuration, permissions, or safe-output schema. These need agent-assisted adaptation.
-
Preserve local customizations: Before applying upstream changes, extract local overrides (e.g.,
schedule: every 30minstead ofevery 6h, customnetwork.allowedentries, modifiedsafe-outputslimits). After applying upstream changes, re-apply local overrides. -
Recompile: Run
gh aw compileto regenerate.lock.ymlfiles from the updated.mdsources. -
Validate: Run
gh aw compile --validateto ensure the compiled output is valid. -
Create PR: Open a draft PR with the changes titled
[Autoloop] Upgrade workflows to <upstream-sha-short>. The PR body should include:- Changelog of upstream changes (commit messages since last upgrade)
- Classification (breaking / non-breaking)
- Any local customizations that were preserved
- Any manual action required
Component 2: gh aw upgrade CLI command (lives in gh-aw)
A CLI counterpart for manual/interactive upgrades:
# Check for available updates
gh aw upgrade --check
# Apply upgrade, auto-fix breaking changes where possible
gh aw upgrade --fix
# Upgrade a specific workflow
gh aw upgrade autoloop --fix
--fix behavior:
- Detects the source repo from the
.lock.ymlheader (Source: githubnext/autoloop) - Fetches the latest upstream
.mdsource - Three-way merges: upstream base → upstream new → local, preserving local customizations
- Recompiles
- Reports what changed and what couldn't be auto-fixed
Component 3: Version tracking
Add a version/provenance block to the installed .md files so the upgrade tooling knows what baseline to diff against:
# Bottom of the installed .md file, or in a sidecar file
_autoloop:
source: githubnext/autoloop
installed_from: abc1234 # commit SHA at install time
installed_at: 2026-04-04T05:00:00Z
compiler_version: v0.65.6
Or a simpler approach: a .github/workflows/.autoloop-version.json:
{
"source": "githubnext/autoloop",
"commit": "abc1234def5678",
"installed_at": "2026-04-04T05:00:00Z",
"workflows": ["autoloop", "sync-branches"]
}
This gives the upgrade tooling a baseline commit to diff against, so it can show exactly what changed upstream since the last install/upgrade.
Implementation plan
Phase 1: Version tracking + gh aw upgrade CLI
- Add version metadata to
gh aw add— when installing, write.autoloop-version.json(or equivalent) recording the source commit. - Implement
gh aw upgrade --check— compares installed commit against upstream HEAD, shows changelog. - Implement
gh aw upgrade --fix— fetches upstream, three-way merges preserving local customizations, recompiles.
Phase 2: upgrade-check agentic workflow
- Add
workflows/upgrade-check.mdto the autoloop repo. - Include it in the install process (add to
install.md). - The workflow uses
gh aw upgrade --fixinternally, then creates a PR with the result.
Phase 3: Breaking change detection
- Define a schema for the frontmatter DSL (what fields exist, what values are valid).
- Classify upstream diffs against this schema to detect breaking vs non-breaking changes.
- For breaking changes the agent can't auto-fix, create an issue instead of a PR, explaining what needs manual attention.
Open questions
- Should the upgrade workflow run as a gh-aw agentic workflow itself, or as a plain GitHub Actions workflow? An agentic workflow can reason about breaking changes and adapt, but a plain workflow is simpler and doesn't consume agent compute for routine updates.
- Should local customizations be extracted into a separate config file (e.g.,
.autoloop/config.yml) to make three-way merging cleaner? This would separate "upstream workflow logic" from "local overrides." - How to handle the case where the user has made significant manual edits to the
.mdsource beyond simple config overrides?
- Ngôn ngữ chính
- Python
- Star
- 74
- Fork
- 6
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của githubnext/autoloop
-
Autoloop template should exclude language-specific dev files from protected-files by defaultĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
githubnext/autoloop#71 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
githubnext/autoloop#54 ·
-
TESTĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
githubnext/autoloop#76 · 1 bình luận ·
-
ReleasesĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
githubnext/autoloop#72 · 1 bình luận ·
-
Autoloop PR/issue should report cumulative performance improvementCó thể đã có người làm @mrjf đã nhận 144 ngày trước. Đang mở
githubnext/autoloop#69 · 1 reaction · 2 người được giao ·
Tất cả issue của githubnext/autoloop
Issue tương tự
-
[request] poppler-data/0.4.12Đang mởupstream update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
conan-io/conan-center-index#31098 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
john-kurkowski/tldextract#382 ·
-
comp/tools duplicate P2 sweeper:risk-compatibility tool/mcp type/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#132042 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
deepset-ai/haystack#13092 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
feder-cr/invisible_playwright_mcp#1408 ·
Maintainer thường phản hồi trong vòng 1 ngày