Skip to content

feat: add copilot-setup-steps.yml for Copilot cloud agent - #197

Merged
don-petry merged 3 commits into
mainfrom
feat/add-copilot-setup-steps
May 21, 2026
Merged

don-petry merged 3 commits into
mainfrom
feat/add-copilot-setup-steps

Conversation

@don-petry

Copy link
Copy Markdown
Contributor

Summary

Adds .github/workflows/copilot-setup-steps.yml to pre-install Node.js dependencies before each Copilot cloud agent session.

Why this matters

Without this file, Copilot discovers and installs dependencies itself via trial and error — slow, non-deterministic, and impossible for repos with private packages. Pre-installing with npm ci ensures the agent always starts with exact, cached dependencies matching CI.

The verify step fails the job if AGENTS.md is missing — catching a misconfigured repo before the agent begins work.

Stack

Node.js 24 / npm — TypeScript + Electron desktop app.

Steps:

  1. actions/checkout (SHA-pinned)
  2. actions/setup-node@v4 with Node 24 + npm cache
  3. npm ci
  4. Verify environment (tool versions + AGENTS.md check)

Standard

@coderabbitai

coderabbitai Bot commented May 21, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@don-petry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 25 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 043bbad0-c8ae-46ab-b7df-ba171bf1aa10

📥 Commits

Reviewing files that changed from the base of the PR and between c2aa349 and 89cdcd1.

📒 Files selected for processing (1)
  • .github/workflows/copilot-setup-steps.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-copilot-setup-steps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread .github/workflows/release.yml Fixed

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request establishes the project foundation using Electron, React, and Vite, implementing core functionality for API key management, user onboarding, and a conversation interface featuring structured question inputs and audit logging. The reviewer identified several important improvements, including the omission of files referenced in the PR description and the need to explicitly enable SQLite foreign key enforcement for data integrity. Key technical feedback also addressed maintaining session continuity during retries, preventing stale closures in the renderer with useCallback, refining regex patterns for robustness, and ensuring that the retry logic specifically targets transient errors while adding safety checks for JSON parsing.

Comment thread package.json Resolved
Comment thread src/main/main.ts Resolved
Comment thread src/main/agent/claude-sdk-backend.ts Resolved
Comment thread src/main/main.ts Resolved
Comment thread src/main/main.ts Resolved
Comment thread src/main/agent/claude-sdk-backend.ts Resolved
Comment thread src/main/agent/claude-sdk-backend.ts Resolved
Bootstrap Copilot cloud agent's ephemeral environment before it starts
working. Pre-installs Node.js 24 and npm dependencies deterministically,
matching the CI pipeline configuration.

- Checkout code and install npm dependencies (npm ci)
- Verifies AGENTS.md presence as a gate check
- Implements petry-projects org standard (ci-standards.md §11)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@don-petry
don-petry force-pushed the feat/add-copilot-setup-steps branch from 367be33 to 10cd38d Compare May 21, 2026 02:58
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead Fix CI — failed

PR: #197 | SHA: 10cd38d868ad5523dc7fd40c8bc0df8b106727f1
Engine invocation failed (exit 41)

…teps.yml

- Fork guard: replace github.event.repository.fork (reflects base repo, always false
  for org repos) with github.event_name != 'pull_request' || head.repo.fork == false
  so external fork PRs are skipped while direct pushes and manual runs still run
- Verify step: guard find .github/instructions with [ -d ] check to prevent
  pipefail abort when the directory is absent

Addresses review comments on combsmith/.github#328 (Codex P1 and P2).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead Fix CI — failed

PR: #197 | SHA: 344e1e2a4ef18d7e165d71a0b2b5b2952805b6ba
Engine invocation failed (exit 41)

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead Fix CI — exhausted

This PR has had 2 consecutive engine failures (timeouts or errors). Automated CI fixing has been paused to avoid consuming further tokens.

Reason for last failure: Engine invocation failed (exit 41)

To re-enable, delete this comment or push a new commit with a substantially different change.

TalkTerm default branch currently contains docs/scripts and no lockfile, so
npm setup steps fail. Switch to checkout + verify only (same docs-only
pattern used in ContentTwin and bmad-bgreat-suite) until app source lands.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@don-petry
don-petry marked this pull request as ready for review May 21, 2026 12:18
@don-petry
don-petry requested a review from a team as a code owner May 21, 2026 12:18
Copilot AI review requested due to automatic review settings May 21, 2026 12:18
@don-petry
don-petry merged commit 937fc93 into main May 21, 2026
26 of 30 checks passed
@don-petry
don-petry deleted the feat/add-copilot-setup-steps branch May 21, 2026 12:19

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 89cdcd1e7c

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +63 to +67
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Verify environment
run: |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add dependency bootstrap steps before verification

This workflow never installs the project toolchain or dependencies: after checkout it jumps directly to Verify environment, so Copilot sessions start without node_modules and without a pinned Node version. In this repository’s Node/Electron stack, agent tasks that run lint/typecheck/tests can fail or spend significant time doing ad-hoc installs, which defeats the stated purpose of deterministic pre-setup for the cloud agent.

Useful? React with 👍 / 👎.

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.

Pull request overview

Adds a new GitHub Actions workflow (copilot-setup-steps) intended to bootstrap the Copilot cloud agent environment before sessions begin, primarily by checking out the repo and validating presence of agent instruction files.

Changes:

  • Introduces .github/workflows/copilot-setup-steps.yml with the required copilot-setup-steps job name and minimal permissions.
  • Adds a “Verify environment” step that fails if AGENTS.md is missing and reports instruction file presence.
Comments suppressed due to low confidence (1)

.github/workflows/copilot-setup-steps.yml:67

  • This workflow currently only checks out and verifies files; it doesn’t perform the Node.js 24 setup, npm caching, or npm ci install described in the PR summary. If the goal is to pre-install dependencies for Copilot sessions, add actions/setup-node + an install step (and optionally print node --version/npm --version in the verify block). If not, please update the PR description so it matches the workflow’s actual behavior.
    steps:
      - name: Checkout code
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

      - name: Verify environment
        run: |

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +33 to +36
# • This file MUST be present on the default branch to take effect
#
# STACK: documentation / scripts only — no build dependencies to install
# ─────────────────────────────────────────────────────────────────────────────
# 2. Keep every REQUIRED section — do NOT remove the checkout or verify steps.
# 3. Uncomment and adapt the stack blocks that match your repo's tech stack.
# 4. Delete (not just comment out) stacks that do not apply after initial setup.
# 5. Merge to the default branch — the workflow only triggers from the default branch.
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.

3 participants