From 9d2162c5583467dbda3917df788806c8e61d8e1f Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Mon, 16 Nov 2026 04:04:48 +0000 Subject: [PATCH 1/4] Point Copilot code review at verify-gemstash Copilot code review already discovers .agents/skills/verify-gemstash, but nothing tells it when to use the skill. A path-specific instruction, read only by code review, routes server and CLI changes through the skill's feature index and says how to report recipes it could not drive. copilot-code-review.yml prepares the review environment so the helper can run: Ruby 4.0 with the bundle, and lsof, which the runner image lacks and the helper's doctor and cleanup need. --- .../verify-gemstash.instructions.md | 12 ++++++++ .github/workflows/actions.lock | 3 ++ .github/workflows/copilot-code-review.yml | 28 +++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 .github/instructions/verify-gemstash.instructions.md create mode 100644 .github/workflows/copilot-code-review.yml diff --git a/.github/instructions/verify-gemstash.instructions.md b/.github/instructions/verify-gemstash.instructions.md new file mode 100644 index 00000000..ba6a6c59 --- /dev/null +++ b/.github/instructions/verify-gemstash.instructions.md @@ -0,0 +1,12 @@ +--- +applyTo: "lib/**,bin/**,exe/**,gemstash.gemspec,Gemfile,.agents/skills/verify-gemstash/**" +excludeAgent: "cloud-agent" +--- + +# Prove server and CLI changes with verify-gemstash + +This pull request changes code that the `gemstash` CLI or its gem server runs, or the verify-gemstash skill itself. Review its user-facing behavior with that skill: read `.agents/skills/verify-gemstash/SKILL.md`, then `.agents/skills/verify-gemstash/features/INDEX.md`, which routes each changed file to the feature recipes it reaches. The skill owns how to launch, drive, judge, report, and clean up; where these notes and the skill differ, follow the skill. + +- Drive every routed recipe with the skill's helper from the repository root. The review environment installs Ruby, the bundle, and `lsof` for it through `.github/workflows/copilot-code-review.yml`. A bullet whose observed result differs from the result its recipe states is a finding: comment on the changed lines most likely responsible, with the sub-feature ID, the expected result, and the output lines you observed, because people reading the review cannot open your evidence files. +- When the helper cannot run, such as no shell, `no Ruby found`, `bundle is incomplete`, a launch that never reports healthy, or a mirror step blocked by the network, review the diff against each routed recipe's stated results and Gotchas instead. Say in the review which sub-feature IDs you did not drive and the error that stopped them. Call a sub-feature verified only when you drove it and its evidence matches the recipe. +- When the diff changes a result that a recipe states, or adds user-facing behavior that no recipe covers, and the pull request leaves the feature files unchanged, comment on the change and name the feature file that needs updating. diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index e40417a0..cb85affd 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -3,6 +3,9 @@ # Docs: https://gh.io/actions-lockfile version: 'v0.0.3' workflows: + '.github/workflows/copilot-code-review.yml': + - 'actions/checkout@v7.0.1' + - 'ruby/setup-ruby@v1.338.0' '.github/workflows/gemstash-ci.yml': - 'actions/checkout@v7.0.1' - 're-actors/alls-green@v1.3.0' diff --git a/.github/workflows/copilot-code-review.yml b/.github/workflows/copilot-code-review.yml new file mode 100644 index 00000000..6a019daf --- /dev/null +++ b/.github/workflows/copilot-code-review.yml @@ -0,0 +1,28 @@ +name: Copilot code review setup + +# Copilot code review runs this job before it reviews a pull request, so the +# verify-gemstash helper (.agents/skills/verify-gemstash) can run during review. +# Copilot uses the copy on the default branch. These triggers only validate edits. +on: + workflow_dispatch: + pull_request: + paths: + - .github/workflows/copilot-code-review.yml + +jobs: + # Copilot only picks up a job with this name. + copilot-setup-steps: + runs-on: ubuntu-26.04 + timeout-minutes: 15 + permissions: + contents: read + steps: + - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + - uses: ruby/setup-ruby@v1.338.0 + with: + ruby-version: "4.0" + bundler-cache: true # 'bundle install' and cache + # verify-gemstash's doctor and cleanup need lsof; the runner image lacks it. + - run: sudo apt-get update && sudo apt-get install -y lsof From 63ead5ab853ae16ead1c0425f3ff6c05314c3c50 Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Mon, 16 Nov 2026 04:50:04 +0000 Subject: [PATCH 2/4] Keep known recipe failures out of inline review comments A recipe bullet that Gotchas records as a known failure already fails on main, so the reviewer lists it in the summary instead of attributing it to the changed lines. --- .github/instructions/verify-gemstash.instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/instructions/verify-gemstash.instructions.md b/.github/instructions/verify-gemstash.instructions.md index ba6a6c59..6d2a58cf 100644 --- a/.github/instructions/verify-gemstash.instructions.md +++ b/.github/instructions/verify-gemstash.instructions.md @@ -7,6 +7,6 @@ excludeAgent: "cloud-agent" This pull request changes code that the `gemstash` CLI or its gem server runs, or the verify-gemstash skill itself. Review its user-facing behavior with that skill: read `.agents/skills/verify-gemstash/SKILL.md`, then `.agents/skills/verify-gemstash/features/INDEX.md`, which routes each changed file to the feature recipes it reaches. The skill owns how to launch, drive, judge, report, and clean up; where these notes and the skill differ, follow the skill. -- Drive every routed recipe with the skill's helper from the repository root. The review environment installs Ruby, the bundle, and `lsof` for it through `.github/workflows/copilot-code-review.yml`. A bullet whose observed result differs from the result its recipe states is a finding: comment on the changed lines most likely responsible, with the sub-feature ID, the expected result, and the output lines you observed, because people reading the review cannot open your evidence files. +- Drive every routed recipe with the skill's helper from the repository root. The review environment installs Ruby, the bundle, and `lsof` for it through `.github/workflows/copilot-code-review.yml`. A bullet whose observed result differs from the result its recipe states, and that the recipe's Gotchas do not record as a `Known failure`, is a finding: comment on the changed lines most likely responsible, with the sub-feature ID, the expected result, and the output lines you observed, because people reading the review cannot open your evidence files. A known failure already fails on main, so list it in the review summary as a known failure with its observed output, and comment on changed lines only when the observed result differs from what Gotchas records. - When the helper cannot run, such as no shell, `no Ruby found`, `bundle is incomplete`, a launch that never reports healthy, or a mirror step blocked by the network, review the diff against each routed recipe's stated results and Gotchas instead. Say in the review which sub-feature IDs you did not drive and the error that stopped them. Call a sub-feature verified only when you drove it and its evidence matches the recipe. - When the diff changes a result that a recipe states, or adds user-facing behavior that no recipe covers, and the pull request leaves the feature files unchanged, comment on the change and name the feature file that needs updating. From 285e546487715e7d74d2fe9f23efb32fccaa3e8d Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Mon, 16 Nov 2026 09:31:13 +0000 Subject: [PATCH 3/4] Trim the Copilot verify-gemstash instructions to their core Drop text the skill already says, use its own term `fail`, and keep one sentence per line. Known failures now get no comment, and blocked sub-features are no longer reported in the review summary, because Copilot code review instructions cannot change the overview comment. --- .../instructions/verify-gemstash.instructions.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/instructions/verify-gemstash.instructions.md b/.github/instructions/verify-gemstash.instructions.md index 6d2a58cf..8e42c01c 100644 --- a/.github/instructions/verify-gemstash.instructions.md +++ b/.github/instructions/verify-gemstash.instructions.md @@ -5,8 +5,11 @@ excludeAgent: "cloud-agent" # Prove server and CLI changes with verify-gemstash -This pull request changes code that the `gemstash` CLI or its gem server runs, or the verify-gemstash skill itself. Review its user-facing behavior with that skill: read `.agents/skills/verify-gemstash/SKILL.md`, then `.agents/skills/verify-gemstash/features/INDEX.md`, which routes each changed file to the feature recipes it reaches. The skill owns how to launch, drive, judge, report, and clean up; where these notes and the skill differ, follow the skill. - -- Drive every routed recipe with the skill's helper from the repository root. The review environment installs Ruby, the bundle, and `lsof` for it through `.github/workflows/copilot-code-review.yml`. A bullet whose observed result differs from the result its recipe states, and that the recipe's Gotchas do not record as a `Known failure`, is a finding: comment on the changed lines most likely responsible, with the sub-feature ID, the expected result, and the output lines you observed, because people reading the review cannot open your evidence files. A known failure already fails on main, so list it in the review summary as a known failure with its observed output, and comment on changed lines only when the observed result differs from what Gotchas records. -- When the helper cannot run, such as no shell, `no Ruby found`, `bundle is incomplete`, a launch that never reports healthy, or a mirror step blocked by the network, review the diff against each routed recipe's stated results and Gotchas instead. Say in the review which sub-feature IDs you did not drive and the error that stopped them. Call a sub-feature verified only when you drove it and its evidence matches the recipe. -- When the diff changes a result that a recipe states, or adds user-facing behavior that no recipe covers, and the pull request leaves the feature files unchanged, comment on the change and name the feature file that needs updating. +- Read `.agents/skills/verify-gemstash/SKILL.md`, then `.agents/skills/verify-gemstash/features/INDEX.md`, and drive every recipe that INDEX.md routes the changed files to with the skill's helper. +- The review environment already has Ruby, the bundle, and `lsof` for the helper, installed by `.github/workflows/copilot-code-review.yml`. +- For each `fail` that does not match a `Known failure` entry in Gotchas, comment on the changed lines most likely responsible, with the sub-feature ID and the expected result. +- Quote the observed output lines in that comment, because readers of the review cannot open the evidence files. +- Leave a `fail` that matches its `Known failure` entry uncommented, because it already fails on main. +- If the helper cannot run, review the diff against those recipes' stated results and Gotchas instead. +- Call a sub-feature verified only when you drove it and its evidence matches the recipe. +- When the diff changes a result that a feature file states, or adds user-facing behavior that no recipe covers, and leaves the feature files unchanged, comment on the change and name the feature file to update. From 2f04f7e972318a8a8a8ad6eedfd0c7606c307d3f Mon Sep 17 00:00:00 2001 From: Colby Swandale Date: Mon, 16 Nov 2026 09:34:23 +0000 Subject: [PATCH 4/4] Flag known failures that a change fixes without deleting their entry A recipe bullet whose Known failure now meets its Expected result needs its Gotchas entry deleted in the same change, so the reviewer comments when the pull request keeps it. --- .github/instructions/verify-gemstash.instructions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/instructions/verify-gemstash.instructions.md b/.github/instructions/verify-gemstash.instructions.md index 8e42c01c..9290f5bf 100644 --- a/.github/instructions/verify-gemstash.instructions.md +++ b/.github/instructions/verify-gemstash.instructions.md @@ -8,8 +8,8 @@ excludeAgent: "cloud-agent" - Read `.agents/skills/verify-gemstash/SKILL.md`, then `.agents/skills/verify-gemstash/features/INDEX.md`, and drive every recipe that INDEX.md routes the changed files to with the skill's helper. - The review environment already has Ruby, the bundle, and `lsof` for the helper, installed by `.github/workflows/copilot-code-review.yml`. - For each `fail` that does not match a `Known failure` entry in Gotchas, comment on the changed lines most likely responsible, with the sub-feature ID and the expected result. -- Quote the observed output lines in that comment, because readers of the review cannot open the evidence files. -- Leave a `fail` that matches its `Known failure` entry uncommented, because it already fails on main. -- If the helper cannot run, review the diff against those recipes' stated results and Gotchas instead. +- When a bullet with a `Known failure` entry meets its `Expected:` result and the pull request keeps the entry, comment on the changed lines most likely responsible and name the Gotchas entry to delete. +- Quote the observed output lines wherever you report a `fail`, because readers of the review cannot open the evidence files. +- If the helper cannot run, review the diff against those recipes' stated results and Gotchas instead, and say in the review which sub-feature IDs you did not drive and the error that stopped them. - Call a sub-feature verified only when you drove it and its evidence matches the recipe. - When the diff changes a result that a feature file states, or adds user-facing behavior that no recipe covers, and leaves the feature files unchanged, comment on the change and name the feature file to update.