-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implement issue #375 — Compliance audit — 2026-05-29 #376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
don-petry
wants to merge
8
commits into
main
Choose a base branch
from
dev-lead/issue-375-20260529-1558
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+216
−1
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b0a4c1c
feat: implement issue #375 — Compliance audit — 2026-05-29
donpetry-bot 801b363
chore: apply manual instructions [skip ci-relay]
donpetry-bot 2c6be97
fix(bot): address bot feedback [skip ci-relay]
donpetry-bot f9d2025
fix(reviews): address review comments [skip ci-relay]
donpetry-bot 3720283
Merge branch 'main' into dev-lead/issue-375-20260529-1558
don-petry 020a5de
Merge branch 'main' into dev-lead/issue-375-20260529-1558
don-petry 978f528
Merge branch 'main' into dev-lead/issue-375-20260529-1558
don-petry f0190d5
Merge branch 'main' into dev-lead/issue-375-20260529-1558
don-petry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,213 @@ | ||
| # ───────────────────────────────────────────────────────────────────────────── | ||
| # SOURCE OF TRUTH: petry-projects/.github/standards/workflows/copilot-setup-steps.yml | ||
| # Standard: petry-projects/.github/standards/ci-standards.md#11-copilot-cloud-agent-setup | ||
| # | ||
| # ADOPTING THIS WORKFLOW: | ||
| # 1. Copy this file to .github/workflows/copilot-setup-steps.yml in your repo. | ||
| # 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. | ||
| # 6. Run manually from Actions → "Copilot Setup Steps" → "Run workflow" to verify. | ||
| # | ||
| # WHAT THIS FILE DOES: | ||
| # Bootstraps Copilot cloud agent's ephemeral environment BEFORE the agent starts | ||
| # working on your repo. Pre-installing dependencies deterministically: | ||
| # • Speeds up every agent session (no trial-and-error dependency discovery) | ||
| # • Makes private/internal packages available (impossible for the agent alone) | ||
| # • Ensures exact tool versions that match your CI pipeline | ||
| # Without this file the agent installs dependencies itself — slower, non-deterministic, | ||
| # and unreliable for repos with private packages or complex build graphs. | ||
| # | ||
| # SEE ALSO: | ||
| # AGENTS.md — authoritative development standards for this repo | ||
| # .github/copilot-instructions.md — always-on Copilot instructions (summary of AGENTS.md) | ||
| # .github/instructions/ — path-scoped instruction files per language | ||
| # | ||
| # CONSTRAINTS (enforced by GitHub, documented at docs.github.com): | ||
| # • Job MUST be named `copilot-setup-steps` to be recognized by Copilot cloud agent | ||
| # • timeout-minutes maximum: 59 (hard limit) | ||
| # • Customizable fields: steps, permissions, runs-on, services, snapshot, timeout-minutes | ||
| # • All other job-level settings are silently ignored by GitHub | ||
| # • fetch-depth on checkout is always overridden by the agent — do not rely on it here | ||
| # • This file MUST be present on the default branch to take effect | ||
| # | ||
| # AGENTS — READ BEFORE EDITING: | ||
| # This file is a PER-REPO TEMPLATE (Tier 2). There is no central reusable workflow | ||
| # because setup steps are inherently tech-stack-specific. Each repo owns its copy. | ||
| # Stay within the patterns documented in ci-standards.md §11. Do not change: | ||
| # • the job name (`copilot-setup-steps`) | ||
| # • the fork guard condition | ||
| # • the trigger events | ||
| # • the verify-environment step | ||
| # For changes to the org-wide pattern, open a PR against this file in | ||
| # petry-projects/.github and propagate to the fleet. | ||
| # ───────────────────────────────────────────────────────────────────────────── | ||
|
|
||
| name: "Copilot Setup Steps" | ||
|
|
||
| # Run automatically when this file changes (validates the setup steps work), | ||
| # and allow manual runs from the Actions tab at any time. | ||
| # NOT a standard CI trigger — this file should NOT be added to push: branches: [main]. | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| paths: | ||
| - .github/workflows/copilot-setup-steps.yml | ||
| pull_request: | ||
| paths: | ||
| - .github/workflows/copilot-setup-steps.yml | ||
|
|
||
| # Defense-in-depth: reset top-level permissions; set exact grants per-job. | ||
| # Pattern from envoyproxy/envoy and the org Permissions Policy (ci-standards.md). | ||
| permissions: {} | ||
|
|
||
| jobs: | ||
| # ── REQUIRED: Job name must be exactly `copilot-setup-steps` ──────────────── | ||
| copilot-setup-steps: | ||
| # Skip on fork-origin pull requests — forks cannot access org secrets required for private packages. | ||
| # `github.event.repository.fork` reflects the base repo (always false for org repos); the | ||
| # correct guard is on the PR head repo so that external fork PRs are skipped while direct | ||
| # pushes and manual runs always proceed. | ||
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| # Adjust upward only if your build or download steps genuinely need more time. | ||
| # Hard maximum enforced by GitHub is 59 minutes. | ||
| timeout-minutes: 30 | ||
|
|
||
| # Minimum permissions — Copilot receives its own separate token for its operations. | ||
| # Add `packages: read` if pulling from GitHub Packages (GHCR or npm private registry). | ||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| # ── REQUIRED ────────────────────────────────────────────────────────────── | ||
| # Checkout the repository so dependency manifests (package.json, go.mod, etc.) | ||
| # are available for the install steps below. | ||
| # Note: fetch-depth is always overridden by the agent — set it here only if | ||
| # your install steps need history (rare). | ||
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| # ── NODE.JS / NPM ────────────────────────────────────────────────────────── | ||
| # Uncomment for repos using npm (TypeScript, React, Electron, Google Apps Script). | ||
| # Use node-version-file: .nvmrc if the repo maintains a .nvmrc; otherwise pin | ||
| # the version to match the CI pipeline and the org standard (Node.js 22 LTS). | ||
| # | ||
| # - name: Set up Node.js | ||
| # uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| # with: | ||
| # node-version: "22" # or: node-version-file: .nvmrc | ||
| # cache: "npm" | ||
| # | ||
| # - name: Install Node.js dependencies | ||
| # run: npm ci --ignore-scripts | ||
|
|
||
| # ── NODE.JS / PNPM ──────────────────────────────────────────────────────── | ||
| # Uncomment for repos using pnpm (e.g., broodly TypeScript layer). | ||
| # pnpm must be set up before setup-node when using pnpm cache. | ||
| # | ||
| # - name: Set up pnpm | ||
| # uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4 | ||
| # | ||
| # - name: Set up Node.js (pnpm) | ||
| # uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| # with: | ||
| # node-version: "22" | ||
| # cache: "pnpm" | ||
| # | ||
| # - name: Install Node.js dependencies (pnpm) | ||
| # run: pnpm install --frozen-lockfile --ignore-scripts | ||
|
|
||
| # ── GO ──────────────────────────────────────────────────────────────────── | ||
| # Uncomment for repos with Go code (e.g., broodly API layer). | ||
| # Pin go-version to match go.mod to avoid silent toolchain upgrades. | ||
| # For monorepos, set cache-dependency-path to the correct go.sum path. | ||
| # | ||
| # - name: Set up Go | ||
| # uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 | ||
| # with: | ||
| # go-version: "stable" # or: go-version-file: go.mod | ||
| # cache-dependency-path: go.sum | ||
| # | ||
| # - name: Download Go dependencies | ||
| # run: go mod download | ||
|
|
||
| # ── PYTHON ──────────────────────────────────────────────────────────────── | ||
| # Uncomment for repos with Python code. | ||
| # Pin python-version to a specific minor version for reproducibility. | ||
| # | ||
| # - name: Set up Python | ||
| # uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||
| # with: | ||
| # python-version: "3.12" # pin to match your runtime | ||
| # cache: "pip" | ||
| # | ||
| # - name: Install Python dependencies | ||
| # run: pip install -r requirements.txt | ||
|
|
||
| # ── OPTIONAL: Additional build artifacts ────────────────────────────────── | ||
| # If the agent needs pre-built artifacts to run tests (e.g., a Next.js build, | ||
| # a compiled binary, or generated types), add a build step here. | ||
| # Keep it minimal — the agent will run its own build steps when needed. | ||
| # | ||
| # - name: Build | ||
| # run: npm run build | ||
|
|
||
| # ── OPTIONAL: gh-aw MCP extension ──────────────────────────────────────── | ||
| # Installs GitHub Advanced Workflows (gh-aw), a GitHub-developed MCP server | ||
| # that gives Copilot cloud agent extended GitHub API access (web search, | ||
| # enhanced PR tools, and more). Used by github/copilot-sdk, TryGhost/Ghost, | ||
| # and github/awesome-copilot. Recommended for any repo doing heavy GitHub | ||
| # platform work (issue triage, PR automation, release management). | ||
| # Pin the version to a specific SHA for supply-chain safety. | ||
| # | ||
| # - name: Install gh-aw MCP extension | ||
| # uses: github/gh-aw/actions/setup-cli@ce1794953e0ec42adc41b6fca05e02ab49ee21c3 | ||
| # with: | ||
| # version: v0.49.3 | ||
|
|
||
| # ── REQUIRED ────────────────────────────────────────────────────────────── | ||
| # Environment verification — always runs last. Fails loud if something is | ||
| # missing so the problem is caught here rather than mid-agent-session. | ||
| # Also surfaces the agent instruction files so session logs confirm they | ||
| # were found before the agent began working. | ||
| - name: Verify environment | ||
| run: | | ||
| echo "=== petry-projects Copilot cloud agent environment ===" | ||
| echo "Repository : ${{ github.repository }}" | ||
| echo "Ref : ${{ github.ref }}" | ||
| echo "Runner : ${{ runner.os }} / ${{ runner.arch }}" | ||
| echo "" | ||
| echo "--- Installed tool versions ---" | ||
| git --version | ||
| gh --version 2>/dev/null | head -1 || echo "gh: not installed" | ||
| node --version 2>/dev/null || echo "node: not installed" | ||
| npm --version 2>/dev/null || echo "npm: not installed" | ||
| go version 2>/dev/null || echo "go: not installed" | ||
| python --version 2>/dev/null || echo "python: not installed" | ||
| echo "" | ||
| echo "--- Agent instruction files ---" | ||
| if [ -f "AGENTS.md" ]; then | ||
| echo "✅ AGENTS.md ($(wc -l < AGENTS.md) lines)" | ||
| else | ||
| echo "❌ AGENTS.md — MISSING. Add this file per agent-standards.md." | ||
| exit 1 | ||
| fi | ||
| if [ -f ".github/copilot-instructions.md" ]; then | ||
| echo "✅ .github/copilot-instructions.md" | ||
| else | ||
| echo "ℹ️ .github/copilot-instructions.md — not present (optional but recommended)" | ||
| fi | ||
| # Count path-scoped instruction files (guard against missing directory) | ||
| INSTR_COUNT=0 | ||
| if [ -d ".github/instructions" ]; then | ||
| INSTR_COUNT=$(find .github/instructions -name "*.instructions.md" | wc -l) | ||
| fi | ||
| echo "ℹ️ .github/instructions/: ${INSTR_COUNT} file(s)" | ||
| echo "" | ||
| echo "✅ Setup complete — Copilot cloud agent is ready to work" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.