Skip to content

Point Copilot code review at verify-gemstash - #460

Merged
colby-swandale merged 4 commits into
mainfrom
copilot-review-verify-gemstash
Nov 16, 2026
Merged

colby-swandale merged 4 commits into
mainfrom
copilot-review-verify-gemstash

Conversation

@colby-swandale

@colby-swandale colby-swandale commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Copilot code review already loads .agents/skills/verify-gemstash (its review logs show [skills] catalogEntries=0 on #457 and catalogEntries=1 on #458), but nothing tells it when to use the skill, and its runner can't run the helper. This PR adds a code-review-only instruction and a review environment.

 .github/
+├── instructions/
+│   └── verify-gemstash.instructions.md   # applyTo lib/, bin/, exe/, gemspec, Gemfile, the skill; excludeAgent: cloud-agent
 └── workflows/
+    ├── copilot-code-review.yml           # copilot-setup-steps: Ruby 4.0 + bundle, lsof
     └── actions.lock                       # regenerated
Copilot reviews a PR touching lib/ (or bin/, exe/, gemspec, Gemfile, the skill)
  reads verify-gemstash.instructions.md from the head branch
  reads SKILL.md, then features/INDEX.md to route changed files to recipes
  if the helper runs: drives each routed recipe; a fail not recorded as a Known failure becomes a comment with expected vs observed output
  else: reviews the diff against the recipes' stated results and Gotchas

The skill stays the only source of verification steps; the instruction only points at it.

What reviews will and won't do:

  • Will: load the instruction on matching PRs and, once this is on main, run in an environment where the helper works.
  • Won't, or not guaranteed: GitHub doesn't promise the reviewer runs any command; it decides that itself, within its time limit. Evidence files aren't published; only what it quotes in comments. No status check or merge gate. SQLite and the memory cache only. Mirror recipes depend on the Copilot firewall allowlist, whose recommended list includes rubygems.org.

Evidence

  • Before: the reviewer's ubuntu-26.04 image has Ruby 3.3.8, no bundle, and no lsof. In a container set up the same way, the helper's doctor reports NOT healthy (process cwd is this run's work dir: cwd ''), and cleanup refuses with cleanup needs lsof.
    After: with Ruby 4.0, the bundle installed the way setup-ruby does it, and lsof, doctor ends doctor: healthy, and the full private-gems recipe matches every bullet: push, state, gem install, bundle install, bad key, upstream-only 403, yank and after-yank. Duplicate push returns the known HTTP 500 that the Gotchas section documents.
  • gh actions-lock --verify: All 4 workflows valid. actionlint is clean apart from its runner list not knowing the ubuntu-26.04 label.
  • applyTo checked with minimatch against past PRs: it matches files in Harden credential handling (logs, at-rest files, plaintext bind) #455, Add verify-gemstash agent skill for end-to-end verification #458 and Update CI Rubies and services, lock GitHub Actions, require Ruby 3.3 #459, and nothing in Run CI and release workflows on ubuntu-26.04 #457 (workflow-only).
  • Not yet proven on GitHub. This PR's own review won't load the instruction because it touches no matching paths, and copilot-code-review.yml is only read from main. After merge, the review run on the next PR touching lib/ should show the setup steps and the instruction in its Actions log, and the session log shows whether the helper ran.

Merge Danger

Door: two-way

Reverting removes both files; no settings change.

Blast Radius: Copilot reviews

Every Copilot review runs the setup job first: an extra minute or two of Actions time, cached by bundler-cache. If a setup step fails, Copilot reviews anyway with whatever environment it has. Other workflows and the gem are untouched.

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.
Copilot AI balanced review requested due to automatic review settings November 16, 2026 04:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-16T04:50:45.181698Z 9d2162c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The verification instructions require inline findings for recipe mismatches without evidence of a regression, risking attribution of known failures to unrelated changes.

1 open issue
What changed in this PR

Connects Copilot code review to the existing verify-gemstash skill and adds a setup environment for running its end-to-end recipes. Gemstash runtime code is unchanged.

Changes:

  • Adds review-only instructions for recipe selection, evidence reporting, and fallback review when execution is blocked.
  • Adds a Copilot setup job with Ruby 4.0, bundled dependencies, and lsof.
  • Registers the new workflow’s action dependencies in the lockfile.
File Description
.github/​workflows/​copilot-code-review.yml Prepares the environment for verification during Copilot reviews.
.github/​workflows/​actions.lock Records the new workflow’s action dependencies.
.github/​instructions/​verify-gemstash.instructions.md Directs matching reviews to the skill and defines reporting expectations.

Review effort: Balanced


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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. In 63ead5a, a bullet that Gotchas records as a Known failure now goes in the review summary as a known failure. Inline comments on changed lines are reserved for mismatches that Gotchas doesn't record, or that differ from what it records.

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.
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.
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.
@colby-swandale
colby-swandale merged commit f9a9d59 into main Nov 16, 2026
17 checks passed
@colby-swandale
colby-swandale deleted the copilot-review-verify-gemstash branch November 16, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants