You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by po...@apache.org on 2026/09/27 15:38:29 UTC

(magpie) branch feat/suggest-gh-stack updated (db4125a4 -> f9cdf021)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a change to branch feat/suggest-gh-stack
in repository https://gitbox.apache.org/repos/asf/magpie.git


 discard db4125a4 docs: suggest the gh-stack extension when a change goes up as a series of dependent PRs
     add 4302c2f7 fix(setup): grant the vetted-ops and scratch directories as working directories (#1418)
     add b9b7f0bd fix(pr-management-stats): treat the pr-triage-fold timestamp as untrusted input (#1419)
     add 2cb1af49 fix(dev): make the pre-flight dedup test independent of glob order (#1428)
     new f9cdf021 docs: suggest the gh-stack extension when a change goes up as a series of dependent PRs

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (db4125a4)
            \
             N -- N -- N   refs/heads/feat/suggest-gh-stack (f9cdf021)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/setup/sandbox-troubleshooting.md              | 67 ++++++++++++++++++
 docs/setup/secure-agent-setup.md                   | 81 +++++++++++++++++++++-
 .../skills/isolated-setup-doctor/SKILL.md          | 32 ++++++++-
 .../scripts/probe-9-working-dirs.sh                | 57 +++++++++++++++
 .../skills/isolated-setup-install/SKILL.md         | 27 +++++++-
 .../skills/isolated-setup-update/SKILL.md          |  8 ++-
 .../skills/isolated-setup-verify/SKILL.md          | 10 ++-
 .../setup/setup_preflight/isolated_fingerprint.py  |  2 +-
 tools/agent-isolation/sandbox-add-project-root.sh  | 45 ++++++++++--
 .../tests/test_sandbox_add_project_root.py         | 50 +++++++++++++
 tools/dev/tests/test_check_duplication.py          |  9 +--
 tools/pr-management-stats/reference.py             | 19 ++++-
 .../pr-management-stats/tests/test_fold_parsing.py | 73 +++++++++++++++++++
 tools/skill-evals/README.md                        |  4 +-
 .../evals/setup-isolated-setup-doctor/README.md    |  4 +-
 .../expected.json                                  |  2 +-
 .../report.md                                      |  6 +-
 .../interpret-probes/fixtures/output-spec.md       |  3 +
 .../evals/setup-isolated-setup-verify/README.md    |  4 +-
 .../case-10-working-dirs-missing/expected.json     | 15 ++++
 .../case-10-working-dirs-missing/report.md         | 63 +++++++++++++++++
 .../step-1-classify/fixtures/output-spec.md        |  4 +-
 22 files changed, 550 insertions(+), 35 deletions(-)
 create mode 100755 plugins/magpie-setup/skills/isolated-setup-doctor/scripts/probe-9-working-dirs.sh
 create mode 100644 tools/pr-management-stats/tests/test_fold_parsing.py
 copy tools/skill-evals/evals/setup-isolated-setup-doctor/interpret-probes/fixtures/{case-17-git-hooks-unreadable => case-18-working-dirs-glob}/expected.json (70%)
 copy tools/skill-evals/evals/setup-isolated-setup-doctor/interpret-probes/fixtures/{case-16-dev-tools-not-granted => case-18-working-dirs-glob}/report.md (58%)
 create mode 100644 tools/skill-evals/evals/setup-isolated-setup-verify/step-1-classify/fixtures/case-10-working-dirs-missing/expected.json
 create mode 100644 tools/skill-evals/evals/setup-isolated-setup-verify/step-1-classify/fixtures/case-10-working-dirs-missing/report.md


(magpie) 01/01: docs: suggest the gh-stack extension when a change goes up as a series of dependent PRs

Posted by po...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch feat/suggest-gh-stack
in repository https://gitbox.apache.org/repos/asf/magpie.git

commit f9cdf021d8480b3c0c3fef33c0adbcb3cf716d88
Author: Jarek Potiuk <po...@apache.org>
AuthorDate: Sun Sep 27 16:52:10 2026 +0200

    docs: suggest the gh-stack extension when a change goes up as a series of dependent PRs
    
    GitHub's stacked PRs (the github/gh-stack extension) show a chain of
    dependent PRs as one stack. The agent conventions now say to check for
    the extension when a change is split into dependent PRs, suggest the
    user install it themselves (the secure setup denies extension installs
    from the agent), create each PR from its approved body with
    `gh pr create --base <previous branch> --web`, and join them with
    `gh stack link`. `gh stack submit --auto`, and letting `link` create PRs
    for bare branches, are ruled out because both post titles and bodies
    nobody approved.
    
    The same guidance goes into the AGENTS.md block setup writes for
    adopters (as a paragraph, so the setup skill's surface hash is
    unchanged), the fix-workflow template, and the prerequisites.
    
    Generated-by: Claude Opus 5
---
 AGENTS.md                                      | 10 ++++++++++
 docs/quick-start/prerequisites.md              |  1 +
 plugins/magpie-setup/skills/setup/install.md   | 10 ++++++++++
 plugins/magpie-setup/templates/fix-workflow.md |  8 ++++++++
 4 files changed, 29 insertions(+)

diff --git a/AGENTS.md b/AGENTS.md
index c67a23d0..da7574a9 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -538,6 +538,16 @@ to a home-dir path and update the tool to read from there.
 - **Always open PRs with `gh pr create --web`** so the human reviewer can check the title,
   body, and the generative-AI disclosure in the browser before submission. Pre-fill `--title`
   and `--body-file` (including the Gen-AI disclosure block) so they only need to review, not edit.
+- **Stack a series of dependent PRs with GitHub's stacked PRs.**
+  When one change is split into several PRs that each build on the previous one,
+  check for the [`github/gh-stack`](https://gh.io/stacks) extension with a plain `gh extension list`.
+  If it is missing, suggest the user install it themselves with `! gh extension install github/gh-stack` —
+  the secure setup denies extension installs from the agent, and installing one is the user's call.
+  Create each PR from its approved body file with `gh pr create --base <previous branch> --web`,
+  then join them bottom to top with `gh stack link <bottom-PR> … <top-PR>`.
+  Never use `gh stack submit --auto`, or let `gh stack link` create a PR for a bare branch:
+  both post auto-generated titles and bodies nobody approved.
+  If the repository does not have stacks enabled, the base-chained PRs still work; say so and carry on.
 - **Pass long or multi-line message bodies to `gh` (and similar CLIs) through a file,
   never inline.**
   Write the text to a file in the session scratch directory or `$TMPDIR` first,
diff --git a/docs/quick-start/prerequisites.md b/docs/quick-start/prerequisites.md
index b5e685dd..729acff3 100644
--- a/docs/quick-start/prerequisites.md
+++ b/docs/quick-start/prerequisites.md
@@ -215,6 +215,7 @@ JIRA), `contract:change-request` (GitHub PRs, JIRA patches, or dev@
   needs a fork of `<upstream>` on your GitHub account (it pushes a branch
   there, then opens the PR via `gh pr create --web`). Claude Code also
   ships a GitHub MCP; `gh` covers the rest and is what OpenCode uses.
+- **Optional: [`github/gh-stack`](https://gh.io/stacks).** When a change goes up as a series of dependent PRs, the agent suggests this `gh` extension and links the PRs into a native GitHub stack with `gh stack link`. Install it yourself with `gh extension install github/gh-stack`; the secure setup does not let the agent install extensions.
 - **JIRA / SVN-first projects.** No `gh` is required. The tracker is JIRA,
   review + merge run through `jira-patch` or `dev@` `[PATCH]` mail, and
   commits land via SVN — declare those backends in
diff --git a/plugins/magpie-setup/skills/setup/install.md b/plugins/magpie-setup/skills/setup/install.md
index 74b73fc2..8d2dca9f 100644
--- a/plugins/magpie-setup/skills/setup/install.md
+++ b/plugins/magpie-setup/skills/setup/install.md
@@ -1768,6 +1768,16 @@ framework before they hit a "skill not found" error:
    — never edit the snapshot directly. Framework changes go
    via PR to
    [`apache/magpie`](https://github.com/apache/magpie).
+
+   **Series of dependent PRs.** When a change is split into
+   PRs that build on each other, stack them with GitHub's
+   stacked PRs: if `gh extension list` does not show
+   [`github/gh-stack`](https://gh.io/stacks), suggest the
+   contributor run `gh extension install github/gh-stack`
+   themselves; open each PR from its approved body against
+   the previous PR's branch, in the browser, then
+   `gh stack link <bottom-PR> … <top-PR>`. Never let
+   `gh stack` generate titles or bodies.
    ```
 
    **If the adopter installed the `pr-management-*` family**
diff --git a/plugins/magpie-setup/templates/fix-workflow.md b/plugins/magpie-setup/templates/fix-workflow.md
index 0b7557e3..8a49c338 100644
--- a/plugins/magpie-setup/templates/fix-workflow.md
+++ b/plugins/magpie-setup/templates/fix-workflow.md
@@ -96,6 +96,14 @@ before submission. Pre-fill `--title` and `--body` (including the
 Gen-AI disclosure block) so the reviewer only needs to review, not
 edit.
 
+When a fix is split into several dependent PRs, stack them with
+GitHub's stacked PRs: suggest the contributor install the
+[`github/gh-stack`](https://gh.io/stacks) extension
+(`gh extension install github/gh-stack`) if `gh extension list`
+does not show it, open each PR with `gh pr create --base <previous
+branch> --web`, then run `gh stack link <bottom-PR> … <top-PR>`.
+Never let `gh stack` generate PR titles or bodies.
+
 ## Private-PR fallback
 
 The exceptional private-PR path (target branch `main` of the