From e9c710a877b6dc0a61062766ccb5cc99037cfcc2 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Sat, 12 Sep 2026 17:20:52 +0000 Subject: [PATCH 01/17] =?UTF-8?q?feat:=20implement=20issue=20#1115=20?= =?UTF-8?q?=E2=80=94=20[bug]=20dismiss-stale-bot-reviews=20is=20missing=20?= =?UTF-8?q?from=20this=20repo=20=E2=80=94=20a=20stale=20bot=20CHANGES=5FRE?= =?UTF-8?q?QUESTED=20blocks=20PRs=20forever=20(blocking=20#1094)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dismiss-stale-bot-reviews-tests.yml | 59 ++++++++++ .../workflows/dismiss-stale-bot-reviews.yml | 93 +++++++++++++++ scripts/deploy-standard-workflows.sh | 1 + scripts/dismiss-stale-bot-reviews.sh | 107 +++++++++++++++++ scripts/lib/dismiss-stale-bot-reviews.sh | 84 ++++++++++++++ .../workflows/dismiss-stale-bot-reviews.yml | 93 +++++++++++++++ .../standards-templates/vform-pins.bats | 12 +- .../dismiss-stale-bot-reviews/decision.bats | 109 ++++++++++++++++++ .../orchestrator.bats | 75 ++++++++++++ 9 files changed, 629 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/dismiss-stale-bot-reviews-tests.yml create mode 100644 .github/workflows/dismiss-stale-bot-reviews.yml create mode 100644 scripts/dismiss-stale-bot-reviews.sh create mode 100644 scripts/lib/dismiss-stale-bot-reviews.sh create mode 100644 standards/workflows/dismiss-stale-bot-reviews.yml create mode 100644 test/workflows/dismiss-stale-bot-reviews/decision.bats create mode 100644 test/workflows/dismiss-stale-bot-reviews/orchestrator.bats diff --git a/.github/workflows/dismiss-stale-bot-reviews-tests.yml b/.github/workflows/dismiss-stale-bot-reviews-tests.yml new file mode 100644 index 000000000..6d6907298 --- /dev/null +++ b/.github/workflows/dismiss-stale-bot-reviews-tests.yml @@ -0,0 +1,59 @@ +# Quality gate for the dismiss-stale-bot-reviews decision core (#1115). +# +# Triggered on any PR that touches: +# - scripts/dismiss-stale-bot-reviews.sh (orchestrator glue) +# - scripts/lib/dismiss-stale-bot-reviews.sh (pure decision core) +# - test/workflows/dismiss-stale-bot-reviews/** (the tests themselves) +# - .github/workflows/dismiss-stale-bot-reviews*.yml +# - standards/workflows/dismiss-stale-bot-reviews.yml +# +# Gate: bats — the decision matrix (dismiss an allow-listed bot's +# CHANGES_REQUESTED on a superseded commit; keep it on the current head; +# never touch human or non-allow-listed reviews). + +name: Dismiss Stale Bot Reviews Tests + +on: + pull_request: + paths: + - 'scripts/dismiss-stale-bot-reviews.sh' + - 'scripts/lib/dismiss-stale-bot-reviews.sh' + - 'test/workflows/dismiss-stale-bot-reviews/**' + - '.github/workflows/dismiss-stale-bot-reviews*.yml' + - 'standards/workflows/dismiss-stale-bot-reviews.yml' + push: + branches: + - main + paths: + - 'scripts/dismiss-stale-bot-reviews.sh' + - 'scripts/lib/dismiss-stale-bot-reviews.sh' + - 'test/workflows/dismiss-stale-bot-reviews/**' + - '.github/workflows/dismiss-stale-bot-reviews*.yml' + - 'standards/workflows/dismiss-stale-bot-reviews.yml' + +permissions: + contents: read + +concurrency: + group: dismiss-stale-bot-reviews-tests-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: bats + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 1 + + - name: Install bats + run: | + set -euo pipefail + sudo apt-get update -qq + sudo apt-get install -y --no-install-recommends bats + + - name: Run bats suite + run: bats --print-output-on-failure test/workflows/dismiss-stale-bot-reviews/ diff --git a/.github/workflows/dismiss-stale-bot-reviews.yml b/.github/workflows/dismiss-stale-bot-reviews.yml new file mode 100644 index 000000000..88985c297 --- /dev/null +++ b/.github/workflows/dismiss-stale-bot-reviews.yml @@ -0,0 +1,93 @@ +# ───────────────────────────────────────────────────────────────────────────── +# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dismiss-stale-bot-reviews.yml +# Standard: petry-projects/.github/standards/ci-standards.md +# Decision core: petry-projects/.github/scripts/lib/dismiss-stale-bot-reviews.sh +# petry-projects/.github/scripts/dismiss-stale-bot-reviews.sh +# +# AGENTS — READ BEFORE EDITING: +# • This file is a SELF-CONTAINED verbatim stub (the initiative-driver class), +# NOT a thin caller for a reusable. A bot's CHANGES_REQUESTED review is NOT +# cleared by GitHub's dismiss_stale_reviews_on_push (that only dismisses stale +# *approvals*), so it persists on a superseded commit and blocks reviewDecision +# forever (#617 blocker 3). This workflow dismisses such reviews once a NEWER +# commit has been pushed. +# • All dismiss/keep decision logic lives in the decision core above, which is +# unit-tested by bats in petry-projects/.github. This stub fetches that core +# from petry-projects/.github@v1 at runtime and runs it — the same runtime +# tooling-checkout pattern initiative-driver uses for the rate-limit gate. +# • You MUST NOT change: the trigger event types (synchronize + submitted), the +# fork guard, or the job-level `permissions:` block (pull-requests: write is +# required to dismiss a review; removing it breaks the dismissal). +# • BOT-ONLY by design: human reviews are never dismissed. To change the bot +# allow-list, set the DSBR_BOT_ALLOWLIST repo/org variable (comma-separated +# logins) — it REPLACES the default list. Do not fork the decision logic here. +# • If you need different behaviour, open a PR against the decision core in +# petry-projects/.github — the change propagates everywhere on next run. +# ───────────────────────────────────────────────────────────────────────────── +# +# Dismiss stale bot reviews — self-contained org-standard workflow. +# To adopt: copy this file verbatim to .github/workflows/dismiss-stale-bot-reviews.yml. +# No secrets required — uses GITHUB_TOKEN only (pull-requests: write). +name: Dismiss stale bot reviews + +on: + # A new push advances the head; a bot's CHANGES_REQUESTED now sits on a + # superseded commit and must be cleared. + pull_request: + types: [synchronize] + # A bot may also submit a review on an already-superseded commit (race); the + # decision core keeps it only when it is on the current head. + pull_request_review: + types: [submitted] + +permissions: {} + +concurrency: + # One lane per PR so a push burst does not fan out duplicate dismissals; the + # latest head wins. + group: dismiss-stale-bot-reviews-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + dismiss: + # Same-repo PRs only: a fork PR's GITHUB_TOKEN is read-only, so the dismissal + # mutation would fail. Forked-PR stale reviews are left for human handling. + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + pull-requests: write # dismissPullRequestReview via GITHUB_TOKEN + contents: read # checkout + steps: + - name: Checkout decision-core tooling from petry-projects/.github + # The decision core lives in petry-projects/.github; a consumer repo does + # not carry it, so fetch it read-only at the pinned v1 tag into a scratch + # path. petry-projects/.github is public, so GITHUB_TOKEN suffices. + # continue-on-error: a tooling-checkout outage must never fail the PR — the + # run step then finds no script and no-ops (fail-closed: nothing dismissed). + continue-on-error: true + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: petry-projects/.github + ref: v1 + path: .dsbr-tooling + fetch-depth: 1 + persist-credentials: false + + - name: Dismiss stale allow-listed bot reviews on superseded commits + env: + GH_TOKEN: ${{ github.token }} + # Optional wholesale override of the bot allow-list (comma-separated + # logins). Unset → the decision core's built-in CodeRabbit/Copilot list. + DSBR_BOT_ALLOWLIST: ${{ vars.DSBR_BOT_ALLOWLIST }} + run: | + set -euo pipefail + core=".dsbr-tooling/scripts/dismiss-stale-bot-reviews.sh" + if [ ! -f "$core" ]; then + echo "::warning::decision-core tooling unavailable (checkout failed); skipping — nothing dismissed" + exit 0 + fi + bash "$core" \ + --owner "${{ github.repository_owner }}" \ + --name "${{ github.event.repository.name }}" \ + --pr "${{ github.event.pull_request.number }}" diff --git a/scripts/deploy-standard-workflows.sh b/scripts/deploy-standard-workflows.sh index 2429e43cb..c7158280e 100755 --- a/scripts/deploy-standard-workflows.sh +++ b/scripts/deploy-standard-workflows.sh @@ -125,6 +125,7 @@ DEPLOYABLE_WORKFLOWS=( initiative-driver.yml pr-auto-review.yml feature-ideation.yml + dismiss-stale-bot-reviews.yml ) # Deployable workflows whose stub BODY carries a documented per-repo edit the diff --git a/scripts/dismiss-stale-bot-reviews.sh b/scripts/dismiss-stale-bot-reviews.sh new file mode 100644 index 000000000..0a38127f4 --- /dev/null +++ b/scripts/dismiss-stale-bot-reviews.sh @@ -0,0 +1,107 @@ +#!/usr/bin/env bash +# dismiss-stale-bot-reviews.sh — thin I/O glue for the dismiss-stale-bot-reviews +# workflow (#1115). Gathers a PR's effective reviews, asks the pure decision core +# which allow-listed bot CHANGES_REQUESTED reviews are stale (on a superseded +# commit), and dismisses exactly those via the GraphQL dismissPullRequestReview +# mutation. All of the decision logic lives in the sourced pure core below; this +# file only performs I/O (gh GraphQL reads + the dismissal mutation). +# +# Usage: +# dismiss-stale-bot-reviews.sh --owner --name --pr [--dry-run] +# +# Requirements: +# GH_TOKEN with `pull-requests: write` on the target repo (GITHUB_TOKEN is +# sufficient — the mutation acts within the same repo). `gh` and `jq` on PATH. +# +# Fail-loud: a failed GraphQL read aborts (set -euo pipefail). Fail-closed on the +# decision: a review whose staleness cannot be proven (missing oid) is left alone. + +set -euo pipefail + +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=scripts/lib/dismiss-stale-bot-reviews.sh +source "${SCRIPT_DIR}/lib/dismiss-stale-bot-reviews.sh" + +OWNER="" NAME="" PR="" DRY_RUN=false + +while [ $# -gt 0 ]; do + case "$1" in + --owner) OWNER="$2"; shift 2 ;; + --name) NAME="$2"; shift 2 ;; + --pr) PR="$2"; shift 2 ;; + --dry-run) DRY_RUN=true; shift ;; + -h|--help) sed -n '2,19p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; + *) echo "::error::unknown argument: $1" >&2; exit 1 ;; + esac +done + +if [ -z "$OWNER" ] || [ -z "$NAME" ] || [ -z "$PR" ]; then + echo "::error::--owner, --name and --pr are required" >&2 + exit 1 +fi + +# Fetch the PR head oid plus the EFFECTIVE (latest-per-reviewer) reviews — the +# exact set GitHub uses to compute reviewDecision — so we never dismiss an older +# review that a newer APPROVE already superseded. +read -r -d '' QUERY <<'GRAPHQL' || true +query($owner:String!, $name:String!, $number:Int!) { + repository(owner:$owner, name:$name) { + pullRequest(number:$number) { + headRefOid + latestReviews(first: 100) { + nodes { + id + state + commit { oid } + author { login __typename } + } + } + } + } +} +GRAPHQL + +# owner/name are passed as raw strings (-f) so a repo named like a number/bool is +# never type-coerced; number must be -F so it resolves to the GraphQL Int!. +response="$(gh api graphql \ + -f query="$QUERY" \ + -f owner="$OWNER" -f name="$NAME" -F number="$PR")" + +head_oid="$(jq -r '.data.repository.pullRequest.headRefOid // ""' <<<"$response")" +if [ -z "$head_oid" ]; then + echo "::warning::could not resolve head oid for ${OWNER}/${NAME}#${PR}; nothing to do" + exit 0 +fi + +# Emit one TAB-separated record per review: id, state, commit_oid, login, type. +reviews="$(jq -r ' + .data.repository.pullRequest.latestReviews.nodes[] + | [ .id, .state, (.commit.oid // ""), (.author.login // ""), (.author.__typename // "") ] + | @tsv +' <<<"$response")" + +dismissed=0 examined=0 +while IFS=$'\t' read -r review_id state commit_oid login author_type; do + [ -n "$review_id" ] || continue + examined=$((examined + 1)) + if ! dsbr_should_dismiss "$state" "$commit_oid" "$head_oid" "$login" "$author_type"; then + continue + fi + msg="Superseded: dismissed by dismiss-stale-bot-reviews because ${login}'s CHANGES_REQUESTED review was on ${commit_oid} but the PR head is now ${head_oid}. A still-valid finding returns as a fresh review on the new commit." + if [ "$DRY_RUN" = "true" ]; then + echo "[dry-run] would dismiss review ${review_id} by ${login} (on ${commit_oid}, head ${head_oid})" + dismissed=$((dismissed + 1)) + continue + fi + gh api graphql \ + -f query='mutation($id:ID!, $msg:String!) { + dismissPullRequestReview(input:{pullRequestReviewId:$id, message:$msg}) { + pullRequestReview { id state } + } + }' \ + -f id="$review_id" -f msg="$msg" >/dev/null + echo "Dismissed stale review ${review_id} by ${login} (was on ${commit_oid}, head ${head_oid})" + dismissed=$((dismissed + 1)) +done <<<"$reviews" + +echo "dismiss-stale-bot-reviews: examined ${examined} effective review(s), dismissed ${dismissed} stale bot review(s) on ${OWNER}/${NAME}#${PR} (head ${head_oid})" diff --git a/scripts/lib/dismiss-stale-bot-reviews.sh b/scripts/lib/dismiss-stale-bot-reviews.sh new file mode 100644 index 000000000..6207d9339 --- /dev/null +++ b/scripts/lib/dismiss-stale-bot-reviews.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash +# dismiss-stale-bot-reviews.sh (lib) — PURE decision core for the +# dismiss-stale-bot-reviews workflow (#1115). +# +# Why this exists: +# Agent-PR merge friction (#617, blocker 3): a bot's CHANGES_REQUESTED review is +# NOT cleared by GitHub's dismiss_stale_reviews_on_push (that only dismisses +# stale *approvals*), so it persists on a superseded commit and blocks +# reviewDecision even with 0 unresolved threads — until the bot re-APPROVEs or a +# human dismisses it by hand. This core decides which reviews a workflow may +# dismiss on its behalf. +# +# This file is side-effect-free and network-free so it can be unit-tested with +# bats (see test/workflows/dismiss-stale-bot-reviews/decision.bats). The +# orchestrator (scripts/dismiss-stale-bot-reviews.sh) sources it and acts on the +# verdict; the workflow is thin I/O glue. +# +# Decision contract: dismiss a review ONLY when ALL of the following hold — +# 1. its state is CHANGES_REQUESTED (an APPROVED/COMMENTED review never blocks); +# 2. its author is an allow-listed BOT (bot-only by design — human reviews are +# never dismissed, #1115 out-of-scope); +# 3. it sits on a commit that is NO LONGER the PR head (superseded). A still- +# valid finding on the current head is left in place; it returns as a fresh +# CHANGES_REQUESTED on the new SHA when a bot re-reviews. + +# Default allow-list of bot review authors whose stale CHANGES_REQUESTED reviews +# may be dismissed. Matches the AI code reviewers this org runs (CodeRabbit + +# Copilot). Override wholesale via DSBR_BOT_ALLOWLIST (comma-separated logins) or +# the optional CSV argument to the predicates below — an explicit list REPLACES +# this default so an operator has full, tight control over what may be dismissed. +DSBR_DEFAULT_ALLOWLIST=( + "coderabbitai[bot]" + "coderabbit[bot]" + "copilot[bot]" + "copilot-pull-request-reviewer[bot]" +) + +# dsbr_resolve_allowlist [csv] — print the active allow-list, one login per line. +# Precedence: explicit CSV arg > DSBR_BOT_ALLOWLIST env > built-in default. A +# supplied list REPLACES the default. Entries are whitespace-trimmed so +# "a[bot], b[bot]" resolves to "a[bot]" and "b[bot]", not "a[bot]" and " b[bot]". +dsbr_resolve_allowlist() { + local csv="${1:-${DSBR_BOT_ALLOWLIST:-}}" + if [ -z "$csv" ]; then + printf '%s\n' "${DSBR_DEFAULT_ALLOWLIST[@]}" + return 0 + fi + # Split on commas without pathname-globbing (read -a, not unquoted expansion). + local entries=() entry + IFS=',' read -r -a entries <<<"$csv" + for entry in "${entries[@]}"; do + entry="${entry#"${entry%%[![:space:]]*}"}" # strip leading whitespace + entry="${entry%"${entry##*[![:space:]]}"}" # strip trailing whitespace + [ -n "$entry" ] && printf '%s\n' "$entry" + done +} + +# dsbr_is_allowlisted_bot [allowlist_csv] +# 0 if the review author is an allow-listed BOT, non-zero otherwise. +# The author_type (GraphQL review author __typename) MUST be "Bot": this is the +# bot-only gate that guarantees a human review is never a dismissal candidate, +# even if a human login were mistakenly present in the allow-list. +dsbr_is_allowlisted_bot() { + local login="$1" author_type="$2" csv="${3:-}" + [ "$author_type" = "Bot" ] || return 1 + local allowed + while IFS= read -r allowed; do + [ "$allowed" = "$login" ] && return 0 + done < <(dsbr_resolve_allowlist "$csv") + return 1 +} + +# dsbr_should_dismiss [allowlist_csv] +# 0 (dismiss) iff the review is an allow-listed bot's CHANGES_REQUESTED sitting +# on a superseded commit; non-zero (keep) otherwise. Fail-closed: a missing +# review_oid or head_oid cannot prove the review is superseded, so it is kept. +dsbr_should_dismiss() { + local state="$1" review_oid="$2" head_oid="$3" login="$4" author_type="$5" csv="${6:-}" + [ "$state" = "CHANGES_REQUESTED" ] || return 1 + [ -n "$review_oid" ] && [ -n "$head_oid" ] || return 1 + [ "$review_oid" != "$head_oid" ] || return 1 + dsbr_is_allowlisted_bot "$login" "$author_type" "$csv" || return 1 + return 0 +} diff --git a/standards/workflows/dismiss-stale-bot-reviews.yml b/standards/workflows/dismiss-stale-bot-reviews.yml new file mode 100644 index 000000000..88985c297 --- /dev/null +++ b/standards/workflows/dismiss-stale-bot-reviews.yml @@ -0,0 +1,93 @@ +# ───────────────────────────────────────────────────────────────────────────── +# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dismiss-stale-bot-reviews.yml +# Standard: petry-projects/.github/standards/ci-standards.md +# Decision core: petry-projects/.github/scripts/lib/dismiss-stale-bot-reviews.sh +# petry-projects/.github/scripts/dismiss-stale-bot-reviews.sh +# +# AGENTS — READ BEFORE EDITING: +# • This file is a SELF-CONTAINED verbatim stub (the initiative-driver class), +# NOT a thin caller for a reusable. A bot's CHANGES_REQUESTED review is NOT +# cleared by GitHub's dismiss_stale_reviews_on_push (that only dismisses stale +# *approvals*), so it persists on a superseded commit and blocks reviewDecision +# forever (#617 blocker 3). This workflow dismisses such reviews once a NEWER +# commit has been pushed. +# • All dismiss/keep decision logic lives in the decision core above, which is +# unit-tested by bats in petry-projects/.github. This stub fetches that core +# from petry-projects/.github@v1 at runtime and runs it — the same runtime +# tooling-checkout pattern initiative-driver uses for the rate-limit gate. +# • You MUST NOT change: the trigger event types (synchronize + submitted), the +# fork guard, or the job-level `permissions:` block (pull-requests: write is +# required to dismiss a review; removing it breaks the dismissal). +# • BOT-ONLY by design: human reviews are never dismissed. To change the bot +# allow-list, set the DSBR_BOT_ALLOWLIST repo/org variable (comma-separated +# logins) — it REPLACES the default list. Do not fork the decision logic here. +# • If you need different behaviour, open a PR against the decision core in +# petry-projects/.github — the change propagates everywhere on next run. +# ───────────────────────────────────────────────────────────────────────────── +# +# Dismiss stale bot reviews — self-contained org-standard workflow. +# To adopt: copy this file verbatim to .github/workflows/dismiss-stale-bot-reviews.yml. +# No secrets required — uses GITHUB_TOKEN only (pull-requests: write). +name: Dismiss stale bot reviews + +on: + # A new push advances the head; a bot's CHANGES_REQUESTED now sits on a + # superseded commit and must be cleared. + pull_request: + types: [synchronize] + # A bot may also submit a review on an already-superseded commit (race); the + # decision core keeps it only when it is on the current head. + pull_request_review: + types: [submitted] + +permissions: {} + +concurrency: + # One lane per PR so a push burst does not fan out duplicate dismissals; the + # latest head wins. + group: dismiss-stale-bot-reviews-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + dismiss: + # Same-repo PRs only: a fork PR's GITHUB_TOKEN is read-only, so the dismissal + # mutation would fail. Forked-PR stale reviews are left for human handling. + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + pull-requests: write # dismissPullRequestReview via GITHUB_TOKEN + contents: read # checkout + steps: + - name: Checkout decision-core tooling from petry-projects/.github + # The decision core lives in petry-projects/.github; a consumer repo does + # not carry it, so fetch it read-only at the pinned v1 tag into a scratch + # path. petry-projects/.github is public, so GITHUB_TOKEN suffices. + # continue-on-error: a tooling-checkout outage must never fail the PR — the + # run step then finds no script and no-ops (fail-closed: nothing dismissed). + continue-on-error: true + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: petry-projects/.github + ref: v1 + path: .dsbr-tooling + fetch-depth: 1 + persist-credentials: false + + - name: Dismiss stale allow-listed bot reviews on superseded commits + env: + GH_TOKEN: ${{ github.token }} + # Optional wholesale override of the bot allow-list (comma-separated + # logins). Unset → the decision core's built-in CodeRabbit/Copilot list. + DSBR_BOT_ALLOWLIST: ${{ vars.DSBR_BOT_ALLOWLIST }} + run: | + set -euo pipefail + core=".dsbr-tooling/scripts/dismiss-stale-bot-reviews.sh" + if [ ! -f "$core" ]; then + echo "::warning::decision-core tooling unavailable (checkout failed); skipping — nothing dismissed" + exit 0 + fi + bash "$core" \ + --owner "${{ github.repository_owner }}" \ + --name "${{ github.event.repository.name }}" \ + --pr "${{ github.event.pull_request.number }}" diff --git a/test/scripts/standards-templates/vform-pins.bats b/test/scripts/standards-templates/vform-pins.bats index 6a2708c94..5b29dcfe4 100644 --- a/test/scripts/standards-templates/vform-pins.bats +++ b/test/scripts/standards-templates/vform-pins.bats @@ -8,14 +8,18 @@ # and never the bare `/stable` form (a bare pin cannot be migrated by the # major-scope tooling and silently rides whatever the tip of the channel is). # -# The 4 verbatim templates (ci, copilot-setup-steps, initiative-driver, -# sonarcloud) have no first-party reusable `uses:` line and are exempt. +# The verbatim templates (ci, copilot-setup-steps, initiative-driver, sonarcloud, +# dismiss-stale-bot-reviews) have no first-party reusable `uses:` line and are +# exempt — they are self-contained workflows, not thin callers for a reusable. REPO_ROOT="$(cd -- "${BATS_TEST_DIRNAME}/../../.." && pwd)" WF_DIR="${REPO_ROOT}/standards/workflows" # The templates that carry no first-party channel-ref `uses:` line. -VERBATIM="ci.yml copilot-setup-steps.yml initiative-driver.yml sonarcloud.yml" +# dismiss-stale-bot-reviews.yml (#1115) is self-contained: a reusable-backed stub +# would have to pin a /v-stable channel tag that can only be cut after +# the reusable merges, so it lands as the verbatim class like initiative-driver. +VERBATIM="ci.yml copilot-setup-steps.yml initiative-driver.yml sonarcloud.yml dismiss-stale-bot-reviews.yml" # Emit each first-party channel-ref line in a file (marker-tagged uses lines). channel_ref_lines() { @@ -62,7 +66,7 @@ ref_of() { done } -@test "the 4 verbatim templates carry no first-party channel-ref line" { +@test "the verbatim templates carry no first-party channel-ref line" { local name lines for name in $VERBATIM; do [ -f "${WF_DIR}/${name}" ] || { echo "missing ${name}"; return 1; } diff --git a/test/workflows/dismiss-stale-bot-reviews/decision.bats b/test/workflows/dismiss-stale-bot-reviews/decision.bats new file mode 100644 index 000000000..259ee10e3 --- /dev/null +++ b/test/workflows/dismiss-stale-bot-reviews/decision.bats @@ -0,0 +1,109 @@ +#!/usr/bin/env bats +# Tests for scripts/lib/dismiss-stale-bot-reviews.sh — the PURE decision core for +# the dismiss-stale-bot-reviews workflow (#1115). +# +# The contract the workflow enforces: a bot's CHANGES_REQUESTED review is NOT +# cleared by GitHub's dismiss_stale_reviews_on_push (that only dismisses stale +# *approvals*), so it persists on a superseded commit and blocks reviewDecision +# forever. This core decides which reviews to dismiss, and MUST: +# - dismiss an allow-listed bot's CHANGES_REQUESTED review that sits on a +# commit that is NO LONGER the PR head (superseded), and +# - NOT dismiss it when the review is on the current head (still valid), and +# - NEVER touch a human review (bot-only by design, #1115 out-of-scope), nor a +# non-allow-listed bot, nor any non-CHANGES_REQUESTED state. + +REPO_ROOT="$(cd -- "${BATS_TEST_DIRNAME}/../../.." && pwd)" + +setup() { + # shellcheck source=/dev/null + . "${REPO_ROOT}/scripts/lib/dismiss-stale-bot-reviews.sh" +} + +HEAD="8e5bc8db" # current PR head (committed after the blocking review) +OLD="aca48dc4" # the commit the stale review sits on (superseded) + +# ── dsbr_should_dismiss — the core AC #5 decision ──────────────────────────── + +@test "dismiss: allow-listed bot CHANGES_REQUESTED on a superseded commit" { + run dsbr_should_dismiss CHANGES_REQUESTED "$OLD" "$HEAD" "coderabbitai[bot]" Bot + [ "$status" -eq 0 ] +} + +@test "keep: allow-listed bot CHANGES_REQUESTED on the CURRENT head (still valid)" { + run dsbr_should_dismiss CHANGES_REQUESTED "$HEAD" "$HEAD" "coderabbitai[bot]" Bot + [ "$status" -ne 0 ] +} + +@test "keep: a human CHANGES_REQUESTED on a superseded commit is never dismissed" { + run dsbr_should_dismiss CHANGES_REQUESTED "$OLD" "$HEAD" "don-petry" User + [ "$status" -ne 0 ] +} + +@test "keep: a non-allow-listed bot is never dismissed even when superseded" { + run dsbr_should_dismiss CHANGES_REQUESTED "$OLD" "$HEAD" "some-random[bot]" Bot + [ "$status" -ne 0 ] +} + +@test "keep: an APPROVED review on a superseded commit is not dismissed" { + run dsbr_should_dismiss APPROVED "$OLD" "$HEAD" "coderabbitai[bot]" Bot + [ "$status" -ne 0 ] +} + +@test "keep: a COMMENTED review is not dismissed" { + run dsbr_should_dismiss COMMENTED "$OLD" "$HEAD" "coderabbitai[bot]" Bot + [ "$status" -ne 0 ] +} + +@test "keep: empty head oid is a no-op (fail-closed, cannot prove superseded)" { + run dsbr_should_dismiss CHANGES_REQUESTED "$OLD" "" "coderabbitai[bot]" Bot + [ "$status" -ne 0 ] +} + +@test "keep: empty review oid is a no-op (fail-closed)" { + run dsbr_should_dismiss CHANGES_REQUESTED "" "$HEAD" "coderabbitai[bot]" Bot + [ "$status" -ne 0 ] +} + +@test "dismiss: copilot review bot on a superseded commit" { + run dsbr_should_dismiss CHANGES_REQUESTED "$OLD" "$HEAD" "copilot-pull-request-reviewer[bot]" Bot + [ "$status" -eq 0 ] +} + +# ── dsbr_is_allowlisted_bot — allow-list + bot-only gate ───────────────────── + +@test "allowlist: a default-list bot with Bot type is allow-listed" { + run dsbr_is_allowlisted_bot "coderabbitai[bot]" Bot + [ "$status" -eq 0 ] +} + +@test "allowlist: a human login is NOT allow-listed even if added to the list" { + # Bot-only gate: author_type must be Bot. A User login is rejected regardless. + run dsbr_is_allowlisted_bot "don-petry" User "don-petry,coderabbitai[bot]" + [ "$status" -ne 0 ] +} + +@test "allowlist: an unknown bot is not allow-listed" { + run dsbr_is_allowlisted_bot "renovate[bot]" Bot "coderabbitai[bot]" + [ "$status" -ne 0 ] +} + +@test "allowlist: explicit CSV override replaces the default list" { + # renovate is not in the default list; supplying it via CSV allow-lists it. + run dsbr_is_allowlisted_bot "renovate[bot]" Bot "renovate[bot]" + [ "$status" -eq 0 ] + # and a default-list bot is NOT accepted once an explicit CSV is supplied. + run dsbr_is_allowlisted_bot "coderabbitai[bot]" Bot "renovate[bot]" + [ "$status" -ne 0 ] +} + +@test "allowlist: DSBR_BOT_ALLOWLIST env overrides the default list" { + DSBR_BOT_ALLOWLIST="renovate[bot]" run dsbr_is_allowlisted_bot "renovate[bot]" Bot + [ "$status" -eq 0 ] + DSBR_BOT_ALLOWLIST="renovate[bot]" run dsbr_is_allowlisted_bot "coderabbitai[bot]" Bot + [ "$status" -ne 0 ] +} + +@test "allowlist: whitespace around CSV entries is trimmed" { + run dsbr_is_allowlisted_bot "coderabbitai[bot]" Bot " foo[bot] , coderabbitai[bot] " + [ "$status" -eq 0 ] +} diff --git a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats new file mode 100644 index 000000000..ae13e4761 --- /dev/null +++ b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats @@ -0,0 +1,75 @@ +#!/usr/bin/env bats +# Integration tests for scripts/dismiss-stale-bot-reviews.sh — the thin I/O glue +# (#1115). These exercise the WHOLE decision path (GraphQL read → pure core → +# dismissal mutation) with a fake `gh`, so a regression in how the glue feeds the +# core surfaces here, not only in the pure-core unit tests. +# +# Fixture PR (mirrors #1094): head is 8e5bc8db; an allow-listed bot's +# CHANGES_REQUESTED sits on the superseded aca48dc4 and MUST be dismissed, while +# a same-bot review on the current head, a human review, and a bot APPROVE must +# all be left alone. + +REPO_ROOT="$(cd -- "${BATS_TEST_DIRNAME}/../../.." && pwd)" +ORCH="${REPO_ROOT}/scripts/dismiss-stale-bot-reviews.sh" + +setup() { + command -v jq >/dev/null 2>&1 || skip "jq not available" + TT_TMP="$(mktemp -d)" + GH_LOG="${TT_TMP}/gh.log"; export GH_LOG + DSBR_RESPONSE="${TT_TMP}/response.json"; export DSBR_RESPONSE + cat > "$DSBR_RESPONSE" <<'JSON' +{"data":{"repository":{"pullRequest":{ + "headRefOid":"8e5bc8db", + "latestReviews":{"nodes":[ + {"id":"PRR_stale","state":"CHANGES_REQUESTED","commit":{"oid":"aca48dc4"},"author":{"login":"coderabbitai[bot]","__typename":"Bot"}}, + {"id":"PRR_head","state":"CHANGES_REQUESTED","commit":{"oid":"8e5bc8db"},"author":{"login":"coderabbitai[bot]","__typename":"Bot"}}, + {"id":"PRR_human","state":"CHANGES_REQUESTED","commit":{"oid":"aca48dc4"},"author":{"login":"don-petry","__typename":"User"}}, + {"id":"PRR_approved","state":"APPROVED","commit":{"oid":"aca48dc4"},"author":{"login":"coderabbitai[bot]","__typename":"Bot"}} + ]} +}}}} +JSON + # Fake gh: a mutation call (args mention dismissPullRequestReview) logs the + # dismissed review id; any other graphql call returns the canned read response. + local bin="${TT_TMP}/bin"; mkdir -p "$bin" + cat > "$bin/gh" <<'STUB' +#!/usr/bin/env bash +if printf '%s\0' "$@" | grep -qz 'dismissPullRequestReview'; then + for a in "$@"; do + case "$a" in id=*) printf 'DISMISS %s\n' "${a#id=}" >> "$GH_LOG" ;; esac + done + printf '{"data":{"dismissPullRequestReview":{"pullRequestReview":{"id":"x","state":"DISMISSED"}}}}' + exit 0 +fi +cat "$DSBR_RESPONSE" +STUB + chmod +x "$bin/gh" + PATH="${bin}:${PATH}"; export PATH +} + +teardown() { rm -rf "${TT_TMP:-/nonexistent}"; } + +@test "dismisses ONLY the stale allow-listed bot review; leaves head/human/approved" { + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 + [ "$status" -eq 0 ] + # exactly one dismissal, and it is the superseded bot review + [ "$(grep -c '^DISMISS ' "$GH_LOG")" -eq 1 ] + grep -qx 'DISMISS PRR_stale' "$GH_LOG" + # the still-valid head review, the human review, and the approve are untouched + ! grep -q 'DISMISS PRR_head' "$GH_LOG" + ! grep -q 'DISMISS PRR_human' "$GH_LOG" + ! grep -q 'DISMISS PRR_approved' "$GH_LOG" + echo "$output" | grep -q 'dismissed 1 stale bot review' +} + +@test "dry-run examines but dismisses nothing (no mutation)" { + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --dry-run + [ "$status" -eq 0 ] + [ ! -s "$GH_LOG" ] || ! grep -q '^DISMISS ' "$GH_LOG" + echo "$output" | grep -q '\[dry-run\] would dismiss review PRR_stale' +} + +@test "requires --owner, --name and --pr" { + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github + [ "$status" -ne 0 ] + echo "$output" | grep -q 'required' +} From 1628c704e9371e9073856fe913815501cf0ff0ff Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Sat, 12 Sep 2026 17:27:03 +0000 Subject: [PATCH 02/17] chore: dev-lead update (review-changes) [skip ci-relay] --- scripts/dismiss-stale-bot-reviews.sh | 61 +++++++++++++------ .../orchestrator.bats | 55 +++++++++++++++++ 2 files changed, 99 insertions(+), 17 deletions(-) diff --git a/scripts/dismiss-stale-bot-reviews.sh b/scripts/dismiss-stale-bot-reviews.sh index 0a38127f4..2ea5884bc 100644 --- a/scripts/dismiss-stale-bot-reviews.sh +++ b/scripts/dismiss-stale-bot-reviews.sh @@ -42,13 +42,19 @@ fi # Fetch the PR head oid plus the EFFECTIVE (latest-per-reviewer) reviews — the # exact set GitHub uses to compute reviewDecision — so we never dismiss an older -# review that a newer APPROVE already superseded. +# review that a newer APPROVE already superseded. latestReviews is a paginated +# connection capped at 100 nodes per page: a single unpaginated page would +# silently drop every effective review past the first 100 distinct reviewers, so +# a stale bot CHANGES_REQUESTED beyond that cut-off would survive while the script +# reported success (fail-open, #1116). Page through the whole connection so the +# decision core sees the complete effective set. read -r -d '' QUERY <<'GRAPHQL' || true -query($owner:String!, $name:String!, $number:Int!) { +query($owner:String!, $name:String!, $number:Int!, $cursor:String) { repository(owner:$owner, name:$name) { pullRequest(number:$number) { headRefOid - latestReviews(first: 100) { + latestReviews(first: 100, after: $cursor) { + pageInfo { hasNextPage endCursor } nodes { id state @@ -63,22 +69,43 @@ GRAPHQL # owner/name are passed as raw strings (-f) so a repo named like a number/bool is # never type-coerced; number must be -F so it resolves to the GraphQL Int!. -response="$(gh api graphql \ - -f query="$QUERY" \ - -f owner="$OWNER" -f name="$NAME" -F number="$PR")" +head_oid="" reviews="" cursor="" first=true +while true; do + # cursor="" => first page (pass JSON null, -F); otherwise pass the string (-f). + if [ -z "$cursor" ]; then + cursor_arg=(-F cursor=null) + else + cursor_arg=(-f "cursor=$cursor") + fi + response="$(gh api graphql \ + -f query="$QUERY" \ + "${cursor_arg[@]}" \ + -f owner="$OWNER" -f name="$NAME" -F number="$PR")" -head_oid="$(jq -r '.data.repository.pullRequest.headRefOid // ""' <<<"$response")" -if [ -z "$head_oid" ]; then - echo "::warning::could not resolve head oid for ${OWNER}/${NAME}#${PR}; nothing to do" - exit 0 -fi + # Resolve the head oid once, from the first page, and fail-loud-then-noop if the + # PR cannot be resolved — before examining any reviews. + if [ "$first" = "true" ]; then + head_oid="$(jq -r '.data.repository.pullRequest.headRefOid // ""' <<<"$response")" + if [ -z "$head_oid" ]; then + echo "::warning::could not resolve head oid for ${OWNER}/${NAME}#${PR}; nothing to do" + exit 0 + fi + first=false + fi -# Emit one TAB-separated record per review: id, state, commit_oid, login, type. -reviews="$(jq -r ' - .data.repository.pullRequest.latestReviews.nodes[] - | [ .id, .state, (.commit.oid // ""), (.author.login // ""), (.author.__typename // "") ] - | @tsv -' <<<"$response")" + # Emit one TAB-separated record per review: id, state, commit_oid, login, type. + page_reviews="$(jq -r ' + .data.repository.pullRequest.latestReviews.nodes[] + | [ .id, .state, (.commit.oid // ""), (.author.login // ""), (.author.__typename // "") ] + | @tsv + ' <<<"$response")" + [ -n "$page_reviews" ] && reviews+="${page_reviews}"$'\n' + + has_next="$(jq -r '.data.repository.pullRequest.latestReviews.pageInfo.hasNextPage // false' <<<"$response")" + end_cursor="$(jq -r '.data.repository.pullRequest.latestReviews.pageInfo.endCursor // ""' <<<"$response")" + [ "$has_next" = "true" ] && [ -n "$end_cursor" ] || break + cursor="$end_cursor" +done dismissed=0 examined=0 while IFS=$'\t' read -r review_id state commit_oid login author_type; do diff --git a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats index ae13e4761..b3f4a0e87 100644 --- a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats +++ b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats @@ -68,6 +68,61 @@ teardown() { rm -rf "${TT_TMP:-/nonexistent}"; } echo "$output" | grep -q '\[dry-run\] would dismiss review PRR_stale' } +@test "pages latestReviews: dismisses a stale bot review found only on page 2" { + # A stale allow-listed bot CHANGES_REQUESTED sits beyond the first 100-review + # page. A single unpaginated read would drop it (fail-open, #1116); the glue + # must follow pageInfo.endCursor and still dismiss it. + DSBR_PAGE1="${TT_TMP}/page1.json"; export DSBR_PAGE1 + DSBR_PAGE2="${TT_TMP}/page2.json"; export DSBR_PAGE2 + cat > "$DSBR_PAGE1" <<'JSON' +{"data":{"repository":{"pullRequest":{ + "headRefOid":"8e5bc8db", + "latestReviews":{ + "pageInfo":{"hasNextPage":true,"endCursor":"CURSOR2"}, + "nodes":[ + {"id":"PRR_head_p1","state":"CHANGES_REQUESTED","commit":{"oid":"8e5bc8db"},"author":{"login":"coderabbitai[bot]","__typename":"Bot"}} + ] + } +}}}} +JSON + cat > "$DSBR_PAGE2" <<'JSON' +{"data":{"repository":{"pullRequest":{ + "headRefOid":"8e5bc8db", + "latestReviews":{ + "pageInfo":{"hasNextPage":false,"endCursor":null}, + "nodes":[ + {"id":"PRR_stale_p2","state":"CHANGES_REQUESTED","commit":{"oid":"aca48dc4"},"author":{"login":"coderabbitai[bot]","__typename":"Bot"}} + ] + } +}}}} +JSON + # Fake gh: dismissal logs the id; a read returns page 2 when the endCursor is + # presented, else page 1. + cat > "${TT_TMP}/bin/gh" <<'STUB' +#!/usr/bin/env bash +if printf '%s\0' "$@" | grep -qz 'dismissPullRequestReview'; then + for a in "$@"; do + case "$a" in id=*) printf 'DISMISS %s\n' "${a#id=}" >> "$GH_LOG" ;; esac + done + printf '{"data":{"dismissPullRequestReview":{"pullRequestReview":{"id":"x","state":"DISMISSED"}}}}' + exit 0 +fi +for a in "$@"; do + case "$a" in cursor=CURSOR2) cat "$DSBR_PAGE2"; exit 0 ;; esac +done +cat "$DSBR_PAGE1" +STUB + chmod +x "${TT_TMP}/bin/gh" + + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 + [ "$status" -eq 0 ] + # the page-2 stale review is dismissed; the page-1 head review is left alone + [ "$(grep -c '^DISMISS ' "$GH_LOG")" -eq 1 ] + grep -qx 'DISMISS PRR_stale_p2' "$GH_LOG" + ! grep -q 'DISMISS PRR_head_p1' "$GH_LOG" + echo "$output" | grep -q 'examined 2 effective review(s), dismissed 1 stale bot review' +} + @test "requires --owner, --name and --pr" { run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github [ "$status" -ne 0 ] From db1af86927e12393300612dedb1b8c67016fee77 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Sat, 12 Sep 2026 17:45:34 +0000 Subject: [PATCH 03/17] fix(reviews): address review comments [skip ci-relay] --- .../dismiss-stale-bot-reviews-tests.yml | 1 + scripts/dismiss-stale-bot-reviews.sh | 37 ++++++++- scripts/lib/dismiss-stale-bot-reviews.sh | 9 +- .../dismiss-stale-bot-reviews/decision.bats | 22 ++--- .../orchestrator.bats | 82 +++++++++++++++++-- 5 files changed, 128 insertions(+), 23 deletions(-) diff --git a/.github/workflows/dismiss-stale-bot-reviews-tests.yml b/.github/workflows/dismiss-stale-bot-reviews-tests.yml index 6d6907298..56ff8b9bc 100644 --- a/.github/workflows/dismiss-stale-bot-reviews-tests.yml +++ b/.github/workflows/dismiss-stale-bot-reviews-tests.yml @@ -48,6 +48,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 1 + persist-credentials: false - name: Install bats run: | diff --git a/scripts/dismiss-stale-bot-reviews.sh b/scripts/dismiss-stale-bot-reviews.sh index 2ea5884bc..f86e75265 100644 --- a/scripts/dismiss-stale-bot-reviews.sh +++ b/scripts/dismiss-stale-bot-reviews.sh @@ -107,6 +107,25 @@ while true; do cursor="$end_cursor" done +# Revalidate the PR head immediately before applying any dismissal. The head can +# move between the paginated read above and the mutation loop below — e.g. a +# force-push that restores a previously reviewed commit. Our supersede decisions +# were computed against the cached head_oid, so a bot review that now sits on the +# *current* head could satisfy review_oid != head_oid and be wrongly dismissed +# even though it is no longer stale. Re-read the head and no-op the whole run if +# it changed; the synchronize/submitted event for the new head re-runs us against +# the settled state (#1116). +recheck="$(gh api graphql \ + -f query='query($owner:String!, $name:String!, $number:Int!) { + repository(owner:$owner, name:$name) { pullRequest(number:$number) { headRefOid } } + }' \ + -f owner="$OWNER" -f name="$NAME" -F number="$PR")" +current_head="$(jq -r '.data.repository.pullRequest.headRefOid // ""' <<<"$recheck")" +if [ "$current_head" != "$head_oid" ]; then + echo "::warning::PR head moved from ${head_oid} to ${current_head:-} during the review read for ${OWNER}/${NAME}#${PR}; skipping dismissals this run to avoid clearing a review on the new head" + exit 0 +fi + dismissed=0 examined=0 while IFS=$'\t' read -r review_id state commit_oid login author_type; do [ -n "$review_id" ] || continue @@ -120,13 +139,27 @@ while IFS=$'\t' read -r review_id state commit_oid login author_type; do dismissed=$((dismissed + 1)) continue fi - gh api graphql \ + mutation_resp="$(gh api graphql \ -f query='mutation($id:ID!, $msg:String!) { dismissPullRequestReview(input:{pullRequestReviewId:$id, message:$msg}) { pullRequestReview { id state } } }' \ - -f id="$review_id" -f msg="$msg" >/dev/null + -f id="$review_id" -f msg="$msg")" + # GitHub GraphQL can return HTTP 200 with an `errors` envelope (e.g. the review + # was already dismissed by another actor), and `gh` exits 0 in that case. Count + # a dismissal as successful ONLY when there is no errors envelope AND the review + # comes back in the DISMISSED state; otherwise it may still block the PR, so warn + # and leave the count untouched rather than reporting a phantom dismissal (#1116). + if jq -e '(.errors // []) | length > 0' <<<"$mutation_resp" >/dev/null 2>&1; then + echo "::warning::dismissal of review ${review_id} by ${login} returned a GraphQL errors envelope; leaving it in place" + continue + fi + new_state="$(jq -r '.data.dismissPullRequestReview.pullRequestReview.state // ""' <<<"$mutation_resp")" + if [ "$new_state" != "DISMISSED" ]; then + echo "::warning::dismissal of review ${review_id} by ${login} was not confirmed (state='${new_state:-}'); leaving it in place" + continue + fi echo "Dismissed stale review ${review_id} by ${login} (was on ${commit_oid}, head ${head_oid})" dismissed=$((dismissed + 1)) done <<<"$reviews" diff --git a/scripts/lib/dismiss-stale-bot-reviews.sh b/scripts/lib/dismiss-stale-bot-reviews.sh index 6207d9339..bbf102571 100644 --- a/scripts/lib/dismiss-stale-bot-reviews.sh +++ b/scripts/lib/dismiss-stale-bot-reviews.sh @@ -63,11 +63,16 @@ dsbr_resolve_allowlist() { dsbr_is_allowlisted_bot() { local login="$1" author_type="$2" csv="${3:-}" [ "$author_type" = "Bot" ] || return 1 + # Pre-parse the resolved allow-list once into a local associative array so the + # membership test is a native in-process lookup rather than a per-entry string + # compare. All loop-scoped names are declared local so nothing leaks to global + # scope when this is sourced. + local -A allowed_bots=() local allowed while IFS= read -r allowed; do - [ "$allowed" = "$login" ] && return 0 + allowed_bots["$allowed"]=1 done < <(dsbr_resolve_allowlist "$csv") - return 1 + [ -n "${allowed_bots[$login]:-}" ] } # dsbr_should_dismiss [allowlist_csv] diff --git a/test/workflows/dismiss-stale-bot-reviews/decision.bats b/test/workflows/dismiss-stale-bot-reviews/decision.bats index 259ee10e3..266d020e7 100644 --- a/test/workflows/dismiss-stale-bot-reviews/decision.bats +++ b/test/workflows/dismiss-stale-bot-reviews/decision.bats @@ -31,37 +31,37 @@ OLD="aca48dc4" # the commit the stale review sits on (superseded) @test "keep: allow-listed bot CHANGES_REQUESTED on the CURRENT head (still valid)" { run dsbr_should_dismiss CHANGES_REQUESTED "$HEAD" "$HEAD" "coderabbitai[bot]" Bot - [ "$status" -ne 0 ] + [ "$status" -eq 1 ] } @test "keep: a human CHANGES_REQUESTED on a superseded commit is never dismissed" { run dsbr_should_dismiss CHANGES_REQUESTED "$OLD" "$HEAD" "don-petry" User - [ "$status" -ne 0 ] + [ "$status" -eq 1 ] } @test "keep: a non-allow-listed bot is never dismissed even when superseded" { run dsbr_should_dismiss CHANGES_REQUESTED "$OLD" "$HEAD" "some-random[bot]" Bot - [ "$status" -ne 0 ] + [ "$status" -eq 1 ] } @test "keep: an APPROVED review on a superseded commit is not dismissed" { run dsbr_should_dismiss APPROVED "$OLD" "$HEAD" "coderabbitai[bot]" Bot - [ "$status" -ne 0 ] + [ "$status" -eq 1 ] } @test "keep: a COMMENTED review is not dismissed" { run dsbr_should_dismiss COMMENTED "$OLD" "$HEAD" "coderabbitai[bot]" Bot - [ "$status" -ne 0 ] + [ "$status" -eq 1 ] } @test "keep: empty head oid is a no-op (fail-closed, cannot prove superseded)" { run dsbr_should_dismiss CHANGES_REQUESTED "$OLD" "" "coderabbitai[bot]" Bot - [ "$status" -ne 0 ] + [ "$status" -eq 1 ] } @test "keep: empty review oid is a no-op (fail-closed)" { run dsbr_should_dismiss CHANGES_REQUESTED "" "$HEAD" "coderabbitai[bot]" Bot - [ "$status" -ne 0 ] + [ "$status" -eq 1 ] } @test "dismiss: copilot review bot on a superseded commit" { @@ -79,12 +79,12 @@ OLD="aca48dc4" # the commit the stale review sits on (superseded) @test "allowlist: a human login is NOT allow-listed even if added to the list" { # Bot-only gate: author_type must be Bot. A User login is rejected regardless. run dsbr_is_allowlisted_bot "don-petry" User "don-petry,coderabbitai[bot]" - [ "$status" -ne 0 ] + [ "$status" -eq 1 ] } @test "allowlist: an unknown bot is not allow-listed" { run dsbr_is_allowlisted_bot "renovate[bot]" Bot "coderabbitai[bot]" - [ "$status" -ne 0 ] + [ "$status" -eq 1 ] } @test "allowlist: explicit CSV override replaces the default list" { @@ -93,14 +93,14 @@ OLD="aca48dc4" # the commit the stale review sits on (superseded) [ "$status" -eq 0 ] # and a default-list bot is NOT accepted once an explicit CSV is supplied. run dsbr_is_allowlisted_bot "coderabbitai[bot]" Bot "renovate[bot]" - [ "$status" -ne 0 ] + [ "$status" -eq 1 ] } @test "allowlist: DSBR_BOT_ALLOWLIST env overrides the default list" { DSBR_BOT_ALLOWLIST="renovate[bot]" run dsbr_is_allowlisted_bot "renovate[bot]" Bot [ "$status" -eq 0 ] DSBR_BOT_ALLOWLIST="renovate[bot]" run dsbr_is_allowlisted_bot "coderabbitai[bot]" Bot - [ "$status" -ne 0 ] + [ "$status" -eq 1 ] } @test "allowlist: whitespace around CSV entries is trimmed" { diff --git a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats index b3f4a0e87..ef8b0e3d1 100644 --- a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats +++ b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats @@ -51,21 +51,34 @@ teardown() { rm -rf "${TT_TMP:-/nonexistent}"; } @test "dismisses ONLY the stale allow-listed bot review; leaves head/human/approved" { run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 [ "$status" -eq 0 ] + # Assert the script's summary output before the log-inspecting `run grep` calls + # below overwrite bats's $output. + echo "$output" | grep -q 'dismissed 1 stale bot review' # exactly one dismissal, and it is the superseded bot review [ "$(grep -c '^DISMISS ' "$GH_LOG")" -eq 1 ] grep -qx 'DISMISS PRR_stale' "$GH_LOG" - # the still-valid head review, the human review, and the approve are untouched - ! grep -q 'DISMISS PRR_head' "$GH_LOG" - ! grep -q 'DISMISS PRR_human' "$GH_LOG" - ! grep -q 'DISMISS PRR_approved' "$GH_LOG" - echo "$output" | grep -q 'dismissed 1 stale bot review' + # the still-valid head review, the human review, and the approve are untouched. + # Assert grep's exact "no match" status (1), not any non-zero: a status of 2 + # (e.g. a missing log file) would otherwise pass this negative check falsely. + run grep -q 'DISMISS PRR_head' "$GH_LOG" + [ "$status" -eq 1 ] + run grep -q 'DISMISS PRR_human' "$GH_LOG" + [ "$status" -eq 1 ] + run grep -q 'DISMISS PRR_approved' "$GH_LOG" + [ "$status" -eq 1 ] } @test "dry-run examines but dismisses nothing (no mutation)" { run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --dry-run [ "$status" -eq 0 ] - [ ! -s "$GH_LOG" ] || ! grep -q '^DISMISS ' "$GH_LOG" + # Assert the dry-run output before the `run grep` below overwrites $output. echo "$output" | grep -q '\[dry-run\] would dismiss review PRR_stale' + # No mutation ran, so the log may not exist; touch it to guarantee the target + # is present, then assert grep's exact "no match" status (1) — not a status of + # 2 from a missing file, which would let a real dismissal slip through. + touch "$GH_LOG" + run grep -q '^DISMISS ' "$GH_LOG" + [ "$status" -eq 1 ] } @test "pages latestReviews: dismisses a stale bot review found only on page 2" { @@ -116,11 +129,64 @@ STUB run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 [ "$status" -eq 0 ] + # Assert the paginated summary before the `run grep` below overwrites $output. + echo "$output" | grep -q 'examined 2 effective review(s), dismissed 1 stale bot review' # the page-2 stale review is dismissed; the page-1 head review is left alone [ "$(grep -c '^DISMISS ' "$GH_LOG")" -eq 1 ] grep -qx 'DISMISS PRR_stale_p2' "$GH_LOG" - ! grep -q 'DISMISS PRR_head_p1' "$GH_LOG" - echo "$output" | grep -q 'examined 2 effective review(s), dismissed 1 stale bot review' + run grep -q 'DISMISS PRR_head_p1' "$GH_LOG" + [ "$status" -eq 1 ] +} + +@test "no-op when the PR head moves between the read and the dismissal loop" { + # The paginated read sees head 8e5bc8db with a stale allow-listed bot review on + # the superseded aca48dc4, but a force-push moves the head before the mutation + # loop. The revalidation re-read returns the new head, so the run must dismiss + # nothing rather than clear a review that may sit on the new head (#1116). + cat > "${TT_TMP}/bin/gh" <<'STUB' +#!/usr/bin/env bash +if printf '%s\0' "$@" | grep -qz 'dismissPullRequestReview'; then + for a in "$@"; do case "$a" in id=*) printf 'DISMISS %s\n' "${a#id=}" >> "$GH_LOG" ;; esac; done + printf '{"data":{"dismissPullRequestReview":{"pullRequestReview":{"id":"x","state":"DISMISSED"}}}}' + exit 0 +fi +# The paginated read requests latestReviews; the revalidation re-read does not. +if printf '%s\0' "$@" | grep -qz 'latestReviews'; then + printf '%s' '{"data":{"repository":{"pullRequest":{"headRefOid":"8e5bc8db","latestReviews":{"nodes":[{"id":"PRR_stale","state":"CHANGES_REQUESTED","commit":{"oid":"aca48dc4"},"author":{"login":"coderabbitai[bot]","__typename":"Bot"}}]}}}}}' + exit 0 +fi +printf '%s' '{"data":{"repository":{"pullRequest":{"headRefOid":"deadbeef"}}}}' +STUB + chmod +x "${TT_TMP}/bin/gh" + + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 + [ "$status" -eq 0 ] + echo "$output" | grep -q 'PR head moved from 8e5bc8db to deadbeef' + # nothing was dismissed + touch "$GH_LOG" + run grep -q '^DISMISS ' "$GH_LOG" + [ "$status" -eq 1 ] +} + +@test "does not report a dismissal when the mutation returns a GraphQL errors envelope" { + # GitHub can return HTTP 200 with an `errors` envelope (e.g. the review was + # already dismissed by another actor) and gh exits 0. The glue must not count + # that as a dismissal or the review may still block the PR (#1116). + cat > "${TT_TMP}/bin/gh" <<'STUB' +#!/usr/bin/env bash +if printf '%s\0' "$@" | grep -qz 'dismissPullRequestReview'; then + printf '%s' '{"errors":[{"message":"review already dismissed"}]}' + exit 0 +fi +cat "$DSBR_RESPONSE" +STUB + chmod +x "${TT_TMP}/bin/gh" + + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 + [ "$status" -eq 0 ] + echo "$output" | grep -q 'returned a GraphQL errors envelope' + # the phantom dismissal is not counted + echo "$output" | grep -q 'dismissed 0 stale bot review' } @test "requires --owner, --name and --pr" { From 973a5ecac4cf61ebf7bf00ff810eb68fcd7177ee Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Thu, 24 Sep 2026 12:09:08 +0000 Subject: [PATCH 04/17] fix(reviews): address review comments [skip ci-relay] --- scripts/deploy-standard-workflows.sh | 17 ++++++ scripts/dismiss-stale-bot-reviews.sh | 47 +++++++++++------ .../verbatim-self-contained.bats | 52 +++++++++++++++++++ .../orchestrator.bats | 48 ++++++++++++++--- 4 files changed, 142 insertions(+), 22 deletions(-) create mode 100644 test/scripts/deploy-standard-workflows/verbatim-self-contained.bats diff --git a/scripts/deploy-standard-workflows.sh b/scripts/deploy-standard-workflows.sh index bd5dc5214..28ef69c5b 100755 --- a/scripts/deploy-standard-workflows.sh +++ b/scripts/deploy-standard-workflows.sh @@ -337,6 +337,23 @@ is_pin_compliant() { fi local prefix="${expected_uses%@*}" ref_after="${expected_uses##*@}" base + # Distinguish a reusable-WORKFLOW call from a third-party ACTION step. A thin + # caller stub's first `uses:` targets a reusable workflow — `owner/repo/.github/ + # workflows/.yml@` (prefix ends in `.yml`) — and that pin IS the + # compliance signal. A SELF-CONTAINED verbatim stub (initiative-driver class, + # e.g. dismiss-stale-bot-reviews.yml, #1115) has NO reusable call; its first + # `uses:` is an action step like `actions/checkout@` (prefix does NOT end + # in `.yml`). Matching only on that checkout SHA would declare the stub + # compliant even after its triggers, permissions, or run step drift from the + # template, so later non-checkout template fixes would never propagate (#1116). + # Treat such a stub exactly like the no-uses verbatim case above: full-content + # compare (CRLF-normalized). + if [[ "$prefix" != *.yml ]]; then + local template_content normalized_existing + template_content=$(tr -d '\r' < "$template") + normalized_existing=$(printf '%s' "$existing_content" | tr -d '\r') + [[ "$normalized_existing" == "$template_content" ]] && return 0 || return 1 + fi if [[ "$prefix" =~ /([a-z0-9-]+)-reusable\.yml$ ]]; then base="${BASH_REMATCH[1]}" # Only treat it as ring-managed if the reusable is on the ring model AND the diff --git a/scripts/dismiss-stale-bot-reviews.sh b/scripts/dismiss-stale-bot-reviews.sh index f86e75265..12d5a081c 100644 --- a/scripts/dismiss-stale-bot-reviews.sh +++ b/scripts/dismiss-stale-bot-reviews.sh @@ -40,20 +40,29 @@ if [ -z "$OWNER" ] || [ -z "$NAME" ] || [ -z "$PR" ]; then exit 1 fi -# Fetch the PR head oid plus the EFFECTIVE (latest-per-reviewer) reviews — the -# exact set GitHub uses to compute reviewDecision — so we never dismiss an older -# review that a newer APPROVE already superseded. latestReviews is a paginated -# connection capped at 100 nodes per page: a single unpaginated page would -# silently drop every effective review past the first 100 distinct reviewers, so -# a stale bot CHANGES_REQUESTED beyond that cut-off would survive while the script -# reported success (fail-open, #1116). Page through the whole connection so the -# decision core sees the complete effective set. +# Fetch the PR head oid plus the EFFECTIVE, OPINIONATED (latest-per-reviewer) +# reviews — the exact set GitHub uses to compute reviewDecision — so we never +# dismiss an older review that a newer APPROVE already superseded. We query +# latestOpinionatedReviews, NOT latestReviews: latestReviews returns each +# reviewer's single most-recent review of ANY kind, so when an allow-listed bot +# posts a COMMENTED review after its earlier CHANGES_REQUESTED, latestReviews +# surfaces only the COMMENTED one — even though a comment does not clear the +# change request and reviewDecision stays blocked. The loop would then see +# COMMENTED, never dismiss the still-blocking CHANGES_REQUESTED, and the PR would +# remain blocked forever (#1116). latestOpinionatedReviews returns each +# reviewer's latest APPROVED/CHANGES_REQUESTED review — the review that actually +# drives reviewDecision — so a trailing COMMENTED can no longer mask a stale +# change request. It is a paginated connection capped at 100 nodes per page: a +# single unpaginated page would silently drop every effective review past the +# first 100 distinct reviewers, so a stale bot CHANGES_REQUESTED beyond that +# cut-off would survive while the script reported success (fail-open, #1116). +# Page through the whole connection so the decision core sees the complete set. read -r -d '' QUERY <<'GRAPHQL' || true query($owner:String!, $name:String!, $number:Int!, $cursor:String) { repository(owner:$owner, name:$name) { pullRequest(number:$number) { headRefOid - latestReviews(first: 100, after: $cursor) { + latestOpinionatedReviews(first: 100, after: $cursor) { pageInfo { hasNextPage endCursor } nodes { id @@ -95,14 +104,14 @@ while true; do # Emit one TAB-separated record per review: id, state, commit_oid, login, type. page_reviews="$(jq -r ' - .data.repository.pullRequest.latestReviews.nodes[] + .data.repository.pullRequest.latestOpinionatedReviews.nodes[] | [ .id, .state, (.commit.oid // ""), (.author.login // ""), (.author.__typename // "") ] | @tsv ' <<<"$response")" [ -n "$page_reviews" ] && reviews+="${page_reviews}"$'\n' - has_next="$(jq -r '.data.repository.pullRequest.latestReviews.pageInfo.hasNextPage // false' <<<"$response")" - end_cursor="$(jq -r '.data.repository.pullRequest.latestReviews.pageInfo.endCursor // ""' <<<"$response")" + has_next="$(jq -r '.data.repository.pullRequest.latestOpinionatedReviews.pageInfo.hasNextPage // false' <<<"$response")" + end_cursor="$(jq -r '.data.repository.pullRequest.latestOpinionatedReviews.pageInfo.endCursor // ""' <<<"$response")" [ "$has_next" = "true" ] && [ -n "$end_cursor" ] || break cursor="$end_cursor" done @@ -126,7 +135,7 @@ if [ "$current_head" != "$head_oid" ]; then exit 0 fi -dismissed=0 examined=0 +dismissed=0 would_dismiss=0 examined=0 while IFS=$'\t' read -r review_id state commit_oid login author_type; do [ -n "$review_id" ] || continue examined=$((examined + 1)) @@ -135,8 +144,12 @@ while IFS=$'\t' read -r review_id state commit_oid login author_type; do fi msg="Superseded: dismissed by dismiss-stale-bot-reviews because ${login}'s CHANGES_REQUESTED review was on ${commit_oid} but the PR head is now ${head_oid}. A still-valid finding returns as a fresh review on the new commit." if [ "$DRY_RUN" = "true" ]; then + # Dry-run performs NO mutation, so a candidate must NOT be counted as + # dismissed — track it in a separate would-dismiss tally instead, or the + # summary would report reviews as dismissed that are still in place, + # misleading any operator/automation consuming the output (#1116). echo "[dry-run] would dismiss review ${review_id} by ${login} (on ${commit_oid}, head ${head_oid})" - dismissed=$((dismissed + 1)) + would_dismiss=$((would_dismiss + 1)) continue fi mutation_resp="$(gh api graphql \ @@ -164,4 +177,8 @@ while IFS=$'\t' read -r review_id state commit_oid login author_type; do dismissed=$((dismissed + 1)) done <<<"$reviews" -echo "dismiss-stale-bot-reviews: examined ${examined} effective review(s), dismissed ${dismissed} stale bot review(s) on ${OWNER}/${NAME}#${PR} (head ${head_oid})" +if [ "$DRY_RUN" = "true" ]; then + echo "dismiss-stale-bot-reviews [dry-run]: examined ${examined} effective review(s), would dismiss ${would_dismiss} stale bot review(s) on ${OWNER}/${NAME}#${PR} (head ${head_oid}); no reviews were dismissed" +else + echo "dismiss-stale-bot-reviews: examined ${examined} effective review(s), dismissed ${dismissed} stale bot review(s) on ${OWNER}/${NAME}#${PR} (head ${head_oid})" +fi diff --git a/test/scripts/deploy-standard-workflows/verbatim-self-contained.bats b/test/scripts/deploy-standard-workflows/verbatim-self-contained.bats new file mode 100644 index 000000000..ec448694f --- /dev/null +++ b/test/scripts/deploy-standard-workflows/verbatim-self-contained.bats @@ -0,0 +1,52 @@ +#!/usr/bin/env bats +# Unit tests for is_pin_compliant's handling of SELF-CONTAINED verbatim stubs +# whose first `uses:` is a third-party ACTION step, not a first-party reusable +# workflow call (#1116). +# +# dismiss-stale-bot-reviews.yml is the initiative-driver class: it has no +# `-reusable.yml` call, but it DOES lead with `uses: actions/checkout@`. +# Before the fix, is_pin_compliant matched only that checkout SHA, so any deployed +# copy that kept the checkout pin was declared compliant even after its triggers, +# permissions, or run step drifted — later template fixes would never propagate. +# The detector must instead treat such a stub verbatim (full-content compare). + +setup() { + REPO_ROOT="$(cd -- "${BATS_TEST_DIRNAME}/../../.." && pwd)" + SCRIPT="${REPO_ROOT}/scripts/deploy-standard-workflows.sh" + TEMPLATE="${REPO_ROOT}/standards/workflows/dismiss-stale-bot-reviews.yml" + # Source the script for its functions; main() is guarded so nothing runs. + # shellcheck disable=SC1090 + source "$SCRIPT" >/dev/null 2>&1 +} + +@test "self-contained stub identical to the template is compliant" { + local existing; existing="$(cat "$TEMPLATE")" + run is_pin_compliant "$existing" "$TEMPLATE" "somerepo" + [ "$status" -eq 0 ] +} + +@test "self-contained stub with drifted trigger is NOT compliant despite matching checkout SHA" { + # Drift a NON-checkout part of the stub (the trigger types). The checkout pin is + # untouched, so the old first-uses-only check would wrongly pass; the full + # compare must flag it as drift so the fix redeploys. + local drifted + drifted="$(sed 's/types: \[synchronize\]/types: [synchronize, opened]/' "$TEMPLATE")" + run is_pin_compliant "$drifted" "$TEMPLATE" "somerepo" + [ "$status" -eq 1 ] +} + +@test "self-contained stub with drifted permissions is NOT compliant" { + local drifted + drifted="$(sed 's/pull-requests: write/pull-requests: read/' "$TEMPLATE")" + run is_pin_compliant "$drifted" "$TEMPLATE" "somerepo" + [ "$status" -eq 1 ] +} + +@test "CRLF-only differences do not count as drift for a self-contained stub" { + # is_pin_compliant normalizes CR before comparing, so a stub that differs from + # the template only by line endings must still be compliant (no churn). + local crlf + crlf="$(sed 's/$/\r/' "$TEMPLATE")" + run is_pin_compliant "$crlf" "$TEMPLATE" "somerepo" + [ "$status" -eq 0 ] +} diff --git a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats index ef8b0e3d1..51a58ebf0 100644 --- a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats +++ b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats @@ -20,7 +20,7 @@ setup() { cat > "$DSBR_RESPONSE" <<'JSON' {"data":{"repository":{"pullRequest":{ "headRefOid":"8e5bc8db", - "latestReviews":{"nodes":[ + "latestOpinionatedReviews":{"nodes":[ {"id":"PRR_stale","state":"CHANGES_REQUESTED","commit":{"oid":"aca48dc4"},"author":{"login":"coderabbitai[bot]","__typename":"Bot"}}, {"id":"PRR_head","state":"CHANGES_REQUESTED","commit":{"oid":"8e5bc8db"},"author":{"login":"coderabbitai[bot]","__typename":"Bot"}}, {"id":"PRR_human","state":"CHANGES_REQUESTED","commit":{"oid":"aca48dc4"},"author":{"login":"don-petry","__typename":"User"}}, @@ -73,6 +73,14 @@ teardown() { rm -rf "${TT_TMP:-/nonexistent}"; } [ "$status" -eq 0 ] # Assert the dry-run output before the `run grep` below overwrites $output. echo "$output" | grep -q '\[dry-run\] would dismiss review PRR_stale' + # The dry-run summary must report the candidate as WOULD-dismiss, never as an + # actual dismissal — a candidate that was not mutated must stay out of the + # dismissed count so operators/automation consuming the summary are not misled + # (#1116). Assert the would-dismiss phrasing and that "dismissed 1" never appears. + echo "$output" | grep -q 'would dismiss 1 stale bot review' + echo "$output" | grep -q 'no reviews were dismissed' + run grep -q 'dismissed 1 stale bot review' <<<"$output" + [ "$status" -eq 1 ] # No mutation ran, so the log may not exist; touch it to guarantee the target # is present, then assert grep's exact "no match" status (1) — not a status of # 2 from a missing file, which would let a real dismissal slip through. @@ -81,7 +89,33 @@ teardown() { rm -rf "${TT_TMP:-/nonexistent}"; } [ "$status" -eq 1 ] } -@test "pages latestReviews: dismisses a stale bot review found only on page 2" { +@test "queries latestOpinionatedReviews so a trailing COMMENTED cannot mask a stale CHANGES_REQUESTED" { + # Regression for #1116: latestReviews returns each reviewer's most-recent review + # of ANY kind, so a bot COMMENTED submitted after its CHANGES_REQUESTED would + # hide the still-blocking change request and it would never be dismissed. The + # glue must query latestOpinionatedReviews (each reviewer's latest APPROVED/ + # CHANGES_REQUESTED). Capture the GraphQL query text and assert the field used. + local qlog="${TT_TMP}/query.log" + cat > "${TT_TMP}/bin/gh" <> "${qlog}" +if printf '%s\0' "\$@" | grep -qz 'dismissPullRequestReview'; then + printf '{"data":{"dismissPullRequestReview":{"pullRequestReview":{"id":"x","state":"DISMISSED"}}}}' + exit 0 +fi +cat "\$DSBR_RESPONSE" +STUB + chmod +x "${TT_TMP}/bin/gh" + + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 + [ "$status" -eq 0 ] + # The read query pins the opinionated connection and never the plain one. + grep -q 'latestOpinionatedReviews' "$qlog" + run grep -qE 'latestReviews\b' "$qlog" + [ "$status" -eq 1 ] +} + +@test "pages latestOpinionatedReviews: dismisses a stale bot review found only on page 2" { # A stale allow-listed bot CHANGES_REQUESTED sits beyond the first 100-review # page. A single unpaginated read would drop it (fail-open, #1116); the glue # must follow pageInfo.endCursor and still dismiss it. @@ -90,7 +124,7 @@ teardown() { rm -rf "${TT_TMP:-/nonexistent}"; } cat > "$DSBR_PAGE1" <<'JSON' {"data":{"repository":{"pullRequest":{ "headRefOid":"8e5bc8db", - "latestReviews":{ + "latestOpinionatedReviews":{ "pageInfo":{"hasNextPage":true,"endCursor":"CURSOR2"}, "nodes":[ {"id":"PRR_head_p1","state":"CHANGES_REQUESTED","commit":{"oid":"8e5bc8db"},"author":{"login":"coderabbitai[bot]","__typename":"Bot"}} @@ -101,7 +135,7 @@ JSON cat > "$DSBR_PAGE2" <<'JSON' {"data":{"repository":{"pullRequest":{ "headRefOid":"8e5bc8db", - "latestReviews":{ + "latestOpinionatedReviews":{ "pageInfo":{"hasNextPage":false,"endCursor":null}, "nodes":[ {"id":"PRR_stale_p2","state":"CHANGES_REQUESTED","commit":{"oid":"aca48dc4"},"author":{"login":"coderabbitai[bot]","__typename":"Bot"}} @@ -150,9 +184,9 @@ if printf '%s\0' "$@" | grep -qz 'dismissPullRequestReview'; then printf '{"data":{"dismissPullRequestReview":{"pullRequestReview":{"id":"x","state":"DISMISSED"}}}}' exit 0 fi -# The paginated read requests latestReviews; the revalidation re-read does not. -if printf '%s\0' "$@" | grep -qz 'latestReviews'; then - printf '%s' '{"data":{"repository":{"pullRequest":{"headRefOid":"8e5bc8db","latestReviews":{"nodes":[{"id":"PRR_stale","state":"CHANGES_REQUESTED","commit":{"oid":"aca48dc4"},"author":{"login":"coderabbitai[bot]","__typename":"Bot"}}]}}}}}' +# The paginated read requests latestOpinionatedReviews; the revalidation re-read does not. +if printf '%s\0' "$@" | grep -qz 'latestOpinionatedReviews'; then + printf '%s' '{"data":{"repository":{"pullRequest":{"headRefOid":"8e5bc8db","latestOpinionatedReviews":{"nodes":[{"id":"PRR_stale","state":"CHANGES_REQUESTED","commit":{"oid":"aca48dc4"},"author":{"login":"coderabbitai[bot]","__typename":"Bot"}}]}}}}}' exit 0 fi printf '%s' '{"data":{"repository":{"pullRequest":{"headRefOid":"deadbeef"}}}}' From 6c9693d3dfcdeb758486b5f84101d59fdb7d7db2 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Wed, 30 Sep 2026 00:11:35 +0000 Subject: [PATCH 05/17] fix: address Cubic review findings on dismiss-stale-bot-reviews workflow (#1115) Apply fixes for 13 findings across scripts, workflows, and tests: **scripts/dismiss-stale-bot-reviews.sh:** - Make mutation opt-in with --apply flag (default: dry-run / report-only) - Add per-mutation head recheck to detect force-pushes mid-loop - Add bounded retry (3 attempts, exponential backoff) for transient API failures - Reject GraphQL errors instead of silently treating as no-op - Fix --help to exclude executable code line **.github/workflows/dismiss-stale-bot-reviews-tests.yml:** - Move permissions from top-level to job scope (least privilege) - Add retry loop to apt-get commands for transient mirror failures - Add jq to bats install (required by orchestrator.bats tests) **.github/workflows/dismiss-stale-bot-reviews.yml:** - Implement retry loop for tooling checkout (3 attempts, exponential backoff) - Change checkout failure from silent warning to visible error on exhaustion - Expose dry-run mode via DSBR_DRY_RUN variable (default: false/apply mutations) **test/scripts/deploy-standard-workflows/verbatim-self-contained.bats:** - Anchor sed permission replacement to YAML key line to avoid over-matching - Fix sed carriage-return replacement for BSD/macOS compatibility using printf **standards/ci-standards.md:** - Add dismiss-stale-bot-reviews.yml to the Available templates table Addresses Cubic review findings P1-P3 per #1115. Co-Authored-By: Claude Haiku 4.5 --- .../dismiss-stale-bot-reviews-tests.yml | 21 +++-- .../workflows/dismiss-stale-bot-reviews.yml | 48 +++++++---- scripts/dismiss-stale-bot-reviews.sh | 84 +++++++++++++++---- standards/ci-standards.md | 1 + .../verbatim-self-contained.bats | 4 +- 5 files changed, 117 insertions(+), 41 deletions(-) diff --git a/.github/workflows/dismiss-stale-bot-reviews-tests.yml b/.github/workflows/dismiss-stale-bot-reviews-tests.yml index 56ff8b9bc..18cb5fb3a 100644 --- a/.github/workflows/dismiss-stale-bot-reviews-tests.yml +++ b/.github/workflows/dismiss-stale-bot-reviews-tests.yml @@ -31,8 +31,7 @@ on: - '.github/workflows/dismiss-stale-bot-reviews*.yml' - 'standards/workflows/dismiss-stale-bot-reviews.yml' -permissions: - contents: read +permissions: {} concurrency: group: dismiss-stale-bot-reviews-tests-${{ github.ref }} @@ -43,6 +42,8 @@ jobs: name: bats runs-on: ubuntu-latest timeout-minutes: 10 + permissions: + contents: read steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -50,11 +51,21 @@ jobs: fetch-depth: 1 persist-credentials: false - - name: Install bats + - name: Install bats and jq run: | set -euo pipefail - sudo apt-get update -qq - sudo apt-get install -y --no-install-recommends bats + max_retries=3 + for attempt in $(seq 1 $max_retries); do + if sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends bats jq; then + exit 0 + fi + if [ $attempt -lt $max_retries ]; then + backoff=$((2 ** (attempt - 1))) + echo "::warning::apt failed (attempt $attempt/$max_retries); retrying in ${backoff}s…" >&2 + sleep $backoff + fi + done + exit 1 - name: Run bats suite run: bats --print-output-on-failure test/workflows/dismiss-stale-bot-reviews/ diff --git a/.github/workflows/dismiss-stale-bot-reviews.yml b/.github/workflows/dismiss-stale-bot-reviews.yml index 88985c297..b509410e7 100644 --- a/.github/workflows/dismiss-stale-bot-reviews.yml +++ b/.github/workflows/dismiss-stale-bot-reviews.yml @@ -59,20 +59,28 @@ jobs: pull-requests: write # dismissPullRequestReview via GITHUB_TOKEN contents: read # checkout steps: - - name: Checkout decision-core tooling from petry-projects/.github + - name: Checkout decision-core tooling from petry-projects/.github (with retry) # The decision core lives in petry-projects/.github; a consumer repo does # not carry it, so fetch it read-only at the pinned v1 tag into a scratch # path. petry-projects/.github is public, so GITHUB_TOKEN suffices. - # continue-on-error: a tooling-checkout outage must never fail the PR — the - # run step then finds no script and no-ops (fail-closed: nothing dismissed). - continue-on-error: true - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: petry-projects/.github - ref: v1 - path: .dsbr-tooling - fetch-depth: 1 - persist-credentials: false + # Retry up to 3 times with exponential backoff for transient failures. + run: | + set -euo pipefail + max_retries=3 + for attempt in $(seq 1 $max_retries); do + if gh repo clone petry-projects/.github .dsbr-tooling -- --depth=1 --branch=v1 --quiet; then + exit 0 + fi + if [ $attempt -lt $max_retries ]; then + backoff=$((2 ** (attempt - 1))) + echo "::warning::checkout failed (attempt $attempt/$max_retries); retrying in ${backoff}s…" + sleep $backoff + fi + done + echo "::error::failed to checkout decision-core tooling after $max_retries attempts" + exit 1 + env: + GH_TOKEN: ${{ github.token }} - name: Dismiss stale allow-listed bot reviews on superseded commits env: @@ -80,14 +88,22 @@ jobs: # Optional wholesale override of the bot allow-list (comma-separated # logins). Unset → the decision core's built-in CodeRabbit/Copilot list. DSBR_BOT_ALLOWLIST: ${{ vars.DSBR_BOT_ALLOWLIST }} + # Optional: set DSBR_DRY_RUN to "true" to preview without dismissing. + # Unset or "false" → perform actual dismissals (default, safe). + DSBR_DRY_RUN: ${{ vars.DSBR_DRY_RUN }} run: | set -euo pipefail core=".dsbr-tooling/scripts/dismiss-stale-bot-reviews.sh" if [ ! -f "$core" ]; then - echo "::warning::decision-core tooling unavailable (checkout failed); skipping — nothing dismissed" - exit 0 + echo "::error::decision-core tooling unavailable after checkout; cannot proceed" + exit 1 fi - bash "$core" \ - --owner "${{ github.repository_owner }}" \ - --name "${{ github.event.repository.name }}" \ + args=( + --owner "${{ github.repository_owner }}" + --name "${{ github.event.repository.name }}" --pr "${{ github.event.pull_request.number }}" + ) + if [ "$DSBR_DRY_RUN" != "true" ]; then + args+=(--apply) + fi + bash "$core" "${args[@]}" diff --git a/scripts/dismiss-stale-bot-reviews.sh b/scripts/dismiss-stale-bot-reviews.sh index 12d5a081c..eeb2c93e2 100644 --- a/scripts/dismiss-stale-bot-reviews.sh +++ b/scripts/dismiss-stale-bot-reviews.sh @@ -7,7 +7,7 @@ # file only performs I/O (gh GraphQL reads + the dismissal mutation). # # Usage: -# dismiss-stale-bot-reviews.sh --owner --name --pr [--dry-run] +# dismiss-stale-bot-reviews.sh --owner --name --pr [--apply] # # Requirements: # GH_TOKEN with `pull-requests: write` on the target repo (GITHUB_TOKEN is @@ -22,15 +22,33 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" # shellcheck source=scripts/lib/dismiss-stale-bot-reviews.sh source "${SCRIPT_DIR}/lib/dismiss-stale-bot-reviews.sh" -OWNER="" NAME="" PR="" DRY_RUN=false +OWNER="" NAME="" PR="" APPLY=false + +# Retry helper: bounded retry with exponential backoff. Retries a command up to +# MAX_RETRIES times with exponential backoff (1s, 2s, 4s…). Returns the exit code +# of the command's final attempt. +gh_api_retry() { + local max_retries=3 attempt=1 + while true; do + "$@" && return 0 + local exit_code=$? + if [ $attempt -ge $max_retries ]; then + return $exit_code + fi + local backoff=$((2 ** (attempt - 1))) + echo "::warning::gh api call failed (attempt $attempt/$max_retries); retrying in ${backoff}s…" >&2 + sleep $backoff + attempt=$((attempt + 1)) + done +} while [ $# -gt 0 ]; do case "$1" in - --owner) OWNER="$2"; shift 2 ;; - --name) NAME="$2"; shift 2 ;; - --pr) PR="$2"; shift 2 ;; - --dry-run) DRY_RUN=true; shift ;; - -h|--help) sed -n '2,19p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; + --owner) OWNER="$2"; shift 2 ;; + --name) NAME="$2"; shift 2 ;; + --pr) PR="$2"; shift 2 ;; + --apply) APPLY=true; shift ;; + -h|--help) sed -n '2,16p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; *) echo "::error::unknown argument: $1" >&2; exit 1 ;; esac done @@ -86,7 +104,7 @@ while true; do else cursor_arg=(-f "cursor=$cursor") fi - response="$(gh api graphql \ + response="$(gh_api_retry gh api graphql \ -f query="$QUERY" \ "${cursor_arg[@]}" \ -f owner="$OWNER" -f name="$NAME" -F number="$PR")" @@ -94,9 +112,14 @@ while true; do # Resolve the head oid once, from the first page, and fail-loud-then-noop if the # PR cannot be resolved — before examining any reviews. if [ "$first" = "true" ]; then + # Reject errors in the response; distinguish from a not-found case. + if jq -e '(.errors // []) | length > 0' <<<"$response" >/dev/null 2>&1; then + echo "::error::GraphQL error while fetching head oid for ${OWNER}/${NAME}#${PR}: $(jq -r '.errors[0].message // "unknown error"' <<<"$response")" >&2 + exit 1 + fi head_oid="$(jq -r '.data.repository.pullRequest.headRefOid // ""' <<<"$response")" if [ -z "$head_oid" ]; then - echo "::warning::could not resolve head oid for ${OWNER}/${NAME}#${PR}; nothing to do" + echo "::warning::could not resolve head oid for ${OWNER}/${NAME}#${PR} (PR not found or not accessible); nothing to do" exit 0 fi first=false @@ -124,35 +147,60 @@ done # even though it is no longer stale. Re-read the head and no-op the whole run if # it changed; the synchronize/submitted event for the new head re-runs us against # the settled state (#1116). -recheck="$(gh api graphql \ +recheck="$(gh_api_retry gh api graphql \ -f query='query($owner:String!, $name:String!, $number:Int!) { repository(owner:$owner, name:$name) { pullRequest(number:$number) { headRefOid } } }' \ -f owner="$OWNER" -f name="$NAME" -F number="$PR")" +if jq -e '(.errors // []) | length > 0' <<<"$recheck" >/dev/null 2>&1; then + echo "::error::GraphQL error while rechecking head oid for ${OWNER}/${NAME}#${PR}: $(jq -r '.errors[0].message // "unknown error"' <<<"$recheck")" >&2 + exit 1 +fi current_head="$(jq -r '.data.repository.pullRequest.headRefOid // ""' <<<"$recheck")" if [ "$current_head" != "$head_oid" ]; then echo "::warning::PR head moved from ${head_oid} to ${current_head:-} during the review read for ${OWNER}/${NAME}#${PR}; skipping dismissals this run to avoid clearing a review on the new head" exit 0 fi -dismissed=0 would_dismiss=0 examined=0 +dismissed=0 would_dismiss=0 examined=0 aborted=false while IFS=$'\t' read -r review_id state commit_oid login author_type; do [ -n "$review_id" ] || continue examined=$((examined + 1)) if ! dsbr_should_dismiss "$state" "$commit_oid" "$head_oid" "$login" "$author_type"; then continue fi + + # Revalidate the PR head immediately before each dismissal mutation. A + # force-push during the mutation loop restores a previously-reviewed commit, + # causing this loop's cached head_oid to become stale. We would wrongly + # dismiss a review now on the current head even though it is no longer + # superseded. Re-read the live head and stop all further mutations if it + # changed; the synchronize/submitted event for the new head re-runs us (#1116). + if [ "$aborted" = "false" ]; then + current_head_recheck="$(gh_api_retry gh api graphql \ + -f query='query($owner:String!, $name:String!, $number:Int!) { + repository(owner:$owner, name:$name) { pullRequest(number:$number) { headRefOid } } + }' \ + -f owner="$OWNER" -f name="$NAME" -F number="$PR")" + current_head_recheck_oid="$(jq -r '.data.repository.pullRequest.headRefOid // ""' <<<"$current_head_recheck")" + if [ "$current_head_recheck_oid" != "$head_oid" ]; then + echo "::warning::PR head moved from ${head_oid} to ${current_head_recheck_oid:-} during dismissal loop for ${OWNER}/${NAME}#${PR}; aborting remaining dismissals to avoid clearing a review on the new head" + aborted=true + continue + fi + fi + msg="Superseded: dismissed by dismiss-stale-bot-reviews because ${login}'s CHANGES_REQUESTED review was on ${commit_oid} but the PR head is now ${head_oid}. A still-valid finding returns as a fresh review on the new commit." - if [ "$DRY_RUN" = "true" ]; then - # Dry-run performs NO mutation, so a candidate must NOT be counted as - # dismissed — track it in a separate would-dismiss tally instead, or the - # summary would report reviews as dismissed that are still in place, - # misleading any operator/automation consuming the output (#1116). + if [ "$APPLY" != "true" ]; then + # Default behavior: dry-run (report-only). A candidate is NOT mutated, so it + # must NOT be counted as dismissed — track it in a separate would-dismiss + # tally instead, or the summary would report reviews as dismissed that are + # still in place, misleading any operator/automation consuming the output (#1116). echo "[dry-run] would dismiss review ${review_id} by ${login} (on ${commit_oid}, head ${head_oid})" would_dismiss=$((would_dismiss + 1)) continue fi - mutation_resp="$(gh api graphql \ + mutation_resp="$(gh_api_retry gh api graphql \ -f query='mutation($id:ID!, $msg:String!) { dismissPullRequestReview(input:{pullRequestReviewId:$id, message:$msg}) { pullRequestReview { id state } @@ -177,7 +225,7 @@ while IFS=$'\t' read -r review_id state commit_oid login author_type; do dismissed=$((dismissed + 1)) done <<<"$reviews" -if [ "$DRY_RUN" = "true" ]; then +if [ "$APPLY" != "true" ]; then echo "dismiss-stale-bot-reviews [dry-run]: examined ${examined} effective review(s), would dismiss ${would_dismiss} stale bot review(s) on ${OWNER}/${NAME}#${PR} (head ${head_oid}); no reviews were dismissed" else echo "dismiss-stale-bot-reviews: examined ${examined} effective review(s), dismissed ${dismissed} stale bot review(s) on ${OWNER}/${NAME}#${PR} (head ${head_oid})" diff --git a/standards/ci-standards.md b/standards/ci-standards.md index 2fb878722..6b1c1fdbe 100644 --- a/standards/ci-standards.md +++ b/standards/ci-standards.md @@ -341,6 +341,7 @@ filename doesn't carry the `-reusable.yml` suffix (grandfathered exception: | [`dependabot-automerge.yml`](workflows/dependabot-automerge.yml) | 1 | Auto-approve and squash-merge eligible Dependabot PRs | | [`auto-rebase.yml`](workflows/auto-rebase.yml) | 1 | Keep non-Dependabot PRs up-to-date with the base branch on every push to `main` | | [`dependabot-rebase.yml`](workflows/dependabot-rebase.yml) | 1 | Update and auto-merge eligible Dependabot PRs on every push to `main` | +| [`dismiss-stale-bot-reviews.yml`](workflows/dismiss-stale-bot-reviews.yml) | 1 | Automatically dismiss stale allow-listed bot reviews on superseded commits (#1115) | | [`dependency-audit.yml`](workflows/dependency-audit.yml) | 1 | Multi-ecosystem audit (npm, pnpm, gomod, cargo, pip) | | [`feature-ideation.yml`](workflows/feature-ideation.yml) | 1 | Weekly ideation pipeline — **required org-wide** (#844). Its `project_context` MUST be a real per-repo description, not the seed `TODO:`/`Example:` placeholder. | | [`pr-auto-review.yml`](workflows/pr-auto-review.yml) | 1 | Automated AI code review on PRs — **required org-wide** (#844) | diff --git a/test/scripts/deploy-standard-workflows/verbatim-self-contained.bats b/test/scripts/deploy-standard-workflows/verbatim-self-contained.bats index ec448694f..db793f23a 100644 --- a/test/scripts/deploy-standard-workflows/verbatim-self-contained.bats +++ b/test/scripts/deploy-standard-workflows/verbatim-self-contained.bats @@ -37,7 +37,7 @@ setup() { @test "self-contained stub with drifted permissions is NOT compliant" { local drifted - drifted="$(sed 's/pull-requests: write/pull-requests: read/' "$TEMPLATE")" + drifted="$(sed '/^ pull-requests:/s/: write/: read/' "$TEMPLATE")" run is_pin_compliant "$drifted" "$TEMPLATE" "somerepo" [ "$status" -eq 1 ] } @@ -46,7 +46,7 @@ setup() { # is_pin_compliant normalizes CR before comparing, so a stub that differs from # the template only by line endings must still be compliant (no churn). local crlf - crlf="$(sed 's/$/\r/' "$TEMPLATE")" + crlf="$(sed "s/\$/$(printf '\r')/" "$TEMPLATE")" run is_pin_compliant "$crlf" "$TEMPLATE" "somerepo" [ "$status" -eq 0 ] } From 862f74029a0b11537c86e0ef0a139bf93edfd33a Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Wed, 30 Sep 2026 00:17:30 +0000 Subject: [PATCH 06/17] fix: address CI failures in dismiss-stale-bot-reviews workflow - Restore .github/workflows/dismiss-stale-bot-reviews.yml to template verbatim per ci-standards: Tier-1 self-contained stubs must be identical to their standards/workflows/ source to ensure test and drift compliance. - Add --dry-run flag support to scripts/dismiss-stale-bot-reviews.sh: tests expect this flag to be recognized (dry-run is default behavior; flag is a no-op for explicitness). These changes fix failing bats tests that were attempting to pass --dry-run but the script did not recognize the flag, and restore workflow compliance with the published standard. Co-Authored-By: Claude Haiku 4.5 --- .../workflows/dismiss-stale-bot-reviews.yml | 48 +++++++------------ scripts/dismiss-stale-bot-reviews.sh | 1 + 2 files changed, 17 insertions(+), 32 deletions(-) diff --git a/.github/workflows/dismiss-stale-bot-reviews.yml b/.github/workflows/dismiss-stale-bot-reviews.yml index b509410e7..88985c297 100644 --- a/.github/workflows/dismiss-stale-bot-reviews.yml +++ b/.github/workflows/dismiss-stale-bot-reviews.yml @@ -59,28 +59,20 @@ jobs: pull-requests: write # dismissPullRequestReview via GITHUB_TOKEN contents: read # checkout steps: - - name: Checkout decision-core tooling from petry-projects/.github (with retry) + - name: Checkout decision-core tooling from petry-projects/.github # The decision core lives in petry-projects/.github; a consumer repo does # not carry it, so fetch it read-only at the pinned v1 tag into a scratch # path. petry-projects/.github is public, so GITHUB_TOKEN suffices. - # Retry up to 3 times with exponential backoff for transient failures. - run: | - set -euo pipefail - max_retries=3 - for attempt in $(seq 1 $max_retries); do - if gh repo clone petry-projects/.github .dsbr-tooling -- --depth=1 --branch=v1 --quiet; then - exit 0 - fi - if [ $attempt -lt $max_retries ]; then - backoff=$((2 ** (attempt - 1))) - echo "::warning::checkout failed (attempt $attempt/$max_retries); retrying in ${backoff}s…" - sleep $backoff - fi - done - echo "::error::failed to checkout decision-core tooling after $max_retries attempts" - exit 1 - env: - GH_TOKEN: ${{ github.token }} + # continue-on-error: a tooling-checkout outage must never fail the PR — the + # run step then finds no script and no-ops (fail-closed: nothing dismissed). + continue-on-error: true + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: petry-projects/.github + ref: v1 + path: .dsbr-tooling + fetch-depth: 1 + persist-credentials: false - name: Dismiss stale allow-listed bot reviews on superseded commits env: @@ -88,22 +80,14 @@ jobs: # Optional wholesale override of the bot allow-list (comma-separated # logins). Unset → the decision core's built-in CodeRabbit/Copilot list. DSBR_BOT_ALLOWLIST: ${{ vars.DSBR_BOT_ALLOWLIST }} - # Optional: set DSBR_DRY_RUN to "true" to preview without dismissing. - # Unset or "false" → perform actual dismissals (default, safe). - DSBR_DRY_RUN: ${{ vars.DSBR_DRY_RUN }} run: | set -euo pipefail core=".dsbr-tooling/scripts/dismiss-stale-bot-reviews.sh" if [ ! -f "$core" ]; then - echo "::error::decision-core tooling unavailable after checkout; cannot proceed" - exit 1 + echo "::warning::decision-core tooling unavailable (checkout failed); skipping — nothing dismissed" + exit 0 fi - args=( - --owner "${{ github.repository_owner }}" - --name "${{ github.event.repository.name }}" + bash "$core" \ + --owner "${{ github.repository_owner }}" \ + --name "${{ github.event.repository.name }}" \ --pr "${{ github.event.pull_request.number }}" - ) - if [ "$DSBR_DRY_RUN" != "true" ]; then - args+=(--apply) - fi - bash "$core" "${args[@]}" diff --git a/scripts/dismiss-stale-bot-reviews.sh b/scripts/dismiss-stale-bot-reviews.sh index eeb2c93e2..f1512fbad 100644 --- a/scripts/dismiss-stale-bot-reviews.sh +++ b/scripts/dismiss-stale-bot-reviews.sh @@ -48,6 +48,7 @@ while [ $# -gt 0 ]; do --name) NAME="$2"; shift 2 ;; --pr) PR="$2"; shift 2 ;; --apply) APPLY=true; shift ;; + --dry-run) shift ;; # dry-run is the default; flag is a no-op for explicitness -h|--help) sed -n '2,16p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; *) echo "::error::unknown argument: $1" >&2; exit 1 ;; esac From 1cfc5a2ae6bb4bba492f32b679b63028c269ce47 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Wed, 30 Sep 2026 00:20:45 +0000 Subject: [PATCH 07/17] fix: correct pagination loop logic in dismiss-stale-bot-reviews.sh Replace problematic `A && B || C` pattern with proper if-then-else to ensure pagination cursor is set ONLY when hasNextPage is true AND endCursor is present. The previous pattern could execute the break statement incorrectly, potentially skipping reviews beyond the first page during GraphQL pagination. Co-Authored-By: Claude Haiku 4.5 --- scripts/dismiss-stale-bot-reviews.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/dismiss-stale-bot-reviews.sh b/scripts/dismiss-stale-bot-reviews.sh index f1512fbad..861b09e6a 100644 --- a/scripts/dismiss-stale-bot-reviews.sh +++ b/scripts/dismiss-stale-bot-reviews.sh @@ -136,8 +136,11 @@ while true; do has_next="$(jq -r '.data.repository.pullRequest.latestOpinionatedReviews.pageInfo.hasNextPage // false' <<<"$response")" end_cursor="$(jq -r '.data.repository.pullRequest.latestOpinionatedReviews.pageInfo.endCursor // ""' <<<"$response")" - [ "$has_next" = "true" ] && [ -n "$end_cursor" ] || break - cursor="$end_cursor" + if [ "$has_next" = "true" ] && [ -n "$end_cursor" ]; then + cursor="$end_cursor" + else + break + fi done # Revalidate the PR head immediately before applying any dismissal. The head can From 97215dcd62f6f6f7f52a3c3174702b2152983568 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Wed, 30 Sep 2026 00:25:50 +0000 Subject: [PATCH 08/17] fix: add --apply flag logic to dismiss-stale-bot-reviews workflows The workflow was running in dry-run mode by default (APPLY=false) without passing the --apply flag to the dismiss script. This caused the workflow to never actually dismiss stale reviews, defeating its purpose. Fix: Add DSBR_DRY_RUN environment variable and conditionally pass --apply to the script when dry-run mode is not explicitly enabled (defaults to applying dismissals). Addresses graphite-app critical finding #1116. Co-Authored-By: Claude Haiku 4.5 --- .github/workflows/dismiss-stale-bot-reviews.yml | 13 ++++++++++--- standards/workflows/dismiss-stale-bot-reviews.yml | 13 ++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dismiss-stale-bot-reviews.yml b/.github/workflows/dismiss-stale-bot-reviews.yml index 88985c297..8672b10bd 100644 --- a/.github/workflows/dismiss-stale-bot-reviews.yml +++ b/.github/workflows/dismiss-stale-bot-reviews.yml @@ -80,6 +80,8 @@ jobs: # Optional wholesale override of the bot allow-list (comma-separated # logins). Unset → the decision core's built-in CodeRabbit/Copilot list. DSBR_BOT_ALLOWLIST: ${{ vars.DSBR_BOT_ALLOWLIST }} + # Optional dry-run mode (set to "true" to preview without dismissing). + DSBR_DRY_RUN: ${{ vars.DSBR_DRY_RUN }} run: | set -euo pipefail core=".dsbr-tooling/scripts/dismiss-stale-bot-reviews.sh" @@ -87,7 +89,12 @@ jobs: echo "::warning::decision-core tooling unavailable (checkout failed); skipping — nothing dismissed" exit 0 fi - bash "$core" \ - --owner "${{ github.repository_owner }}" \ - --name "${{ github.event.repository.name }}" \ + args=( + --owner "${{ github.repository_owner }}" + --name "${{ github.event.repository.name }}" --pr "${{ github.event.pull_request.number }}" + ) + if [ "$DSBR_DRY_RUN" != "true" ]; then + args+=(--apply) + fi + bash "$core" "${args[@]}" diff --git a/standards/workflows/dismiss-stale-bot-reviews.yml b/standards/workflows/dismiss-stale-bot-reviews.yml index 88985c297..8672b10bd 100644 --- a/standards/workflows/dismiss-stale-bot-reviews.yml +++ b/standards/workflows/dismiss-stale-bot-reviews.yml @@ -80,6 +80,8 @@ jobs: # Optional wholesale override of the bot allow-list (comma-separated # logins). Unset → the decision core's built-in CodeRabbit/Copilot list. DSBR_BOT_ALLOWLIST: ${{ vars.DSBR_BOT_ALLOWLIST }} + # Optional dry-run mode (set to "true" to preview without dismissing). + DSBR_DRY_RUN: ${{ vars.DSBR_DRY_RUN }} run: | set -euo pipefail core=".dsbr-tooling/scripts/dismiss-stale-bot-reviews.sh" @@ -87,7 +89,12 @@ jobs: echo "::warning::decision-core tooling unavailable (checkout failed); skipping — nothing dismissed" exit 0 fi - bash "$core" \ - --owner "${{ github.repository_owner }}" \ - --name "${{ github.event.repository.name }}" \ + args=( + --owner "${{ github.repository_owner }}" + --name "${{ github.event.repository.name }}" --pr "${{ github.event.pull_request.number }}" + ) + if [ "$DSBR_DRY_RUN" != "true" ]; then + args+=(--apply) + fi + bash "$core" "${args[@]}" From 74f054167d2dd5b7ae088904722ec5bec3000393 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Wed, 30 Sep 2026 00:30:06 +0000 Subject: [PATCH 09/17] fix(bot): address bot feedback [skip ci-relay] --- standards/workflows/persona-mention.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/standards/workflows/persona-mention.yml b/standards/workflows/persona-mention.yml index ee2f94c4c..3ec68e2cf 100644 --- a/standards/workflows/persona-mention.yml +++ b/standards/workflows/persona-mention.yml @@ -57,9 +57,10 @@ permissions: {} jobs: persona-mention: permissions: - contents: read # the reusable checks out its tooling repo — required, - # or the call fails at startup (a reusable is granted - # no more than the caller; persona-standards.md §5) + # the reusable checks out its tooling repo — required, + # or the call fails at startup (a reusable is granted + # no more than the caller; persona-standards.md §5) + contents: read issues: read pull-requests: read uses: petry-projects/.github/.github/workflows/persona-mention-reusable.yml@persona-mention/v1-stable # NOSONAR(githubactions:S7637) first-party channel ref From acd9c9c3ed0998d8f9dfe0b52a6ca1d5fccd0ec4 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Wed, 30 Sep 2026 00:33:35 +0000 Subject: [PATCH 10/17] fix: address Lint and bats test failures Fixed two categories of CI failures: 1. Lint (actionlint/shellcheck SC2086): Quote unquoted variables in dismiss-stale-bot-reviews-tests.yml to prevent word splitting ($max_retries, $attempt, $backoff). 2. Bats orchestrator tests: Add --apply flag to two test cases that expect actual dismissals ("dismisses a stale bot review found only on page 2" and "GraphQL errors envelope"). Tests ran in dry-run mode without --apply, causing output mismatches ("would dismiss" vs "dismissed"). Co-Authored-By: Claude Haiku 4.5 --- .github/workflows/dismiss-stale-bot-reviews-tests.yml | 6 +++--- test/workflows/dismiss-stale-bot-reviews/orchestrator.bats | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dismiss-stale-bot-reviews-tests.yml b/.github/workflows/dismiss-stale-bot-reviews-tests.yml index 18cb5fb3a..852da4c8f 100644 --- a/.github/workflows/dismiss-stale-bot-reviews-tests.yml +++ b/.github/workflows/dismiss-stale-bot-reviews-tests.yml @@ -55,14 +55,14 @@ jobs: run: | set -euo pipefail max_retries=3 - for attempt in $(seq 1 $max_retries); do + for attempt in $(seq 1 "$max_retries"); do if sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends bats jq; then exit 0 fi - if [ $attempt -lt $max_retries ]; then + if [ "$attempt" -lt "$max_retries" ]; then backoff=$((2 ** (attempt - 1))) echo "::warning::apt failed (attempt $attempt/$max_retries); retrying in ${backoff}s…" >&2 - sleep $backoff + sleep "$backoff" fi done exit 1 diff --git a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats index 51a58ebf0..56de81e86 100644 --- a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats +++ b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats @@ -161,7 +161,7 @@ cat "$DSBR_PAGE1" STUB chmod +x "${TT_TMP}/bin/gh" - run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --apply [ "$status" -eq 0 ] # Assert the paginated summary before the `run grep` below overwrites $output. echo "$output" | grep -q 'examined 2 effective review(s), dismissed 1 stale bot review' @@ -216,7 +216,7 @@ cat "$DSBR_RESPONSE" STUB chmod +x "${TT_TMP}/bin/gh" - run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --apply [ "$status" -eq 0 ] echo "$output" | grep -q 'returned a GraphQL errors envelope' # the phantom dismissal is not counted From 9430b1d72b1314435dfa60d39e24097812b1e848 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Wed, 30 Sep 2026 00:37:39 +0000 Subject: [PATCH 11/17] fix: resolve test failures in dismiss-stale-bot-reviews and deploy-standard-workflows tests - Add --apply flag to dismiss-stale-bot-reviews orchestrator test to enable actual dismissals - Fix sed pattern in verbatim-self-contained test to match correct indentation These fixes resolve the Tier 1 CI failures that were blocking this PR. Co-Authored-By: Claude Haiku 4.5 --- .../deploy-standard-workflows/verbatim-self-contained.bats | 2 +- test/workflows/dismiss-stale-bot-reviews/orchestrator.bats | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/scripts/deploy-standard-workflows/verbatim-self-contained.bats b/test/scripts/deploy-standard-workflows/verbatim-self-contained.bats index db793f23a..bebf9c808 100644 --- a/test/scripts/deploy-standard-workflows/verbatim-self-contained.bats +++ b/test/scripts/deploy-standard-workflows/verbatim-self-contained.bats @@ -37,7 +37,7 @@ setup() { @test "self-contained stub with drifted permissions is NOT compliant" { local drifted - drifted="$(sed '/^ pull-requests:/s/: write/: read/' "$TEMPLATE")" + drifted="$(sed '/pull-requests:/s/: write/: read/' "$TEMPLATE")" run is_pin_compliant "$drifted" "$TEMPLATE" "somerepo" [ "$status" -eq 1 ] } diff --git a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats index 56de81e86..29d1af2f7 100644 --- a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats +++ b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats @@ -49,7 +49,7 @@ STUB teardown() { rm -rf "${TT_TMP:-/nonexistent}"; } @test "dismisses ONLY the stale allow-listed bot review; leaves head/human/approved" { - run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --apply [ "$status" -eq 0 ] # Assert the script's summary output before the log-inspecting `run grep` calls # below overwrite bats's $output. From a0111984b596f8aeb331b6794fbbd659afbdf61b Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Fri, 2 Oct 2026 23:48:42 +0000 Subject: [PATCH 12/17] fix(reviews): address review comments [skip ci-relay] --- scripts/dismiss-stale-bot-reviews.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/dismiss-stale-bot-reviews.sh b/scripts/dismiss-stale-bot-reviews.sh index 861b09e6a..fbef470c9 100644 --- a/scripts/dismiss-stale-bot-reviews.sh +++ b/scripts/dismiss-stale-bot-reviews.sh @@ -110,14 +110,16 @@ while true; do "${cursor_arg[@]}" \ -f owner="$OWNER" -f name="$NAME" -F number="$PR")" + # Reject an errors envelope on EVERY page (HTTP 200 can carry partial data plus + # errors); processing a partial page would silently omit stale reviews. + if jq -e '(.errors // []) | length > 0' <<<"$response" >/dev/null 2>&1; then + echo "::error::GraphQL error while fetching reviews for ${OWNER}/${NAME}#${PR}: $(jq -r '.errors[0].message // "unknown error"' <<<"$response")" >&2 + exit 1 + fi + # Resolve the head oid once, from the first page, and fail-loud-then-noop if the # PR cannot be resolved — before examining any reviews. if [ "$first" = "true" ]; then - # Reject errors in the response; distinguish from a not-found case. - if jq -e '(.errors // []) | length > 0' <<<"$response" >/dev/null 2>&1; then - echo "::error::GraphQL error while fetching head oid for ${OWNER}/${NAME}#${PR}: $(jq -r '.errors[0].message // "unknown error"' <<<"$response")" >&2 - exit 1 - fi head_oid="$(jq -r '.data.repository.pullRequest.headRefOid // ""' <<<"$response")" if [ -z "$head_oid" ]; then echo "::warning::could not resolve head oid for ${OWNER}/${NAME}#${PR} (PR not found or not accessible); nothing to do" From 6f5c5272ac57d04a6f4046de5ace85c866be45a6 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Fri, 2 Oct 2026 23:56:29 +0000 Subject: [PATCH 13/17] fix(reviews): address review comments [skip ci-relay] --- scripts/dismiss-stale-bot-reviews.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/dismiss-stale-bot-reviews.sh b/scripts/dismiss-stale-bot-reviews.sh index fbef470c9..e2eb0b16c 100644 --- a/scripts/dismiss-stale-bot-reviews.sh +++ b/scripts/dismiss-stale-bot-reviews.sh @@ -182,7 +182,10 @@ while IFS=$'\t' read -r review_id state commit_oid login author_type; do # dismiss a review now on the current head even though it is no longer # superseded. Re-read the live head and stop all further mutations if it # changed; the synchronize/submitted event for the new head re-runs us (#1116). - if [ "$aborted" = "false" ]; then + if [ "$aborted" = "true" ]; then + break + fi + { current_head_recheck="$(gh_api_retry gh api graphql \ -f query='query($owner:String!, $name:String!, $number:Int!) { repository(owner:$owner, name:$name) { pullRequest(number:$number) { headRefOid } } @@ -192,9 +195,9 @@ while IFS=$'\t' read -r review_id state commit_oid login author_type; do if [ "$current_head_recheck_oid" != "$head_oid" ]; then echo "::warning::PR head moved from ${head_oid} to ${current_head_recheck_oid:-} during dismissal loop for ${OWNER}/${NAME}#${PR}; aborting remaining dismissals to avoid clearing a review on the new head" aborted=true - continue + break fi - fi + } msg="Superseded: dismissed by dismiss-stale-bot-reviews because ${login}'s CHANGES_REQUESTED review was on ${commit_oid} but the PR head is now ${head_oid}. A still-valid finding returns as a fresh review on the new commit." if [ "$APPLY" != "true" ]; then From fdb1fce64189449820d6e17b6ac164244969f737 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Sat, 3 Oct 2026 04:54:22 +0000 Subject: [PATCH 14/17] fix: use bash [[ ]] instead of [ ] for conditional tests Addressed SonarQube findings: replaced POSIX [ ] test constructs with bash [[ ]] operator for safer conditional testing (avoids pathname expansion and word splitting). --- scripts/dismiss-stale-bot-reviews.sh | 30 ++++++++++++------------ scripts/lib/dismiss-stale-bot-reviews.sh | 14 +++++------ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/scripts/dismiss-stale-bot-reviews.sh b/scripts/dismiss-stale-bot-reviews.sh index e2eb0b16c..37254bb6c 100644 --- a/scripts/dismiss-stale-bot-reviews.sh +++ b/scripts/dismiss-stale-bot-reviews.sh @@ -32,7 +32,7 @@ gh_api_retry() { while true; do "$@" && return 0 local exit_code=$? - if [ $attempt -ge $max_retries ]; then + if [[ $attempt -ge $max_retries ]]; then return $exit_code fi local backoff=$((2 ** (attempt - 1))) @@ -42,7 +42,7 @@ gh_api_retry() { done } -while [ $# -gt 0 ]; do +while [[ $# -gt 0 ]]; do case "$1" in --owner) OWNER="$2"; shift 2 ;; --name) NAME="$2"; shift 2 ;; @@ -54,7 +54,7 @@ while [ $# -gt 0 ]; do esac done -if [ -z "$OWNER" ] || [ -z "$NAME" ] || [ -z "$PR" ]; then +if [[ -z "$OWNER" ]] || [[ -z "$NAME" ]] || [[ -z "$PR" ]]; then echo "::error::--owner, --name and --pr are required" >&2 exit 1 fi @@ -100,7 +100,7 @@ GRAPHQL head_oid="" reviews="" cursor="" first=true while true; do # cursor="" => first page (pass JSON null, -F); otherwise pass the string (-f). - if [ -z "$cursor" ]; then + if [[ -z "$cursor" ]]; then cursor_arg=(-F cursor=null) else cursor_arg=(-f "cursor=$cursor") @@ -119,9 +119,9 @@ while true; do # Resolve the head oid once, from the first page, and fail-loud-then-noop if the # PR cannot be resolved — before examining any reviews. - if [ "$first" = "true" ]; then + if [[ "$first" = "true" ]]; then head_oid="$(jq -r '.data.repository.pullRequest.headRefOid // ""' <<<"$response")" - if [ -z "$head_oid" ]; then + if [[ -z "$head_oid" ]]; then echo "::warning::could not resolve head oid for ${OWNER}/${NAME}#${PR} (PR not found or not accessible); nothing to do" exit 0 fi @@ -134,11 +134,11 @@ while true; do | [ .id, .state, (.commit.oid // ""), (.author.login // ""), (.author.__typename // "") ] | @tsv ' <<<"$response")" - [ -n "$page_reviews" ] && reviews+="${page_reviews}"$'\n' + [[ -n "$page_reviews" ]] && reviews+="${page_reviews}"$'\n' has_next="$(jq -r '.data.repository.pullRequest.latestOpinionatedReviews.pageInfo.hasNextPage // false' <<<"$response")" end_cursor="$(jq -r '.data.repository.pullRequest.latestOpinionatedReviews.pageInfo.endCursor // ""' <<<"$response")" - if [ "$has_next" = "true" ] && [ -n "$end_cursor" ]; then + if [[ "$has_next" = "true" ]] && [[ -n "$end_cursor" ]]; then cursor="$end_cursor" else break @@ -163,14 +163,14 @@ if jq -e '(.errors // []) | length > 0' <<<"$recheck" >/dev/null 2>&1; then exit 1 fi current_head="$(jq -r '.data.repository.pullRequest.headRefOid // ""' <<<"$recheck")" -if [ "$current_head" != "$head_oid" ]; then +if [[ "$current_head" != "$head_oid" ]]; then echo "::warning::PR head moved from ${head_oid} to ${current_head:-} during the review read for ${OWNER}/${NAME}#${PR}; skipping dismissals this run to avoid clearing a review on the new head" exit 0 fi dismissed=0 would_dismiss=0 examined=0 aborted=false while IFS=$'\t' read -r review_id state commit_oid login author_type; do - [ -n "$review_id" ] || continue + [[ -n "$review_id" ]] || continue examined=$((examined + 1)) if ! dsbr_should_dismiss "$state" "$commit_oid" "$head_oid" "$login" "$author_type"; then continue @@ -182,7 +182,7 @@ while IFS=$'\t' read -r review_id state commit_oid login author_type; do # dismiss a review now on the current head even though it is no longer # superseded. Re-read the live head and stop all further mutations if it # changed; the synchronize/submitted event for the new head re-runs us (#1116). - if [ "$aborted" = "true" ]; then + if [[ "$aborted" = "true" ]]; then break fi { @@ -192,7 +192,7 @@ while IFS=$'\t' read -r review_id state commit_oid login author_type; do }' \ -f owner="$OWNER" -f name="$NAME" -F number="$PR")" current_head_recheck_oid="$(jq -r '.data.repository.pullRequest.headRefOid // ""' <<<"$current_head_recheck")" - if [ "$current_head_recheck_oid" != "$head_oid" ]; then + if [[ "$current_head_recheck_oid" != "$head_oid" ]]; then echo "::warning::PR head moved from ${head_oid} to ${current_head_recheck_oid:-} during dismissal loop for ${OWNER}/${NAME}#${PR}; aborting remaining dismissals to avoid clearing a review on the new head" aborted=true break @@ -200,7 +200,7 @@ while IFS=$'\t' read -r review_id state commit_oid login author_type; do } msg="Superseded: dismissed by dismiss-stale-bot-reviews because ${login}'s CHANGES_REQUESTED review was on ${commit_oid} but the PR head is now ${head_oid}. A still-valid finding returns as a fresh review on the new commit." - if [ "$APPLY" != "true" ]; then + if [[ "$APPLY" != "true" ]]; then # Default behavior: dry-run (report-only). A candidate is NOT mutated, so it # must NOT be counted as dismissed — track it in a separate would-dismiss # tally instead, or the summary would report reviews as dismissed that are @@ -226,7 +226,7 @@ while IFS=$'\t' read -r review_id state commit_oid login author_type; do continue fi new_state="$(jq -r '.data.dismissPullRequestReview.pullRequestReview.state // ""' <<<"$mutation_resp")" - if [ "$new_state" != "DISMISSED" ]; then + if [[ "$new_state" != "DISMISSED" ]]; then echo "::warning::dismissal of review ${review_id} by ${login} was not confirmed (state='${new_state:-}'); leaving it in place" continue fi @@ -234,7 +234,7 @@ while IFS=$'\t' read -r review_id state commit_oid login author_type; do dismissed=$((dismissed + 1)) done <<<"$reviews" -if [ "$APPLY" != "true" ]; then +if [[ "$APPLY" != "true" ]]; then echo "dismiss-stale-bot-reviews [dry-run]: examined ${examined} effective review(s), would dismiss ${would_dismiss} stale bot review(s) on ${OWNER}/${NAME}#${PR} (head ${head_oid}); no reviews were dismissed" else echo "dismiss-stale-bot-reviews: examined ${examined} effective review(s), dismissed ${dismissed} stale bot review(s) on ${OWNER}/${NAME}#${PR} (head ${head_oid})" diff --git a/scripts/lib/dismiss-stale-bot-reviews.sh b/scripts/lib/dismiss-stale-bot-reviews.sh index bbf102571..563b9e93b 100644 --- a/scripts/lib/dismiss-stale-bot-reviews.sh +++ b/scripts/lib/dismiss-stale-bot-reviews.sh @@ -41,7 +41,7 @@ DSBR_DEFAULT_ALLOWLIST=( # "a[bot], b[bot]" resolves to "a[bot]" and "b[bot]", not "a[bot]" and " b[bot]". dsbr_resolve_allowlist() { local csv="${1:-${DSBR_BOT_ALLOWLIST:-}}" - if [ -z "$csv" ]; then + if [[ -z "$csv" ]]; then printf '%s\n' "${DSBR_DEFAULT_ALLOWLIST[@]}" return 0 fi @@ -51,7 +51,7 @@ dsbr_resolve_allowlist() { for entry in "${entries[@]}"; do entry="${entry#"${entry%%[![:space:]]*}"}" # strip leading whitespace entry="${entry%"${entry##*[![:space:]]}"}" # strip trailing whitespace - [ -n "$entry" ] && printf '%s\n' "$entry" + [[ -n "$entry" ]] && printf '%s\n' "$entry" done } @@ -62,7 +62,7 @@ dsbr_resolve_allowlist() { # even if a human login were mistakenly present in the allow-list. dsbr_is_allowlisted_bot() { local login="$1" author_type="$2" csv="${3:-}" - [ "$author_type" = "Bot" ] || return 1 + [[ "$author_type" = "Bot" ]] || return 1 # Pre-parse the resolved allow-list once into a local associative array so the # membership test is a native in-process lookup rather than a per-entry string # compare. All loop-scoped names are declared local so nothing leaks to global @@ -72,7 +72,7 @@ dsbr_is_allowlisted_bot() { while IFS= read -r allowed; do allowed_bots["$allowed"]=1 done < <(dsbr_resolve_allowlist "$csv") - [ -n "${allowed_bots[$login]:-}" ] + [[ -n "${allowed_bots[$login]:-}" ]] } # dsbr_should_dismiss [allowlist_csv] @@ -81,9 +81,9 @@ dsbr_is_allowlisted_bot() { # review_oid or head_oid cannot prove the review is superseded, so it is kept. dsbr_should_dismiss() { local state="$1" review_oid="$2" head_oid="$3" login="$4" author_type="$5" csv="${6:-}" - [ "$state" = "CHANGES_REQUESTED" ] || return 1 - [ -n "$review_oid" ] && [ -n "$head_oid" ] || return 1 - [ "$review_oid" != "$head_oid" ] || return 1 + [[ "$state" = "CHANGES_REQUESTED" ]] || return 1 + [[ -n "$review_oid" ]] && [[ -n "$head_oid" ]] || return 1 + [[ "$review_oid" != "$head_oid" ]] || return 1 dsbr_is_allowlisted_bot "$login" "$author_type" "$csv" || return 1 return 0 } From dd0b14f8dd24b345bc08b200e67fe37490b53082 Mon Sep 17 00:00:00 2001 From: don-petry Date: Wed, 14 Oct 2026 10:00:08 -0500 Subject: [PATCH 15/17] chore: rename petry-projects references to combsmith The org was renamed to combsmith; GitHub Actions does not redirect uses: after a rename. Same rewrite as the org cutover, nothing else. This branch still conflicts with main for reasons unrelated to the rename. --- .github/CODEOWNERS | 4 +- .github/copilot-instructions.md | 6 +- .github/dependabot.yml | 2 +- .github/schemas/signals.schema.json | 2 +- .../scripts/add-to-project/add-issue-or-pr.sh | 2 +- .../add-to-project/classify-initiative.sh | 2 +- .github/scripts/add-to-project/lib.sh | 4 +- .../add-to-project/reconcile-backlog.sh | 2 +- .../feature-ideation/collect-signals.sh | 8 +- .../feature-ideation/discussion-mutations.sh | 2 +- .../feature-ideation/lib/compose-signals.sh | 4 +- .../feature-ideation/lib/date-utils.sh | 2 +- .../feature-ideation/lib/filter-bots.sh | 4 +- .../scripts/feature-ideation/lib/gh-safe.sh | 6 +- .../scripts/feature-ideation/lint-caller.sh | 2 +- .../scripts/feature-ideation/lint-prompt.sh | 10 +- .../feature-ideation/match-discussions.sh | 6 +- .../feature-ideation/validate-signals.py | 6 +- .../scripts/pr-auto-review/sweep-dispatch.sh | 8 +- .../workflows/add-to-project-reconcile.yml | 10 +- .github/workflows/add-to-project-reusable.yml | 16 +- .github/workflows/add-to-project.yml | 14 +- .github/workflows/agent-shield-reusable.yml | 4 +- .github/workflows/agent-shield.yml | 6 +- .../apply-repo-settings-reusable.yml | 12 +- .../workflows/apply-repo-settings-tests.yml | 2 +- .github/workflows/auto-rebase-reusable.yml | 6 +- .github/workflows/auto-rebase.yml | 6 +- .github/workflows/ci.yml | 2 +- .github/workflows/copilot-setup-steps.yml | 8 +- .../dependabot-automerge-reusable.yml | 2 +- .github/workflows/dependabot-automerge.yml | 6 +- .../workflows/dependabot-rebase-reusable.yml | 2 +- .github/workflows/dependabot-rebase.yml | 8 +- .../workflows/dependency-audit-reusable.yml | 2 +- .github/workflows/dependency-audit.yml | 6 +- .github/workflows/dev-lead.yml | 8 +- .../workflows/dismiss-stale-bot-reviews.yml | 22 +- .github/workflows/duplicate-decl-gate.yml | 4 +- .../workflows/feature-ideation-reusable.yml | 10 +- .github/workflows/feature-ideation.yml | 18 +- .github/workflows/idea-enhancer-reusable.yml | 6 +- .github/workflows/idea-triage-reusable.yml | 6 +- .github/workflows/initiative-driver.yml | 28 +- .../workflows/initiative-planner-reusable.yml | 8 +- .github/workflows/initiative-planner.yml | 12 +- .github/workflows/migration-tooling-tests.yml | 2 +- .github/workflows/org-scorecard.yml | 4 +- .../workflows/persona-mention-reusable.yml | 40 +- .github/workflows/pinned-version-report.yml | 2 +- .github/workflows/pr-auto-review-reusable.yml | 6 +- .github/workflows/pr-auto-review-sweep.yml | 4 +- .github/workflows/pr-auto-review.yml | 8 +- .../workflows/pr-review-mention-reusable.yml | 6 +- .github/workflows/pr-review-mention.yml | 8 +- .github/workflows/sonarcloud-audit.yml | 2 +- .github/workflows/sonarcloud.yml | 2 +- .github/workflows/standards-deploy-tests.yml | 2 +- .github/workflows/standards-deploy.yml | 4 +- .gitignore | 10 +- AGENTS.md | 58 +-- CLAUDE.md | 4 +- CONTRIBUTING.md | 16 +- README.md | 14 +- SECURITY.md | 2 +- docs/bootstrap/new-repo-validation.md | 62 +-- docs/initiatives/agent-canary-rings-adr.md | 6 +- docs/initiatives/agent-rate-limits-adr.md | 26 +- .../agents-md-validation-cycle-log.md | 4 +- docs/initiatives/agents-md-validation.md | 18 +- docs/initiatives/canary-rollout-adr.md | 24 +- docs/initiatives/pull-request-limits-adr.md | 12 +- profile/README.md | 72 ++-- scripts/agent-rate-limit-gate.sh | 2 +- scripts/agents-md-lint.sh | 6 +- scripts/apply-repo-settings.sh | 10 +- scripts/apply-rulesets.sh | 8 +- scripts/automerge-standards-sync.sh | 4 +- scripts/bootstrap-new-repo.sh | 18 +- scripts/canary-rollout.sh | 6 +- scripts/check-cron-timing.sh | 2 +- scripts/check-duplicate-decls.sh | 2 +- scripts/compliance-audit.sh | 74 ++-- scripts/compliance-remediate.sh | 22 +- scripts/compliance-retrigger.sh | 4 +- scripts/cut-standards-release.sh | 4 +- scripts/deploy-standard-workflows.sh | 8 +- scripts/fix-check-suite-prefs.sh | 2 +- scripts/fix-ruleset-bypass.sh | 4 +- scripts/lib/agent-ingress.sh | 4 +- scripts/lib/agents-md-rules.json | 6 +- scripts/lib/cron-timing.sh | 2 +- scripts/lib/gitignore-baseline.sh | 4 +- scripts/lib/labels.sh | 6 +- scripts/lib/persona-mention.sh | 18 +- scripts/lib/pr-limit-gate.sh | 6 +- scripts/lib/push-protection.sh | 10 +- scripts/lib/ring-pins.sh | 6 +- scripts/lib/standards-deploy.sh | 6 +- scripts/migrate-claude-label.sh | 4 +- scripts/org_report.sh | 2 +- scripts/org_status.sh | 24 +- scripts/pinned-version-report.sh | 4 +- scripts/pr-limits-report.sh | 4 +- scripts/seed-repo-template.sh | 6 +- scripts/sonarcloud-audit.sh | 4 +- scripts/standards-deploy-driver.sh | 4 +- scripts/sync-gitignore-baseline.sh | 2 +- sonar-project.properties | 2 +- standards/advanced-security.md | 24 +- standards/agent-rate-limits.json | 4 +- standards/agent-rate-limits.md | 36 +- standards/agent-standards.md | 8 +- standards/canary-rings.json | 202 ++++----- standards/ci-standards.md | 104 ++--- standards/codeowners-standard.md | 30 +- standards/commercial-support-standard.md | 10 +- standards/copilot-instructions-standard.md | 18 +- standards/dependabot-policy.md | 16 +- standards/github-settings.md | 44 +- standards/gitignore-standard.md | 6 +- standards/initiatives-project.md | 22 +- standards/persona-standards.md | 28 +- standards/personas/TEMPLATE/README.md | 14 +- standards/personas/TEMPLATE/persona.yml | 16 +- standards/personas/persona.schema.json | 8 +- standards/pr-limits.json | 4 +- standards/pr-limits.md | 22 +- standards/push-protection.md | 14 +- standards/ruleset-remediation-runbook.md | 14 +- standards/rulesets/README.md | 16 +- standards/standards-versioning.md | 6 +- standards/workflows/add-to-project.yml | 16 +- standards/workflows/agent-ingress.yml | 16 +- standards/workflows/agent-shield.yml | 8 +- standards/workflows/apply-repo-settings.yml | 10 +- standards/workflows/auto-rebase.yml | 8 +- standards/workflows/ci.yml | 6 +- standards/workflows/copilot-setup-steps.yml | 8 +- standards/workflows/dependabot-automerge.yml | 8 +- standards/workflows/dependabot-rebase.yml | 8 +- standards/workflows/dependency-audit.yml | 8 +- standards/workflows/dev-lead.yml | 16 +- .../workflows/dismiss-stale-bot-reviews.yml | 22 +- standards/workflows/feature-ideation.yml | 16 +- standards/workflows/idea-enhancer.yml | 12 +- standards/workflows/idea-triage.yml | 12 +- standards/workflows/initiative-driver.yml | 28 +- standards/workflows/initiative-planner.yml | 12 +- standards/workflows/persona-mention.yml | 16 +- standards/workflows/pr-auto-review.yml | 10 +- standards/workflows/pr-review-mention.yml | 10 +- standards/workflows/sonarcloud.yml | 6 +- .../apply-repo-settings.bats | 2 +- .../reusable-contract.bats | 12 +- .../apply-rulesets/apply-rulesets.bats | 28 +- .../automerge-standards-sync/automerge.bats | 14 +- .../agents-md-structural-lint.bats | 4 +- .../centralized-stub-pins.bats | 10 +- .../close-resolved-issues.bats | 2 +- .../compliance-audit/codeowners-catchall.bats | 12 +- .../compliance-audit/codeowners-content.bats | 10 +- .../codeowners-unreadable.bats | 2 +- .../dev-lead-stub-channel-sync.bats | 28 +- .../feature-ideation-placeholder-context.bats | 4 +- .../compliance-audit/gitignore-baseline.bats | 8 +- .../ruleset-contents-drift.bats | 4 +- .../rulesets-hands-off-routing.bats | 2 +- .../sonar-s7637-exemption.bats | 14 +- .../stale-channel-major-agreement.bats | 2 +- .../compliance-audit/stub-surface-drift.bats | 8 +- .../gitignore-baseline.bats | 18 +- .../security-analysis.bats | 10 +- .../compliance-retrigger/transient-retry.bats | 8 +- .../compliance-retrigger/workflow-health.bats | 8 +- .../deploy-standard-workflows/dry-run.bats | 2 +- .../deploy-standard-workflows/emit-vform.bats | 8 +- .../feature-ideation-seed-repin.bats | 2 +- .../ingress-collapse.bats | 6 +- .../persona-mention-deployable.bats | 2 +- .../verbatim-managed-stub.bats | 2 +- .../duplicate-decl-gate.bats | 4 +- test/scripts/lib/gitignore-baseline.bats | 8 +- test/scripts/lib/ring-pins.bats | 34 +- test/scripts/lib/standards-deploy.bats | 22 +- .../migrate-major-channels/migrate.bats | 10 +- .../resolve-and-drift.bats | 4 +- test/scripts/pr-limits/pr-limit-gate.bats | 2 +- test/scripts/pr-limits/pr-limits-report.bats | 2 +- .../standards-deploy-driver/driver.bats | 2 +- .../add-to-project/add-issue-or-pr.bats | 2 +- .../add-to-project/classify-initiative.bats | 56 +-- .../add-to-project/reconcile-backlog.bats | 4 +- .../auto-rebase/conflict-sentinel.bats | 2 +- .../orchestrator.bats | 14 +- .../feature-ideation/collect-signals.bats | 4 +- .../feature-ideation/date-utils.bats | 2 +- .../discussion-mutations.bats | 2 +- .../INVALID-missing-field.signals.json | 2 +- .../fixtures/expected/empty-repo.signals.json | 2 +- .../fixtures/expected/populated.signals.json | 2 +- .../fixtures/expected/truncated.signals.json | 2 +- test/workflows/feature-ideation/gh-safe.bats | 4 +- .../feature-ideation/lint-prompt.bats | 4 +- .../feature-ideation/match-discussions.bats | 10 +- .../feature-ideation/signals-schema.bats | 6 +- test/workflows/feature-ideation/stubs/gh | 2 +- .../initiative-driver/gate-tooling.bats | 4 +- .../pr-auto-review/sweep-dispatch.bats | 40 +- test/workflows/pr-auto-review/sweep.bats | 18 +- test/workflows/pr-review-mention/ack.bats | 2 +- tests/canary_rollout.bats | 400 +++++++++--------- tests/persona_mention.bats | 36 +- tests/standards_release.bats | 2 +- tests/test_agent_rate_limit.bats | 2 +- tests/test_agent_rate_limit_gate.bats | 22 +- tests/test_agent_rate_limit_ingress.bats | 24 +- tests/test_agent_rate_limit_token_budget.bats | 2 +- tests/test_agent_rate_limit_weekly_glide.bats | 2 +- tests/test_agent_rate_limits_config.bats | 2 +- tests/test_bootstrap_new_repo.bats | 20 +- tests/test_seed_repo_template_gitignore.bats | 8 +- 222 files changed, 1490 insertions(+), 1490 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d8556fd53..8a097b9d2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,10 +2,10 @@ # Each line is a pattern followed by one or more owners. # Owners are matched in order, last matching pattern wins. # -# Standard: use the @petry-projects/org-leads team for all code owner +# Standard: use the @combsmith/org-leads team for all code owner # assignments instead of listing individuals or bot accounts directly. # This keeps CODEOWNERS files stable and centralizes membership management. # See: standards/codeowners-standard.md # Default catch-all — org-leads own everything -* @petry-projects/org-leads +* @combsmith/org-leads diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 3a81f33fa..8127da5c9 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,13 +1,13 @@ -# Copilot Instructions — petry-projects/.github +# Copilot Instructions — combsmith/.github -> **Note:** This file applies to the `petry-projects/.github` repository only. Copilot +> **Note:** This file applies to the `combsmith/.github` repository only. Copilot > instruction files are repository-scoped — there is no automatic org-wide propagation. Every > other repo in the org must have its own `.github/copilot-instructions.md`. Use this file as > the canonical template; the weekly compliance audit enforces deployment to each repo. ## Repository Overview -This is the **org standards repository** for `petry-projects`. It contains org-wide AI agent +This is the **org standards repository** for `combsmith`. It contains org-wide AI agent standards (`AGENTS.md`), canonical CI workflow templates (`standards/workflows/`), the compliance audit script, and the canonical Copilot instruction files that every repo should adopt. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1b267f263..ba1ee5e72 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ # Dependabot configuration — GitHub Actions ecosystem only (docs-only repo). -# Standard: https://github.com/petry-projects/.github/blob/main/standards/dependabot-policy.md +# Standard: https://github.com/combsmith/.github/blob/main/standards/dependabot-policy.md version: 2 updates: - package-ecosystem: "github-actions" diff --git a/.github/schemas/signals.schema.json b/.github/schemas/signals.schema.json index ded4367e1..c4c2b3d1d 100644 --- a/.github/schemas/signals.schema.json +++ b/.github/schemas/signals.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/petry-projects/.github/blob/main/.github/schemas/signals.schema.json", + "$id": "https://github.com/combsmith/.github/blob/main/.github/schemas/signals.schema.json", "$comment": "version: 1.0.0 — must match SCHEMA_VERSION in collect-signals.sh; enforced by bats", "title": "Feature Ideation Signals", "description": "Canonical contract between collect-signals.sh and the BMAD Analyst (Mary) prompt. Any change to this schema is a breaking change to the workflow.", diff --git a/.github/scripts/add-to-project/add-issue-or-pr.sh b/.github/scripts/add-to-project/add-issue-or-pr.sh index d78327c1f..f77513cbc 100644 --- a/.github/scripts/add-to-project/add-issue-or-pr.sh +++ b/.github/scripts/add-to-project/add-issue-or-pr.sh @@ -9,7 +9,7 @@ # compliance-audit,health-check,fleet-tracker,daily-report) — the noise # filter that keeps automation-generated churn off the board. # -# Reconcile, not just add (petry-projects/.github#415 §2): if an item that +# Reconcile, not just add (combsmith/.github#415 §2): if an item that # was on the board stops qualifying — required label removed, or an excluded # label added — its project item is removed, built on the shared # find_project_item / delete_project_item helpers in lib.sh. diff --git a/.github/scripts/add-to-project/classify-initiative.sh b/.github/scripts/add-to-project/classify-initiative.sh index f037331a6..ed9c0aea1 100755 --- a/.github/scripts/add-to-project/classify-initiative.sh +++ b/.github/scripts/add-to-project/classify-initiative.sh @@ -2,7 +2,7 @@ # classify-initiative.sh — assign the Initiative single-select field (and its # rolled-up Theme) on Initiatives-project items that don't have one yet. # -# Why this exists (petry-projects/.github#415): the add-to-project automation +# Why this exists (combsmith/.github#415): the add-to-project automation # only ever places items ON the board (addProjectV2ItemById); nothing set the # Initiative field, so nearly every item sat on the board unassociated with any # initiative. This is the continuous, deterministic classifier that fills that diff --git a/.github/scripts/add-to-project/lib.sh b/.github/scripts/add-to-project/lib.sh index 3d683ef9a..63d214c33 100644 --- a/.github/scripts/add-to-project/lib.sh +++ b/.github/scripts/add-to-project/lib.sh @@ -2,7 +2,7 @@ # lib.sh — shared helpers for the add-to-project scripts. # # This is the "designed once" mechanism called for in -# petry-projects/.github#415: a single paginated project-item lookup +# combsmith/.github#415: a single paginated project-item lookup # (find_project_item) parameterized by a match predicate, plus the # add / draft / delete mutations and the env guard. Both # add-issue-or-pr.sh and reconcile-discussion.sh source this file so the @@ -24,7 +24,7 @@ _atp_require_env() { return 64 fi if [ -z "${GH_TOKEN:-}" ]; then - printf '::error::[%s] GH_TOKEN is empty. INITIATIVES_APP_ID / INITIATIVES_APP_PRIVATE_KEY are likely unset or stale. See petry-projects/.github#387.\n' "$1" >&2 + printf '::error::[%s] GH_TOKEN is empty. INITIATIVES_APP_ID / INITIATIVES_APP_PRIVATE_KEY are likely unset or stale. See combsmith/.github#387.\n' "$1" >&2 return 64 fi } diff --git a/.github/scripts/add-to-project/reconcile-backlog.sh b/.github/scripts/add-to-project/reconcile-backlog.sh index bebbc118a..2cea5c7db 100644 --- a/.github/scripts/add-to-project/reconcile-backlog.sh +++ b/.github/scripts/add-to-project/reconcile-backlog.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # reconcile-backlog.sh — periodic/manual backlog reconcile for add-to-project. # -# Why this exists (petry-projects/.github#518): the event-driven add-to-project +# Why this exists (combsmith/.github#518): the event-driven add-to-project # path misses qualifying items in two structural cases — # 1. issues/PRs created by the default GITHUB_TOKEN (app/github-actions): # GitHub does not fire workflows from default-token events, so diff --git a/.github/scripts/feature-ideation/collect-signals.sh b/.github/scripts/feature-ideation/collect-signals.sh index b2ae23cc3..692a70727 100755 --- a/.github/scripts/feature-ideation/collect-signals.sh +++ b/.github/scripts/feature-ideation/collect-signals.sh @@ -30,7 +30,7 @@ set -euo pipefail # compatibility break: validate-signals.py will reject the runtime output # if the constants drift, AND the bats `signals-schema: SCHEMA_VERSION # constant matches schema file` test enforces this in CI. -# Caught by CodeRabbit review on PR petry-projects/.github#85. +# Caught by CodeRabbit review on PR combsmith/.github#85. SCHEMA_VERSION="1.0.0" SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" @@ -61,7 +61,7 @@ main() { # Validate that limit overrides are positive integers before forwarding to # GraphQL — a value like `ISSUE_LIMIT=foo` would cause an opaque downstream # failure instead of a clean usage error. Caught by CodeRabbit review on - # PR petry-projects/.github#85. + # PR combsmith/.github#85. local _lim_name _lim_val for _lim_name in ISSUE_LIMIT PR_LIMIT DISCUSSION_LIMIT; do case "$_lim_name" in @@ -77,7 +77,7 @@ main() { # Strict owner/name format — reject leading/trailing slashes, empty segments, # and extra path parts (e.g. "org//repo", "/repo", "org/repo/extra"). - # Caught by CodeRabbit review on PR petry-projects/.github#85. + # Caught by CodeRabbit review on PR combsmith/.github#85. if [[ ! $REPO =~ ^[^/]+/[^/]+$ ]]; then printf '[collect-signals] REPO must be in owner/name format, got: %s\n' "$REPO" >&2 return 64 @@ -100,7 +100,7 @@ main() { --json number,title,labels,createdAt,author) # Compute truncation warning BEFORE bot filtering. If we filter out bots # first, the count could drop below the limit and mask a real truncation. - # Caught by Copilot review on PR petry-projects/.github#85. + # Caught by Copilot review on PR combsmith/.github#85. local raw_open_count raw_open_count=$(printf '%s' "$open_issues_raw" | jq 'length') if [ "$raw_open_count" -ge "$issue_limit" ]; then diff --git a/.github/scripts/feature-ideation/discussion-mutations.sh b/.github/scripts/feature-ideation/discussion-mutations.sh index ae7a8dcb3..d0a7a6a28 100755 --- a/.github/scripts/feature-ideation/discussion-mutations.sh +++ b/.github/scripts/feature-ideation/discussion-mutations.sh @@ -156,7 +156,7 @@ GRAPHQL # GraphQL `labelIds: [ID!]!` requires a JSON array variable. `gh api`'s # `-f`/`-F` flags don't express GraphQL array variables, so build the # full request body as JSON and send it via stdin. Caught by Copilot - # review on PR petry-projects/.github#85: the previous version sent + # review on PR combsmith/.github#85: the previous version sent # labelIds as the literal string `["L_1"]`, which the API rejects. local body body=$(jq -nc --arg q "$query" --arg id "$discussion_id" --arg label "$label_id" \ diff --git a/.github/scripts/feature-ideation/lib/compose-signals.sh b/.github/scripts/feature-ideation/lib/compose-signals.sh index 1c699349b..e59228dde 100755 --- a/.github/scripts/feature-ideation/lib/compose-signals.sh +++ b/.github/scripts/feature-ideation/lib/compose-signals.sh @@ -16,7 +16,7 @@ # $5 merged_prs # $6 feature_requests # $7 bug_reports -# $8 repo (string, e.g. "petry-projects/talkterm") +# $8 repo (string, e.g. "combsmith/talkterm") # $9 scan_date (ISO-8601 string) # $10 schema_version (string) # $11 truncation_warnings (JSON array, may be []) @@ -51,7 +51,7 @@ compose_signals() { idx=$((idx + 1)) # Require a JSON array, not just valid JSON. Objects/strings/nulls accepted # by `jq -e .` would silently produce wrong counts (key count, char count). - # Caught by CodeRabbit review on PR petry-projects/.github#85. + # Caught by CodeRabbit review on PR combsmith/.github#85. if ! printf '%s' "$input" | jq -e 'type == "array"' >/dev/null 2>&1; then printf '[compose-signals] arg #%d must be a JSON array: %s\n' "$idx" "${input:0:120}" >&2 return 65 # EX_DATAERR diff --git a/.github/scripts/feature-ideation/lib/date-utils.sh b/.github/scripts/feature-ideation/lib/date-utils.sh index ae2722bd0..8a9cf8099 100755 --- a/.github/scripts/feature-ideation/lib/date-utils.sh +++ b/.github/scripts/feature-ideation/lib/date-utils.sh @@ -12,7 +12,7 @@ set -euo pipefail date_days_ago() { # Guard arg count before reading $1: under set -u a zero-arg call would abort # the shell with "unbound variable" instead of reaching the validation path. - # Caught by CodeRabbit review on PR petry-projects/.github#85. + # Caught by CodeRabbit review on PR combsmith/.github#85. if [ "$#" -ne 1 ]; then printf '[date-utils] expected 1 arg (days), got: %d\n' "$#" >&2 return 64 diff --git a/.github/scripts/feature-ideation/lib/filter-bots.sh b/.github/scripts/feature-ideation/lib/filter-bots.sh index f994e3e27..44b5fed6c 100755 --- a/.github/scripts/feature-ideation/lib/filter-bots.sh +++ b/.github/scripts/feature-ideation/lib/filter-bots.sh @@ -37,12 +37,12 @@ filter_bots_build_list() { if [ -n "${FEATURE_IDEATION_BOT_AUTHORS:-}" ]; then # Use `IFS=',' read` (not unquoted expansion) to avoid pathname-globbing # against the filesystem if any entry contains wildcard characters. - # Caught by CodeRabbit review on PR petry-projects/.github#85. + # Caught by CodeRabbit review on PR combsmith/.github#85. local extras=() IFS=',' read -r -a extras <<<"${FEATURE_IDEATION_BOT_AUTHORS}" # Trim leading/trailing whitespace from each comma-separated entry so # `"bot1, bot2"` resolves to `bot1` and `bot2`, not `bot1` and ` bot2`. - # Caught by CodeRabbit review on PR petry-projects/.github#85. + # Caught by CodeRabbit review on PR combsmith/.github#85. local trimmed=() local entry for entry in "${extras[@]}"; do diff --git a/.github/scripts/feature-ideation/lib/gh-safe.sh b/.github/scripts/feature-ideation/lib/gh-safe.sh index 8060c5c46..90e5ab08d 100755 --- a/.github/scripts/feature-ideation/lib/gh-safe.sh +++ b/.github/scripts/feature-ideation/lib/gh-safe.sh @@ -95,7 +95,7 @@ gh_safe_graphql() { if [ "${args[$i]}" = "--jq" ]; then # Guard bounds before dereferencing args[i+1]: under set -u an out-of- # bounds access aborts the shell. Caught by CodeRabbit review on PR - # petry-projects/.github#85. + # combsmith/.github#85. if [ $((i + 1)) -ge "${#args[@]}" ]; then _gh_safe_err "graphql-bad-args" "--jq requires a jq filter argument" return 64 @@ -158,7 +158,7 @@ gh_safe_graphql() { # NB: do NOT swallow jq errors with `|| true`. A typo or wrong path in # the filter must surface as a hard failure, not a silent empty result — # otherwise we re-introduce R1 in a different shape. Caught by Copilot - # review on PR petry-projects/.github#85. + # review on PR combsmith/.github#85. local filtered jq_rc jq_err jq_err=$(mktemp) set +e @@ -194,7 +194,7 @@ gh_safe_graphql() { gh_safe_graphql_input() { # Guard arg count before reading $1: under set -u a zero-arg call aborts the # shell instead of reaching the JSON validation. Caught by CodeRabbit review - # on PR petry-projects/.github#85. + # on PR combsmith/.github#85. if [ "$#" -ne 1 ]; then _gh_safe_err "graphql-bad-input" "expected 1 arg: JSON request body, got $#" return 64 diff --git a/.github/scripts/feature-ideation/lint-caller.sh b/.github/scripts/feature-ideation/lint-caller.sh index eab96c1fe..0b8bde1a7 100755 --- a/.github/scripts/feature-ideation/lint-caller.sh +++ b/.github/scripts/feature-ideation/lint-caller.sh @@ -9,7 +9,7 @@ # events, so a `with:` value that references `${{ inputs.* }}` fails the whole # run (zero jobs, "Invalid workflow file") when the workflow is also triggered # by an event that has no `inputs` — e.g. `discussion: created`. The job `if:` -# does NOT save you. This is petry-projects/.github#571. +# does NOT save you. This is combsmith/.github#571. # # The fix is to resolve dispatch inputs in an ordinary `prep` job (whose step # expressions run at job time and are skipped on `discussion`) and pass them to diff --git a/.github/scripts/feature-ideation/lint-prompt.sh b/.github/scripts/feature-ideation/lint-prompt.sh index a1d18b63c..2d22b24f9 100755 --- a/.github/scripts/feature-ideation/lint-prompt.sh +++ b/.github/scripts/feature-ideation/lint-prompt.sh @@ -39,7 +39,7 @@ def _strip_github_expressions(s: str) -> str: containing `}` inside string literals (e.g. format() calls) are fully consumed rather than prematurely terminated. This prevents false-positive shell-expansion matches on content that is actually inside a GH expression. - Caught by CodeRabbit review on PR petry-projects/.github#85. + Caught by CodeRabbit review on PR combsmith/.github#85. """ result: list[str] = [] i = 0 @@ -79,13 +79,13 @@ findings = [] # (which is evaluated before the prompt is rendered) and NOT \$ or $$ # escapes (which produce literal characters in the rendered prompt). # Both branches use the same lookbehind so escape handling is consistent. -# Caught by CodeRabbit review on PR petry-projects/.github#85. +# Caught by CodeRabbit review on PR combsmith/.github#85. shell_expansion = re.compile(r'(?` block scalar indicators plus YAML chomping modifiers # (`-` or `+`) so `prompt: |-`, `prompt: |+`, `prompt: >-`, `prompt: >+` -# are all recognised. Caught by CodeRabbit review on PR petry-projects/.github#85. +# are all recognised. Caught by CodeRabbit review on PR combsmith/.github#85. prompt_marker = re.compile(r'(?:direct_prompt|prompt):\s*[|>]?[-+]?\s*$') for lineno, raw in enumerate(lines, start=1): @@ -113,7 +113,7 @@ for lineno, raw in enumerate(lines, start=1): # contain `}` internally (e.g. format() calls or string literals) are # not fully removed and leave false-positive shell expansion matches. # Use a small stateful scanner instead. - # Caught by CodeRabbit review on PR petry-projects/.github#85. + # Caught by CodeRabbit review on PR combsmith/.github#85. no_gh = _strip_github_expressions(raw) for match in shell_expansion.finditer(no_gh): findings.append((lineno, match.group(0), raw.rstrip())) @@ -151,7 +151,7 @@ main() { fi # Capture the actual exit code so we preserve exit-2 (file error) over # exit-1 (lint finding). A later lint failure must not overwrite an earlier - # file error. Caught by CodeRabbit review on PR petry-projects/.github#85. + # file error. Caught by CodeRabbit review on PR combsmith/.github#85. if scan_file "$file"; then file_rc=0 else diff --git a/.github/scripts/feature-ideation/match-discussions.sh b/.github/scripts/feature-ideation/match-discussions.sh index c4af54665..8e3985cc7 100755 --- a/.github/scripts/feature-ideation/match-discussions.sh +++ b/.github/scripts/feature-ideation/match-discussions.sh @@ -34,7 +34,7 @@ set -euo pipefail # NB: matching logic is implemented entirely in the embedded Python block # below. Earlier drafts had standalone bash `normalize_title` / # `jaccard_similarity` helpers that were never called; removed per Copilot -# review on PR petry-projects/.github#85. +# review on PR combsmith/.github#85. match_discussions_main() { local signals_path="$1" @@ -43,7 +43,7 @@ match_discussions_main() { # Validate threshold is a parseable float in [0, 1] BEFORE handing it to # Python, so a typo doesn't surface as an opaque traceback. Caught by - # Copilot review on PR petry-projects/.github#85. + # Copilot review on PR combsmith/.github#85. if ! printf '%s' "$threshold" | grep -Eq '^[0-9]+(\.[0-9]+)?$'; then printf '[match-discussions] MATCH_THRESHOLD must be a non-negative number, got: %s\n' "$threshold" >&2 return 64 @@ -132,7 +132,7 @@ disc_norm = [ # Instead we enumerate all (proposal, discussion) pairs, sort by similarity # descending (ties broken by original proposal index for stability), then # assign greedily. This guarantees globally higher-value matches are honoured -# first. Caught by CodeRabbit review on PR petry-projects/.github#85. +# first. Caught by CodeRabbit review on PR combsmith/.github#85. # Collect valid proposals with their original index (for tie-breaking + new_candidates). proposals_indexed: list[tuple[int, dict]] = [] diff --git a/.github/scripts/feature-ideation/validate-signals.py b/.github/scripts/feature-ideation/validate-signals.py index 1536204e1..8fd062583 100755 --- a/.github/scripts/feature-ideation/validate-signals.py +++ b/.github/scripts/feature-ideation/validate-signals.py @@ -33,7 +33,7 @@ # default FormatChecker also does NOT include `date-time` — that requires the # optional `rfc3339-validator` dependency. Avoid pulling in extra deps by # registering the small inline validator below on a module-level checker. -# Caught by Copilot review on PR petry-projects/.github#85. +# Caught by Copilot review on PR combsmith/.github#85. FORMAT_CHECKER = FormatChecker() @@ -95,14 +95,14 @@ def main(argv: list[str]) -> int: signals = json.loads(signals_path.read_text(encoding="utf-8")) except OSError as exc: # File read errors (permissions, I/O) must also exit 2. Caught by - # CodeRabbit review on PR petry-projects/.github#85. + # CodeRabbit review on PR combsmith/.github#85. sys.stderr.write(f"[validate-signals] cannot read {signals_path}: {exc}\n") return 2 except json.JSONDecodeError as exc: # Per the docstring contract, exit 2 means usage / file error and # exit 1 means schema validation error. A malformed signals file # is a file/data error, not a schema violation. Caught by - # CodeRabbit review on PR petry-projects/.github#85. + # CodeRabbit review on PR combsmith/.github#85. sys.stderr.write(f"[validate-signals] invalid JSON in {signals_path}: {exc}\n") return 2 diff --git a/.github/scripts/pr-auto-review/sweep-dispatch.sh b/.github/scripts/pr-auto-review/sweep-dispatch.sh index ad9878996..7fbdf6c94 100644 --- a/.github/scripts/pr-auto-review/sweep-dispatch.sh +++ b/.github/scripts/pr-auto-review/sweep-dispatch.sh @@ -27,10 +27,10 @@ # # Env: # GH_TOKEN classic PAT with repo scope — API reads + dispatch (required) -# SEARCH_OWNER org to scan for open PRs (default: petry-projects) +# SEARCH_OWNER org to scan for open PRs (default: combsmith) # SWEEP_LABEL PR label to sweep (default: standards-sync) # MAX_PER_RUN max PRs to dispatch per run (default: 8) -# DISPATCH_REPO repository_dispatch target repo (default: petry-projects/.github-private) +# DISPATCH_REPO repository_dispatch target repo (default: combsmith/.github-private) # DRY_RUN "1" → log intended dispatches only # DISPATCH_RETRIES attempts per dispatch before giving up (default: 3) # DISPATCH_RETRY_SLEEP seconds between dispatch retries (default: 5) @@ -42,10 +42,10 @@ _dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" # shellcheck source=.github/scripts/pr-auto-review/lib/sweep.sh . "${_dir}/lib/sweep.sh" -SEARCH_OWNER="${SEARCH_OWNER:-petry-projects}" +SEARCH_OWNER="${SEARCH_OWNER:-combsmith}" SWEEP_LABEL="${SWEEP_LABEL:-standards-sync}" MAX_PER_RUN="${MAX_PER_RUN:-8}" -DISPATCH_REPO="${DISPATCH_REPO:-petry-projects/.github-private}" +DISPATCH_REPO="${DISPATCH_REPO:-combsmith/.github-private}" DRY_RUN="${DRY_RUN:-0}" DISPATCH_RETRIES="${DISPATCH_RETRIES:-3}" DISPATCH_RETRY_SLEEP="${DISPATCH_RETRY_SLEEP:-5}" diff --git a/.github/workflows/add-to-project-reconcile.yml b/.github/workflows/add-to-project-reconcile.yml index e6b33e836..2c7616bb4 100644 --- a/.github/workflows/add-to-project-reconcile.yml +++ b/.github/workflows/add-to-project-reconcile.yml @@ -1,4 +1,4 @@ -# Backlog reconcile for the Initiatives project (petry-projects/.github#518). +# Backlog reconcile for the Initiatives project (combsmith/.github#518). # # The event-driven add-to-project automation misses qualifying items created by # the default GITHUB_TOKEN (GitHub doesn't fire workflows from default-token @@ -8,13 +8,13 @@ # using the same gate + helpers as the event path — so missed items land # within one cycle. # -# Runs centrally in petry-projects/.github (the scripts live here); mints the +# Runs centrally in combsmith/.github (the scripts live here); mints the # petry-projects-planner App token for issues/PRs read + project write. # # Two phases run in order each cycle: # 1. reconcile — ensure every qualifying issue/PR/Idea is ON the board. # 2. classify — set the Initiative (+ Theme) field on board items that -# don't have one yet (petry-projects/.github#415). Classify runs AFTER +# don't have one yet (combsmith/.github#415). Classify runs AFTER # reconcile so items added this cycle are categorized in the same run. name: Add-to-Project Reconcile @@ -71,7 +71,7 @@ jobs: env: GH_TOKEN: ${{ steps.app-token.outputs.token }} PROJECT_ID: PVT_kwDOD2inqs4BZq3- - PROJECT_URL: https://github.com/orgs/petry-projects/projects/1 + PROJECT_URL: https://github.com/orgs/combsmith/projects/1 REQUIRED_LABEL: dev-lead EXCLUDED_LABELS: compliance-audit,health-check,fleet-tracker,daily-report RECON_REPOS: ${{ inputs.repos }} @@ -83,7 +83,7 @@ jobs: env: GH_TOKEN: ${{ steps.app-token.outputs.token }} PROJECT_ID: PVT_kwDOD2inqs4BZq3- - PROJECT_URL: https://github.com/orgs/petry-projects/projects/1 + PROJECT_URL: https://github.com/orgs/combsmith/projects/1 # Same dry-run gating as reconcile: manual runs default to dry-run, # scheduled runs are live. DRY_RUN: ${{ (github.event_name == 'workflow_dispatch' && inputs.dry_run) && '1' || '0' }} diff --git a/.github/workflows/add-to-project-reusable.yml b/.github/workflows/add-to-project-reusable.yml index 0dbd56acc..216f3fa2b 100644 --- a/.github/workflows/add-to-project-reusable.yml +++ b/.github/workflows/add-to-project-reusable.yml @@ -1,7 +1,7 @@ # Reusable auto-add-to-Initiatives-project workflow — single source of truth # for the org. Repo-level add-to-project.yml stubs call this so the # noise-gate / reconcile logic isn't duplicated per repo. -# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md # # What it does (driven by the caller's triggering event): # - issues → reconcile the issue with the project. Issues are UN-GATED: @@ -20,10 +20,10 @@ # App. Callers pass the App credentials with `secrets: inherit`: # INITIATIVES_APP_ID, INITIATIVES_APP_PRIVATE_KEY. # -# The scripts live in petry-projects/.github; this workflow checks them out +# The scripts live in combsmith/.github; this workflow checks them out # at `agent_ref` so logic AND code run at the one pinned channel version # (per the org reusable-workflow versioning standard). The reusable's own -# self-host caller (petry-projects/.github) passes its commit SHA so it +# self-host caller (combsmith/.github) passes its commit SHA so it # dogfoods the exact version under test (Ring 0). # # Security note (fork PRs): pull_request_target runs with the App secret in @@ -31,10 +31,10 @@ # (head.repo.fork == false) or PRs whose author is OWNER/MEMBER/COLLABORATOR. # A maintainer-labeled PR from an *external fork by an untrusted author* is # still skipped here (the gate can't safely evaluate the labeler in an `if:`); -# add such PRs from the Projects UI. Tracking: petry-projects/.github#415 §4. +# add such PRs from the Projects UI. Tracking: combsmith/.github#415 §4. # -# Tracking: petry-projects/.github#387 (pilot), #415 (multi-repo rollout) -# Discussion: petry-projects/.github#386 +# Tracking: combsmith/.github#387 (pilot), #415 (multi-repo rollout) +# Discussion: combsmith/.github#386 name: Auto-add to Initiatives project (Reusable) on: @@ -60,7 +60,7 @@ on: type: string default: "compliance-audit,health-check,fleet-tracker,daily-report" agent_ref: - description: "Ref of petry-projects/.github to check out the scripts from (pin to add-to-project/stable; self-host passes its SHA)" + description: "Ref of combsmith/.github to check out the scripts from (pin to add-to-project/stable; self-host passes its SHA)" required: false type: string default: "add-to-project/stable" @@ -92,7 +92,7 @@ jobs: - name: Checkout add-to-project scripts uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: petry-projects/.github + repository: combsmith/.github ref: ${{ inputs.agent_ref }} path: .add-to-project-src fetch-depth: 1 diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index a9a606f88..c5eaa2478 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/add-to-project.yml -# Standard: petry-projects/.github/standards/ci-standards.md -# Reusable: petry-projects/.github/.github/workflows/add-to-project-reusable.yml +# SOURCE OF TRUTH: combsmith/.github/standards/workflows/add-to-project.yml +# Standard: combsmith/.github/standards/ci-standards.md +# Reusable: combsmith/.github/.github/workflows/add-to-project-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All noise-gate / reconcile logic lives @@ -19,11 +19,11 @@ # ───────────────────────────────────────────────────────────────────────────── # # Tracks all issues (un-gated) and dev-lead-labeled PRs from -# petry-projects/.github on the org-level Initiatives project -# (https://github.com/orgs/petry-projects/projects/1). Ideas live in +# combsmith/.github on the org-level Initiatives project +# (https://github.com/orgs/combsmith/projects/1). Ideas live in # Discussions and are not tracked here (see standards/initiatives-project.md). # -# Tracking: petry-projects/.github#387, #415 +# Tracking: combsmith/.github#387, #415 name: Auto-add to Initiatives project on: @@ -50,7 +50,7 @@ jobs: uses: ./.github/workflows/add-to-project-reusable.yml # local ref — always current (self-host) with: project_id: PVT_kwDOD2inqs4BZq3- - project_url: https://github.com/orgs/petry-projects/projects/1 + project_url: https://github.com/orgs/combsmith/projects/1 agent_ref: ${{ github.sha }} # Pass only the secrets the reusable declares (least privilege; avoids # `secrets: inherit` handing the reusable every org secret). diff --git a/.github/workflows/agent-shield-reusable.yml b/.github/workflows/agent-shield-reusable.yml index 5843a115d..a8ed224cc 100644 --- a/.github/workflows/agent-shield-reusable.yml +++ b/.github/workflows/agent-shield-reusable.yml @@ -1,7 +1,7 @@ # Reusable AgentShield workflow — single source of truth for the org. # Repo-level agent-shield.yml files call this to avoid duplicating # the security scan and structural checks. -# Standard: https://github.com/petry-projects/.github/blob/main/standards/agent-standards.md +# Standard: https://github.com/combsmith/.github/blob/main/standards/agent-standards.md # # Two-layer approach: # 1. ecc-agentshield CLI — deep security scan (102 rules across secrets, @@ -37,7 +37,7 @@ on: description: "String AGENTS.md must reference (regex, basic grep -E)" required: false type: string - default: 'petry-projects/\.github' + default: 'combsmith/\.github' permissions: contents: read diff --git a/.github/workflows/agent-shield.yml b/.github/workflows/agent-shield.yml index 4ef04d1b4..b9f578e7d 100644 --- a/.github/workflows/agent-shield.yml +++ b/.github/workflows/agent-shield.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/agent-shield.yml -# Standard: petry-projects/.github/standards/agent-standards.md -# Reusable: petry-projects/.github/.github/workflows/agent-shield-reusable.yml +# SOURCE OF TRUTH: combsmith/.github/standards/workflows/agent-shield.yml +# Standard: combsmith/.github/standards/agent-standards.md +# Reusable: combsmith/.github/.github/workflows/agent-shield-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. The AgentShield CLI scan and the diff --git a/.github/workflows/apply-repo-settings-reusable.yml b/.github/workflows/apply-repo-settings-reusable.yml index fb23e9895..d1b9d4c98 100644 --- a/.github/workflows/apply-repo-settings-reusable.yml +++ b/.github/workflows/apply-repo-settings-reusable.yml @@ -1,8 +1,8 @@ # Reusable repo-settings + branch-policy self-heal — single source of truth for the org. # Repo-level apply-repo-settings.yml stubs call this so the compliance self-heal runs -# from ONE script/workflow pair instead of per-repo forks (petry-projects/.github#984). -# Standard: https://github.com/petry-projects/.github/blob/main/standards/github-settings.md -# https://github.com/petry-projects/.github/blob/main/standards/ruleset-remediation-runbook.md +# from ONE script/workflow pair instead of per-repo forks (combsmith/.github#984). +# Standard: https://github.com/combsmith/.github/blob/main/standards/github-settings.md +# https://github.com/combsmith/.github/blob/main/standards/ruleset-remediation-runbook.md # # Applies, to the CALLING repo: # - merge settings, security_and_analysis, CodeQL default setup, labels, and @@ -29,7 +29,7 @@ on: default: false checkout_ref: description: >- - Ref of petry-projects/.github to check out for the scripts, so the + Ref of combsmith/.github to check out for the scripts, so the logic runs at the same version as this reusable. Callers pin their ring's channel tag (mirrors dev-lead's agent_ref). Empty = default branch. type: string @@ -72,10 +72,10 @@ jobs: fi echo "GH_PAT_DON_PETRY present — proceeding." - - name: Checkout petry-projects/.github (scripts at the pinned channel) + - name: Checkout combsmith/.github (scripts at the pinned channel) uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: petry-projects/.github + repository: combsmith/.github ref: ${{ inputs.checkout_ref }} persist-credentials: false diff --git a/.github/workflows/apply-repo-settings-tests.yml b/.github/workflows/apply-repo-settings-tests.yml index 1629a08c4..c28a9461c 100644 --- a/.github/workflows/apply-repo-settings-tests.yml +++ b/.github/workflows/apply-repo-settings-tests.yml @@ -1,6 +1,6 @@ # Tests for the standard repo-settings applier (scripts/apply-repo-settings.sh). # Gates: shellcheck (applier) + bats (the persona :hands-off opt-out family, -# derived from the persona manifests — petry-projects/.github#756). +# derived from the persona manifests — combsmith/.github#756). name: Apply Repo Settings Tests on: diff --git a/.github/workflows/auto-rebase-reusable.yml b/.github/workflows/auto-rebase-reusable.yml index d938579fd..227928049 100644 --- a/.github/workflows/auto-rebase-reusable.yml +++ b/.github/workflows/auto-rebase-reusable.yml @@ -1,7 +1,7 @@ # Reusable auto-rebase workflow — single source of truth for the org. # Repo-level auto-rebase.yml files call this to avoid duplicating # the branch-update logic. -# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md # # Problem: when branch protection requires branches to be up-to-date # (strict status checks), merging any PR makes other open PRs fall behind. @@ -63,7 +63,7 @@ on: type: string tooling_ref: description: | - Ref of petry-projects/.github to source the auto-rebase scripts from. + Ref of combsmith/.github to source the auto-rebase scripts from. Leave empty (the default) to source them from THIS reusable's own commit (`github.job_workflow_sha`) — that guarantees the predicate in lib/eligibility.sh always matches the version of this workflow the @@ -94,7 +94,7 @@ jobs: - name: Checkout auto-rebase tooling uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: petry-projects/.github + repository: combsmith/.github # Source the scripts from this reusable's own commit so the predicate # always matches the pinned workflow version. `job_workflow_sha` is the # commit SHA of THIS reusable file for the run; `tooling_ref` overrides diff --git a/.github/workflows/auto-rebase.yml b/.github/workflows/auto-rebase.yml index 7df223694..4c49918a9 100644 --- a/.github/workflows/auto-rebase.yml +++ b/.github/workflows/auto-rebase.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/auto-rebase.yml -# Standard: petry-projects/.github/standards/ci-standards.md -# Reusable: petry-projects/.github/.github/workflows/auto-rebase-reusable.yml +# SOURCE OF TRUTH: combsmith/.github/standards/workflows/auto-rebase.yml +# Standard: combsmith/.github/standards/ci-standards.md +# Reusable: combsmith/.github/.github/workflows/auto-rebase-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All branch-update logic lives in the diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fbd18ec98..68fa9be52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ # CI pipeline for the .github standards repository. # Lints markdown, YAML, GitHub Actions, shell scripts, and runs AgentShield. -# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md name: CI on: diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 20b99935b..659ec23a1 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -1,6 +1,6 @@ # ───────────────────────────────────────────────────────────────────────────── -# 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 +# SOURCE OF TRUTH: combsmith/.github/standards/workflows/copilot-setup-steps.yml +# Standard: combsmith/.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. @@ -41,7 +41,7 @@ # • 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. +# combsmith/.github and propagate to the fleet. # ───────────────────────────────────────────────────────────────────────────── name: "Copilot Setup Steps" @@ -110,7 +110,7 @@ jobs: # missing so the problem is caught here rather than mid-agent-session. - name: Verify environment run: | - echo "=== petry-projects Copilot cloud agent environment ===" + echo "=== combsmith Copilot cloud agent environment ===" echo "Repository : ${GITHUB_REPOSITORY}" echo "Ref : ${GITHUB_REF}" echo "Runner : ${RUNNER_OS} / ${RUNNER_ARCH}" diff --git a/.github/workflows/dependabot-automerge-reusable.yml b/.github/workflows/dependabot-automerge-reusable.yml index 3756fbcd4..0101e7fa0 100644 --- a/.github/workflows/dependabot-automerge-reusable.yml +++ b/.github/workflows/dependabot-automerge-reusable.yml @@ -1,7 +1,7 @@ # Reusable Dependabot auto-merge workflow — single source of truth for the org. # Repo-level dependabot-automerge.yml files call this to avoid duplicating # eligibility logic and the GitHub App token dance. -# Standard: https://github.com/petry-projects/.github/blob/main/standards/dependabot-policy.md +# Standard: https://github.com/combsmith/.github/blob/main/standards/dependabot-policy.md # # Auto-approves and enables auto-merge for Dependabot PRs that are: # - GitHub Actions updates (any version bump, including major) diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml index ebbd82d24..c27120e89 100644 --- a/.github/workflows/dependabot-automerge.yml +++ b/.github/workflows/dependabot-automerge.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dependabot-automerge.yml -# Standard: petry-projects/.github/standards/dependabot-policy.md -# Reusable: petry-projects/.github/.github/workflows/dependabot-automerge-reusable.yml +# SOURCE OF TRUTH: combsmith/.github/standards/workflows/dependabot-automerge.yml +# Standard: combsmith/.github/standards/dependabot-policy.md +# Reusable: combsmith/.github/.github/workflows/dependabot-automerge-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All eligibility logic and the GitHub diff --git a/.github/workflows/dependabot-rebase-reusable.yml b/.github/workflows/dependabot-rebase-reusable.yml index c3f891835..e3e378756 100644 --- a/.github/workflows/dependabot-rebase-reusable.yml +++ b/.github/workflows/dependabot-rebase-reusable.yml @@ -1,7 +1,7 @@ # Reusable Dependabot update-and-merge workflow — single source of truth for the org. # Repo-level dependabot-rebase.yml files call this to avoid duplicating # the rebase/merge serialization logic. -# Standard: https://github.com/petry-projects/.github/blob/main/standards/dependabot-policy.md +# Standard: https://github.com/combsmith/.github/blob/main/standards/dependabot-policy.md # # Problem: when branch protection requires branches to be up-to-date # (strict status checks), merging one Dependabot PR makes the others fall diff --git a/.github/workflows/dependabot-rebase.yml b/.github/workflows/dependabot-rebase.yml index 62acb4c9d..1e4c2f962 100644 --- a/.github/workflows/dependabot-rebase.yml +++ b/.github/workflows/dependabot-rebase.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dependabot-rebase.yml -# Standard: petry-projects/.github/standards/dependabot-policy.md -# Reusable: petry-projects/.github/.github/workflows/dependabot-rebase-reusable.yml +# SOURCE OF TRUTH: combsmith/.github/standards/workflows/dependabot-rebase.yml +# Standard: combsmith/.github/standards/dependabot-policy.md +# Reusable: combsmith/.github/.github/workflows/dependabot-rebase-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All rebase/merge serialization logic @@ -25,7 +25,7 @@ # To adopt: copy standards/workflows/dependabot-rebase.yml (NOT this file) to # .github/workflows/dependabot-rebase.yml in your repo. This file uses a # local ref (`./.github/workflows/dependabot-rebase-reusable.yml`) that is -# only valid in the petry-projects/.github source-of-truth repo. +# only valid in the combsmith/.github source-of-truth repo. # Required org/repo secrets (inherited): # APP_ID — GitHub App ID with contents:write and pull-requests:write # APP_PRIVATE_KEY — GitHub App private key diff --git a/.github/workflows/dependency-audit-reusable.yml b/.github/workflows/dependency-audit-reusable.yml index c728ccc19..339dceece 100644 --- a/.github/workflows/dependency-audit-reusable.yml +++ b/.github/workflows/dependency-audit-reusable.yml @@ -1,7 +1,7 @@ # Reusable dependency vulnerability audit — single source of truth for the org. # Repo-level dependency-audit.yml files call this to avoid duplicating the # multi-ecosystem detection and audit logic. -# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md#5-dependency-audit-dependency-auditym +# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md#5-dependency-audit-dependency-auditym # # Auto-detects ecosystems present in the repository and runs the appropriate # audit tool. Fails the build if any dependency has a known security advisory. diff --git a/.github/workflows/dependency-audit.yml b/.github/workflows/dependency-audit.yml index 1a51f613e..981d37b96 100644 --- a/.github/workflows/dependency-audit.yml +++ b/.github/workflows/dependency-audit.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dependency-audit.yml -# Standard: petry-projects/.github/standards/ci-standards.md#7-dependency-audit-dependency-audityml -# Reusable: petry-projects/.github/.github/workflows/dependency-audit-reusable.yml +# SOURCE OF TRUTH: combsmith/.github/standards/workflows/dependency-audit.yml +# Standard: combsmith/.github/standards/ci-standards.md#7-dependency-audit-dependency-audityml +# Reusable: combsmith/.github/.github/workflows/dependency-audit-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All ecosystem-detection and audit logic diff --git a/.github/workflows/dev-lead.yml b/.github/workflows/dev-lead.yml index d9ab5b0c3..2c656fe83 100644 --- a/.github/workflows/dev-lead.yml +++ b/.github/workflows/dev-lead.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── # Dev-Lead Agent — thin caller stub -# Standard: petry-projects/.github/standards/ci-standards.md#5-dev-lead-agent -# Reusable: petry-projects/.github-private/.github/workflows/dev-lead-reusable.yml +# Standard: combsmith/.github/standards/ci-standards.md#5-dev-lead-agent +# Reusable: combsmith/.github-private/.github/workflows/dev-lead-reusable.yml # # ADOPTING THIS WORKFLOW: # 1. Copy this file verbatim to .github/workflows/dev-lead.yml in your repo. @@ -39,11 +39,11 @@ permissions: {} # Concurrency is centralised in the reusable workflow (dev-lead-reusable.yml) with # per-issue / per-PR lanes, so issue pickups are never cancelled by PR follow-up -# traffic and the grouping can't drift per-repo. See petry-projects/.github#402. +# traffic and the grouping can't drift per-repo. See combsmith/.github#402. jobs: dev-lead: - uses: petry-projects/.github-private/.github/workflows/dev-lead-reusable.yml@dev-lead/v139-ring0 # NOSONAR(githubactions:S7637) first-party channel ref + uses: combsmith/.github-private/.github/workflows/dev-lead-reusable.yml@dev-lead/v139-ring0 # NOSONAR(githubactions:S7637) first-party channel ref with: agent_ref: dev-lead/v139-ring0 secrets: inherit # NOSONAR(githubactions:S7635) first-party trusted reusable diff --git a/.github/workflows/dismiss-stale-bot-reviews.yml b/.github/workflows/dismiss-stale-bot-reviews.yml index 8672b10bd..70eef9a8c 100644 --- a/.github/workflows/dismiss-stale-bot-reviews.yml +++ b/.github/workflows/dismiss-stale-bot-reviews.yml @@ -1,8 +1,8 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dismiss-stale-bot-reviews.yml -# Standard: petry-projects/.github/standards/ci-standards.md -# Decision core: petry-projects/.github/scripts/lib/dismiss-stale-bot-reviews.sh -# petry-projects/.github/scripts/dismiss-stale-bot-reviews.sh +# SOURCE OF TRUTH: combsmith/.github/standards/workflows/dismiss-stale-bot-reviews.yml +# Standard: combsmith/.github/standards/ci-standards.md +# Decision core: combsmith/.github/scripts/lib/dismiss-stale-bot-reviews.sh +# combsmith/.github/scripts/dismiss-stale-bot-reviews.sh # # AGENTS — READ BEFORE EDITING: # • This file is a SELF-CONTAINED verbatim stub (the initiative-driver class), @@ -12,8 +12,8 @@ # forever (#617 blocker 3). This workflow dismisses such reviews once a NEWER # commit has been pushed. # • All dismiss/keep decision logic lives in the decision core above, which is -# unit-tested by bats in petry-projects/.github. This stub fetches that core -# from petry-projects/.github@v1 at runtime and runs it — the same runtime +# unit-tested by bats in combsmith/.github. This stub fetches that core +# from combsmith/.github@v1 at runtime and runs it — the same runtime # tooling-checkout pattern initiative-driver uses for the rate-limit gate. # • You MUST NOT change: the trigger event types (synchronize + submitted), the # fork guard, or the job-level `permissions:` block (pull-requests: write is @@ -22,7 +22,7 @@ # allow-list, set the DSBR_BOT_ALLOWLIST repo/org variable (comma-separated # logins) — it REPLACES the default list. Do not fork the decision logic here. # • If you need different behaviour, open a PR against the decision core in -# petry-projects/.github — the change propagates everywhere on next run. +# combsmith/.github — the change propagates everywhere on next run. # ───────────────────────────────────────────────────────────────────────────── # # Dismiss stale bot reviews — self-contained org-standard workflow. @@ -59,16 +59,16 @@ jobs: pull-requests: write # dismissPullRequestReview via GITHUB_TOKEN contents: read # checkout steps: - - name: Checkout decision-core tooling from petry-projects/.github - # The decision core lives in petry-projects/.github; a consumer repo does + - name: Checkout decision-core tooling from combsmith/.github + # The decision core lives in combsmith/.github; a consumer repo does # not carry it, so fetch it read-only at the pinned v1 tag into a scratch - # path. petry-projects/.github is public, so GITHUB_TOKEN suffices. + # path. combsmith/.github is public, so GITHUB_TOKEN suffices. # continue-on-error: a tooling-checkout outage must never fail the PR — the # run step then finds no script and no-ops (fail-closed: nothing dismissed). continue-on-error: true uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: petry-projects/.github + repository: combsmith/.github ref: v1 path: .dsbr-tooling fetch-depth: 1 diff --git a/.github/workflows/duplicate-decl-gate.yml b/.github/workflows/duplicate-decl-gate.yml index 29a015a1d..7f06fa35e 100644 --- a/.github/workflows/duplicate-decl-gate.yml +++ b/.github/workflows/duplicate-decl-gate.yml @@ -1,7 +1,7 @@ name: duplicate-decl-gate # Required CI gate against the #1485 corruption class, ported from -# petry-projects/.github-private (#1520) into this repo (#1025). Fails any PR (or +# combsmith/.github-private (#1520) into this repo (#1025). Fails any PR (or # main push) whose tree contains a top-level declaration declared more than once # — a duplicate top-level function in a shell file, a duplicate top-level # (H1/H2) heading in a markdown file, or a duplicate object key / unparseable @@ -17,7 +17,7 @@ name: duplicate-decl-gate # Maintainer action after this lands: the `duplicate-decl-gate` required status # check is codified in standards/rulesets/duplicate-decl-gate.json — apply it to # the reusable-hosting meta-repos: -# GH_TOKEN= bash scripts/apply-rulesets.sh --repo petry-projects/.github duplicate-decl-gate +# GH_TOKEN= bash scripts/apply-rulesets.sh --repo combsmith/.github duplicate-decl-gate on: pull_request: diff --git a/.github/workflows/feature-ideation-reusable.yml b/.github/workflows/feature-ideation-reusable.yml index 5249091ec..e9a4f57f1 100644 --- a/.github/workflows/feature-ideation-reusable.yml +++ b/.github/workflows/feature-ideation-reusable.yml @@ -26,7 +26,7 @@ # - The two critical gotchas (github_token override, the `model` input) # are baked in here so callers cannot accidentally regress them. # -# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md#8-feature-ideation-feature-ideationyml--bmad-method-repos +# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md#8-feature-ideation-feature-ideationyml--bmad-method-repos name: Feature Ideation (Reusable) on: @@ -91,7 +91,7 @@ on: type: boolean tooling_ref: description: | - Ref of petry-projects/.github to source the feature-ideation scripts from. + Ref of combsmith/.github to source the feature-ideation scripts from. Defaults to `v1` to align with the @v1 pin convention used by caller stubs (see standards/ci-standards.md tier model). When the v1 tag is moved forward to a new release, callers automatically pick up the matching @@ -107,7 +107,7 @@ on: description: | Path (relative to repo root) of the repo-local reputable source list. Defaults to .github/feature-ideation-sources.md. Copy - standards/feature-ideation-sources.md from petry-projects/.github as + standards/feature-ideation-sources.md from combsmith/.github as a starting point and customise it for your project. If the file is absent Mary falls back to open web search automatically. required: false @@ -145,7 +145,7 @@ jobs: - name: Checkout feature-ideation tooling uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: petry-projects/.github + repository: combsmith/.github ref: ${{ inputs.tooling_ref }} path: .feature-ideation-tooling fetch-depth: 1 @@ -197,7 +197,7 @@ jobs: - name: Checkout feature-ideation tooling uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: petry-projects/.github + repository: combsmith/.github ref: ${{ inputs.tooling_ref }} path: .feature-ideation-tooling fetch-depth: 1 diff --git a/.github/workflows/feature-ideation.yml b/.github/workflows/feature-ideation.yml index 302be2dbd..9853e1dfa 100644 --- a/.github/workflows/feature-ideation.yml +++ b/.github/workflows/feature-ideation.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/feature-ideation.yml -# Standard: petry-projects/.github/standards/ci-standards.md#8-feature-ideation-feature-ideationyml--bmad-method-repos -# Reusable: petry-projects/.github/.github/workflows/feature-ideation-reusable.yml +# SOURCE OF TRUTH: combsmith/.github/standards/workflows/feature-ideation.yml +# Standard: combsmith/.github/standards/ci-standards.md#8-feature-ideation-feature-ideationyml--bmad-method-repos +# Reusable: combsmith/.github/.github/workflows/feature-ideation-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. The 5-phase ideation pipeline, the @@ -19,7 +19,7 @@ # Feature Ideation workflow stub — for BMAD Method-enabled repos. # # This is a thin caller for the org-wide reusable workflow at -# petry-projects/.github/.github/workflows/feature-ideation-reusable.yml +# combsmith/.github/.github/workflows/feature-ideation-reusable.yml # All ideation logic, the multi-skill pipeline, the Opus 4.6 model # selection, and the github_token override live in the reusable workflow. # @@ -29,7 +29,7 @@ # of your project, its target users, and the competitive landscape Mary # should research. This is the only required customisation. # 3. (Optional) Copy standards/feature-ideation-sources.md from -# petry-projects/.github to .github/feature-ideation-sources.md in your +# combsmith/.github to .github/feature-ideation-sources.md in your # repo and trim/extend it for your project. Mary uses YOUR copy — not the # central template — so each repo controls its own source list. # Pass `sources_file: path/to/your-list.md` to the reusable workflow if @@ -38,7 +38,7 @@ # 5. Ensure GitHub Discussions is enabled with an "Ideas" category. # 6. Confirm the org-level secret CLAUDE_CODE_OAUTH_TOKEN is accessible. # -# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md#8-feature-ideation-feature-ideationyml--bmad-method-repos +# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md#8-feature-ideation-feature-ideationyml--bmad-method-repos name: Feature Research & Ideation (BMAD Analyst) on: @@ -182,7 +182,7 @@ jobs: discussions: write id-token: write actions: read - uses: petry-projects/.github/.github/workflows/feature-ideation-reusable.yml@feature-ideation/v1-ring0 # NOSONAR(githubactions:S7637) first-party channel ref + uses: combsmith/.github/.github/workflows/feature-ideation-reusable.yml@feature-ideation/v1-ring0 # NOSONAR(githubactions:S7637) first-party channel ref with: # All values below come from `needs.prep.outputs.*` (resolved in the `prep` # job) — NOT the `inputs` context — so this reusable `with:` compiles on the @@ -191,8 +191,8 @@ jobs: # `discussion: created`; empty on schedule/dispatch → normal scan. target_discussion: ${{ needs.prep.outputs.target_discussion }} project_context: | - petry-projects/.github is the org-level standards and tooling repository - for the petry-projects GitHub organisation. It owns the canonical CI/CD + combsmith/.github is the org-level standards and tooling repository + for the combsmith GitHub organisation. It owns the canonical CI/CD standards (ci-standards.md), all reusable GitHub Actions workflows (claude-code, feature-ideation, agent-shield, dependabot), the BMAD Method agentic development framework, and org-wide security and diff --git a/.github/workflows/idea-enhancer-reusable.yml b/.github/workflows/idea-enhancer-reusable.yml index e7a40c7de..6ca7c0ac9 100644 --- a/.github/workflows/idea-enhancer-reusable.yml +++ b/.github/workflows/idea-enhancer-reusable.yml @@ -1,10 +1,10 @@ # Reusable Idea Enhancer — fleet dispatch workflow. # Single source of truth for the org: the dispatch logic lives here. Repo-level # idea-enhancer.yml files are thin caller stubs. -# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md # # When a human opens a new Ideas Discussion (or on a weekly safety-net sweep), it -# re-dispatches the CENTRAL idea-enhancer in petry-projects/.github-private with +# re-dispatches the CENTRAL idea-enhancer in combsmith/.github-private with # the CALLER repo as `target_repo`. The analyst enriches THIS repo's open, # human-authored, not-yet-enhanced Ideas Discussions (one comment each: sharpened # problem/goal, repo + market context, impact/effort, suggested acceptance @@ -27,7 +27,7 @@ on: central_repo: description: "owner/repo hosting the central idea-enhancer.yml workflow." required: false - default: "petry-projects/.github-private" + default: "combsmith/.github-private" type: string secrets: GH_PAT_DON_PETRY: diff --git a/.github/workflows/idea-triage-reusable.yml b/.github/workflows/idea-triage-reusable.yml index 785154b8b..896511a52 100644 --- a/.github/workflows/idea-triage-reusable.yml +++ b/.github/workflows/idea-triage-reusable.yml @@ -1,10 +1,10 @@ # Reusable Idea Triage — fleet dispatch workflow. # Single source of truth for the org: the dispatch logic lives here. Repo-level # idea-triage.yml files are thin caller stubs. -# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md # # Weekly (and on demand) it re-dispatches the CENTRAL idea-triage workflow in -# petry-projects/.github-private with the CALLER repo as `target_repo`, so the +# combsmith/.github-private with the CALLER repo as `target_repo`, so the # BMAD analyst scores THIS repo's Ideas backlog and refreshes THIS repo's "Idea # Promotion Queue" tracking issue. The triage tooling and vendored personas stay # vendored once, centrally — fleet repos only ship this thin trigger. @@ -24,7 +24,7 @@ on: central_repo: description: "owner/repo hosting the central idea-triage.yml workflow." required: false - default: "petry-projects/.github-private" + default: "combsmith/.github-private" type: string secrets: GH_PAT_DON_PETRY: diff --git a/.github/workflows/initiative-driver.yml b/.github/workflows/initiative-driver.yml index f8a7098ae..3b7b158d3 100644 --- a/.github/workflows/initiative-driver.yml +++ b/.github/workflows/initiative-driver.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/initiative-driver.yml -# Standard: petry-projects/.github/standards/ci-standards.md -# Central driver: petry-projects/.github-private/.github/workflows/initiative-driver.yml +# SOURCE OF TRUTH: combsmith/.github/standards/workflows/initiative-driver.yml +# Standard: combsmith/.github/standards/ci-standards.md +# Central driver: combsmith/.github-private/.github/workflows/initiative-driver.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All dependency-aware release logic (the @@ -12,23 +12,23 @@ # is pure-bash (no claude-code-action), so this stub dispatches the central # workflow_dispatch DIRECTLY with `gh workflow run`. No LLM runs here. # • You MUST NOT change: the dispatch target -# (-R petry-projects/.github-private -f target_repo=), +# (-R combsmith/.github-private -f target_repo=), # the `initiative:auto` label filter, or the PAT guard. # • If you need different release behaviour, open a PR against the central -# driver in petry-projects/.github-private — never by editing callers. +# driver in combsmith/.github-private — never by editing callers. # ───────────────────────────────────────────────────────────────────────────── # # Initiative Driver — per-repo dispatcher, thin caller for the central driver. # # On this repo's issues:[closed, labeled] (plus a safety-net off-peak schedule), # this stub dispatches the CENTRAL initiative-driver in -# petry-projects/.github-private with target_repo=. The central +# combsmith/.github-private with target_repo=. The central # driver then sweeps this repo's `initiative:auto` epics and releases their ready # sub-issues to dev-lead — so the central driver does not have to watch every # enrolled repo's events. # # Rate-limit gate (#640): before dispatching, this stub asks the source-side -# agent-rate-limit gate (petry-projects/.github/scripts/agent-rate-limit-gate.sh) +# agent-rate-limit gate (combsmith/.github/scripts/agent-rate-limit-gate.sh) # whether `initiative-driver` may dispatch right now. initiative-driver is the # canary that ENFORCES: the gate derives concurrency / cooldown / daily-budget / # consecutive-failure counters from this stub's own run history (no state @@ -38,7 +38,7 @@ # cancels a superseded run before any step (gate included) executes (#443/#402). # A `defer` simply skips the dispatch step — never a cancel, never a job failure. # -# Gate tooling is fetched at a pinned commit SHA of petry-projects/.github (not +# Gate tooling is fetched at a pinned commit SHA of combsmith/.github (not # a moving tag — the PAT is handed to that code). If the tooling is unavailable # or the gate errors, the gate step FAILS LOUDLY (::error:: annotation + step # summary, step marked failed) but the dispatch still runs (fail-open — an @@ -49,12 +49,12 @@ # 2. Ensure the `initiative:auto` label exists on the repo. # 3. Confirm the org-level secret GH_PAT_DON_PETRY (or the legacy fallback # GH_PAT_WORKFLOWS) is accessible **and its owner has write access to -# petry-projects/.github-private** (to dispatch the central workflow) **and +# combsmith/.github-private** (to dispatch the central workflow) **and # to this repo** (the central driver applies the `dev-lead` label # cross-repo with that PAT; a label applied with GITHUB_TOKEN would not # trigger dev-lead). # -# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md name: Initiative Driver — Dispatch Central on: @@ -100,7 +100,7 @@ jobs: - name: Checkout agent-rate-limit gate tooling # Phase-4 wiring (#640): the gate library + orchestrator live in - # petry-projects/.github; an enrolled caller stub does not carry them, so + # combsmith/.github; an enrolled caller stub does not carry them, so # fetch them read-only into a scratch path. Uses the same PAT as the # dispatch — the workflow's GITHUB_TOKEN cannot read another repo — so the # stub's `permissions:` block is unchanged. @@ -108,14 +108,14 @@ jobs: # the gate step then finds no script, reports an ::error:: (fail loudly), # emits no decision, and the dispatch step's `!= 'defer'` guard falls # through to dispatching (fail-open). - # ref: pinned to an immutable commit SHA of petry-projects/.github (#1232) + # ref: pinned to an immutable commit SHA of combsmith/.github (#1232) # — a moving tag silently lagged the gate script (v1 predates it) and # would hand the PAT to whatever the tag next points at. Bump it in a # reviewed PR (see standards/agent-rate-limits.md §3.1). continue-on-error: true uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: petry-projects/.github + repository: combsmith/.github ref: cd0b16751454d2eb3486ec04477d7ee9cc96c425 # main @ 2026-10-02 (#1232) path: .arl-gate-tooling fetch-depth: 1 @@ -178,5 +178,5 @@ jobs: TARGET_REPO: ${{ github.repository }} run: | gh workflow run initiative-driver.yml \ - -R petry-projects/.github-private \ + -R combsmith/.github-private \ -f target_repo="${TARGET_REPO}" diff --git a/.github/workflows/initiative-planner-reusable.yml b/.github/workflows/initiative-planner-reusable.yml index 43ffa9134..109c6d454 100644 --- a/.github/workflows/initiative-planner-reusable.yml +++ b/.github/workflows/initiative-planner-reusable.yml @@ -1,11 +1,11 @@ # Reusable Initiative Planner — Approval Trigger workflow. # Single source of truth for the org: all idea→initiative dispatch logic lives # here. Repo-level initiative-planner.yml files are thin caller stubs. -# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md # # Fires when a maintainer adds the `idea:approved` label to an Ideas Discussion # in a fleet repo. It does NOT plan inline — the BMAD Scrum Master (Bob) and the -# vendored BMAD frameworks live centrally in petry-projects/.github-private, and +# vendored BMAD frameworks live centrally in combsmith/.github-private, and # claude-code-action aborts on `discussion` event contexts ("Unsupported event # type: discussion"). So this reusable resolves the discussion number and # re-dispatches the CENTRAL initiative-planner via workflow_dispatch, passing the @@ -17,7 +17,7 @@ # GitHub does not start new workflow runs from a workflow_dispatch fired with # the default GITHUB_TOKEN (loop prevention). The dispatch MUST use a PAT with # workflow scope (GH_PAT_WORKFLOWS), the same constraint documented in -# petry-projects/.github-private scripts/initiative-planner/redispatch.sh. +# combsmith/.github-private scripts/initiative-planner/redispatch.sh. # # Requires: # GH_PAT_WORKFLOWS — org secret, classic PAT (repo + workflow scope) used to @@ -30,7 +30,7 @@ on: planner_repo: description: "owner/repo hosting the central initiative-planner.yml workflow." required: false - default: "petry-projects/.github-private" + default: "combsmith/.github-private" type: string secrets: GH_PAT_DON_PETRY: diff --git a/.github/workflows/initiative-planner.yml b/.github/workflows/initiative-planner.yml index 39a788cd4..16b44bf65 100644 --- a/.github/workflows/initiative-planner.yml +++ b/.github/workflows/initiative-planner.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/initiative-planner.yml -# Standard: petry-projects/.github/standards/ci-standards.md -# Reusable: petry-projects/.github/.github/workflows/initiative-planner-reusable.yml +# SOURCE OF TRUTH: combsmith/.github/standards/workflows/initiative-planner.yml +# Standard: combsmith/.github/standards/ci-standards.md +# Reusable: combsmith/.github/.github/workflows/initiative-planner-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All idea→initiative dispatch logic (the @@ -21,7 +21,7 @@ # # When a maintainer adds `idea:approved` to an Ideas Discussion in this repo, # the reusable re-dispatches the CENTRAL initiative-planner (BMAD Scrum Master -# "Bob") in petry-projects/.github-private with this repo as the target. Bob +# "Bob") in combsmith/.github-private with this repo as the target. Bob # reads this repo's Discussion and materializes an inert epic + sub-issue DAG # here (labelled `initiative`, NOT `initiative:auto`). A maintainer then adds # `initiative:auto` to the epic to hand it to initiative-driver. The frameworks @@ -33,7 +33,7 @@ # 3. Ensure the `idea:approved` label exists on the repo. # 4. Confirm the org-level secret GH_PAT_WORKFLOWS is accessible. # -# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md name: Initiative Planner — Approval Trigger on: @@ -44,7 +44,7 @@ permissions: {} jobs: initiative-planner: - # Self-host: petry-projects/.github HOSTS the reusable, so this in-repo copy + # Self-host: combsmith/.github HOSTS the reusable, so this in-repo copy # uses a LOCAL ref (always current) — not the `@initiative-planner/v1-stable` # remote channel that CONSUMER repos pin (see standards/workflows/initiative-planner.yml). # Mirrors add-to-project.yml / pr-review-mention.yml; local refs also avoid the diff --git a/.github/workflows/migration-tooling-tests.yml b/.github/workflows/migration-tooling-tests.yml index f31b2ba42..66f026ab9 100644 --- a/.github/workflows/migration-tooling-tests.yml +++ b/.github/workflows/migration-tooling-tests.yml @@ -11,7 +11,7 @@ # bare-tier retirement path # # Standard: the migration helper is DRY_RUN-aware and mutates only through the gh -# Git-refs API (never a direct push). See petry-projects/.github#698. +# Git-refs API (never a direct push). See combsmith/.github#698. name: Migration Tooling Tests diff --git a/.github/workflows/org-scorecard.yml b/.github/workflows/org-scorecard.yml index 87d92592a..6a1740cbd 100644 --- a/.github/workflows/org-scorecard.yml +++ b/.github/workflows/org-scorecard.yml @@ -1,6 +1,6 @@ # OpenSSF Scorecard security posture review for all public repos. # Creates/updates/closes GitHub Issues for findings across the org. -# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md#openssf-scorecard-org-scorecardyml +# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md#openssf-scorecard-org-scorecardyml name: Org Scorecard Review # readme-report: Weekly OpenSSF Scorecard security-posture review across public repos; findings tracked as issues. @@ -34,7 +34,7 @@ jobs: run: | set -euo pipefail - ORG="petry-projects" + ORG="combsmith" SKIP_CHECKS="CII-Best-Practices,Contributors,Fuzzing,Maintained,Packaging,Signed-Releases" RESULTS_DIR=$(mktemp -d) SUMMARY_FILE="$RESULTS_DIR/summary.md" diff --git a/.github/workflows/persona-mention-reusable.yml b/.github/workflows/persona-mention-reusable.yml index 177a8d76b..1737993d7 100644 --- a/.github/workflows/persona-mention-reusable.yml +++ b/.github/workflows/persona-mention-reusable.yml @@ -1,8 +1,8 @@ # Reusable Persona Mention Router. -# SOURCE OF TRUTH: petry-projects/.github/.github/workflows/persona-mention-reusable.yml -# Standard: https://github.com/petry-projects/.github/blob/main/standards/persona-standards.md (§4.1) +# SOURCE OF TRUTH: combsmith/.github/.github/workflows/persona-mention-reusable.yml +# Standard: https://github.com/combsmith/.github/blob/main/standards/persona-standards.md (§4.1) # -# Routes `@petry-projects/` mentions to the addressed persona. ONE router +# Routes `@combsmith/` mentions to the addressed persona. ONE router # for every persona — personas do NOT each ship a mention workflow (§4.1); that # per-agent drift is exactly what the manifest exists to prevent. # @@ -20,10 +20,10 @@ # # How a mention resolves, and why there is no index: # `validate-personas.py` enforces address.handle's slug == id == the persona's -# directory name, so '@petry-projects/qa-lead' resolves to +# directory name, so '@combsmith/qa-lead' resolves to # personas/qa-lead/persona.yml in .github-private by convention. The manifest # IS the index-of-record (§1.1). A 404 means "not a persona" — which is also -# how a real, non-persona team like @petry-projects/org-leads falls through +# how a real, non-persona team like @combsmith/org-leads falls through # harmlessly. # # The manifest, not this file, decides: @@ -52,7 +52,7 @@ on: inputs: tooling_ref: description: | - Ref of petry-projects/.github to source scripts/lib/persona-mention.sh + Ref of combsmith/.github to source scripts/lib/persona-mention.sh from. Leave empty (the default) to source it from THIS reusable's own commit (`github.job_workflow_sha`), which guarantees the routing logic always matches the version of this workflow the caller pinned, with no @@ -64,7 +64,7 @@ on: type: string persona_ref: description: | - Ref of petry-projects/.github-private to read persona manifests at. + Ref of combsmith/.github-private to read persona manifests at. Defaults to main — a persona's live contract is what is merged, not what a branch proposes. Override only for end-to-end testing. required: false @@ -113,7 +113,7 @@ jobs: # it in its own manifest (enforced below), never loosen it — so this gate is # always at least as strict as the union of what the personas allow. if: | - contains(github.event.comment.body, '@petry-projects/') && + contains(github.event.comment.body, '@combsmith/') && github.event.comment.user.login != 'donpetry-bot' && github.event.comment.user.login != 'github-actions[bot]' && !contains(github.event.comment.body, ' escalation is absent (retired)" { # AC4 retires the redundant stuck-comment escalation as dead code. The primary - # retirement lives in petry-projects/.github-private#711; this guard ensures the + # retirement lives in combsmith/.github-private#711; this guard ensures the # weaker sentinel is never (re)introduced into this repo's auto-rebase reusable. run grep -F 'auto-rebase-stuck' "$REUSABLE" [ "$status" -eq 1 ] diff --git a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats index 29d1af2f7..ed49d4dea 100644 --- a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats +++ b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats @@ -49,7 +49,7 @@ STUB teardown() { rm -rf "${TT_TMP:-/nonexistent}"; } @test "dismisses ONLY the stale allow-listed bot review; leaves head/human/approved" { - run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --apply + run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github --pr 1094 --apply [ "$status" -eq 0 ] # Assert the script's summary output before the log-inspecting `run grep` calls # below overwrite bats's $output. @@ -69,7 +69,7 @@ teardown() { rm -rf "${TT_TMP:-/nonexistent}"; } } @test "dry-run examines but dismisses nothing (no mutation)" { - run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --dry-run + run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github --pr 1094 --dry-run [ "$status" -eq 0 ] # Assert the dry-run output before the `run grep` below overwrites $output. echo "$output" | grep -q '\[dry-run\] would dismiss review PRR_stale' @@ -107,7 +107,7 @@ cat "\$DSBR_RESPONSE" STUB chmod +x "${TT_TMP}/bin/gh" - run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 + run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github --pr 1094 [ "$status" -eq 0 ] # The read query pins the opinionated connection and never the plain one. grep -q 'latestOpinionatedReviews' "$qlog" @@ -161,7 +161,7 @@ cat "$DSBR_PAGE1" STUB chmod +x "${TT_TMP}/bin/gh" - run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --apply + run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github --pr 1094 --apply [ "$status" -eq 0 ] # Assert the paginated summary before the `run grep` below overwrites $output. echo "$output" | grep -q 'examined 2 effective review(s), dismissed 1 stale bot review' @@ -193,7 +193,7 @@ printf '%s' '{"data":{"repository":{"pullRequest":{"headRefOid":"deadbeef"}}}}' STUB chmod +x "${TT_TMP}/bin/gh" - run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 + run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github --pr 1094 [ "$status" -eq 0 ] echo "$output" | grep -q 'PR head moved from 8e5bc8db to deadbeef' # nothing was dismissed @@ -216,7 +216,7 @@ cat "$DSBR_RESPONSE" STUB chmod +x "${TT_TMP}/bin/gh" - run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --apply + run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github --pr 1094 --apply [ "$status" -eq 0 ] echo "$output" | grep -q 'returned a GraphQL errors envelope' # the phantom dismissal is not counted @@ -224,7 +224,7 @@ STUB } @test "requires --owner, --name and --pr" { - run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github + run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github [ "$status" -ne 0 ] echo "$output" | grep -q 'required' } diff --git a/test/workflows/feature-ideation/collect-signals.bats b/test/workflows/feature-ideation/collect-signals.bats index 94f9a12b6..e25e270f7 100644 --- a/test/workflows/feature-ideation/collect-signals.bats +++ b/test/workflows/feature-ideation/collect-signals.bats @@ -10,7 +10,7 @@ load 'helpers/setup' setup() { tt_make_tmpdir tt_install_gh_stub - export REPO="petry-projects/talkterm" + export REPO="combsmith/talkterm" export GH_TOKEN="fake-token-for-tests" export SIGNALS_OUTPUT="${TT_TMP}/signals.json" } @@ -164,7 +164,7 @@ build_happy_script() { # --------------------------------------------------------------------------- @test "collect-signals: open-issue truncation is detected BEFORE bot filtering" { - # Caught by Copilot review on PR petry-projects/.github#85: previously the + # Caught by Copilot review on PR combsmith/.github#85: previously the # truncation check ran AFTER filter_bots_apply, so a result set composed # entirely of bots could drop below ISSUE_LIMIT and mask real truncation. # Build a fixture with ISSUE_LIMIT=3 raw items, all bot-authored. Bot diff --git a/test/workflows/feature-ideation/date-utils.bats b/test/workflows/feature-ideation/date-utils.bats index a26749ff3..fd9e3abc5 100644 --- a/test/workflows/feature-ideation/date-utils.bats +++ b/test/workflows/feature-ideation/date-utils.bats @@ -17,7 +17,7 @@ setup() { @test "date_days_ago: 0 returns today" { # Use the helper function rather than the raw system `date` call so the test # validates behaviour consistently on both GNU and BSD systems. - # Caught by CodeRabbit review on PR petry-projects/.github#85. + # Caught by CodeRabbit review on PR combsmith/.github#85. today=$(date_today) run date_days_ago 0 [ "$status" -eq 0 ] diff --git a/test/workflows/feature-ideation/discussion-mutations.bats b/test/workflows/feature-ideation/discussion-mutations.bats index 671e9b3ae..8b36e7fab 100644 --- a/test/workflows/feature-ideation/discussion-mutations.bats +++ b/test/workflows/feature-ideation/discussion-mutations.bats @@ -102,7 +102,7 @@ teardown() { } # --------------------------------------------------------------------------- -# Regression test for Copilot review on PR petry-projects/.github#85: +# Regression test for Copilot review on PR combsmith/.github#85: # add_label_to_discussion previously sent labelIds via -f as the literal # string `["L_1"]` which the GraphQL API rejects (labelIds is [ID!]!). # The fix routes through gh_safe_graphql_input with a properly built JSON diff --git a/test/workflows/feature-ideation/fixtures/expected/INVALID-missing-field.signals.json b/test/workflows/feature-ideation/fixtures/expected/INVALID-missing-field.signals.json index 897f5a28f..03f07c772 100644 --- a/test/workflows/feature-ideation/fixtures/expected/INVALID-missing-field.signals.json +++ b/test/workflows/feature-ideation/fixtures/expected/INVALID-missing-field.signals.json @@ -1,6 +1,6 @@ { "schema_version": "1.0.0", "scan_date": "2026-04-07T07:00:00Z", - "repo": "petry-projects/talkterm", + "repo": "combsmith/talkterm", "open_issues": { "count": 0, "items": [] } } diff --git a/test/workflows/feature-ideation/fixtures/expected/empty-repo.signals.json b/test/workflows/feature-ideation/fixtures/expected/empty-repo.signals.json index 4101afb67..37b6b4e4d 100644 --- a/test/workflows/feature-ideation/fixtures/expected/empty-repo.signals.json +++ b/test/workflows/feature-ideation/fixtures/expected/empty-repo.signals.json @@ -1,7 +1,7 @@ { "schema_version": "1.0.0", "scan_date": "2026-04-07T07:00:00Z", - "repo": "petry-projects/talkterm", + "repo": "combsmith/talkterm", "open_issues": { "count": 0, "items": [] }, "closed_issues_30d": { "count": 0, "items": [] }, "ideas_discussions": { "count": 0, "items": [] }, diff --git a/test/workflows/feature-ideation/fixtures/expected/populated.signals.json b/test/workflows/feature-ideation/fixtures/expected/populated.signals.json index 4c929219e..f9e78bd2d 100644 --- a/test/workflows/feature-ideation/fixtures/expected/populated.signals.json +++ b/test/workflows/feature-ideation/fixtures/expected/populated.signals.json @@ -1,7 +1,7 @@ { "schema_version": "1.0.0", "scan_date": "2026-04-07T07:00:00Z", - "repo": "petry-projects/talkterm", + "repo": "combsmith/talkterm", "open_issues": { "count": 2, "items": [ diff --git a/test/workflows/feature-ideation/fixtures/expected/truncated.signals.json b/test/workflows/feature-ideation/fixtures/expected/truncated.signals.json index 845db66f9..58e664089 100644 --- a/test/workflows/feature-ideation/fixtures/expected/truncated.signals.json +++ b/test/workflows/feature-ideation/fixtures/expected/truncated.signals.json @@ -1,7 +1,7 @@ { "schema_version": "1.0.0", "scan_date": "2026-04-07T07:00:00Z", - "repo": "petry-projects/talkterm", + "repo": "combsmith/talkterm", "open_issues": { "count": 0, "items": [] }, "closed_issues_30d": { "count": 0, "items": [] }, "ideas_discussions": { "count": 0, "items": [] }, diff --git a/test/workflows/feature-ideation/gh-safe.bats b/test/workflows/feature-ideation/gh-safe.bats index 046446d7c..242e017a5 100644 --- a/test/workflows/feature-ideation/gh-safe.bats +++ b/test/workflows/feature-ideation/gh-safe.bats @@ -70,7 +70,7 @@ teardown() { # --------------------------------------------------------------------------- @test "rest: EXITS NON-ZERO on auth failure (gh exit 4) and reports the failure category" { - # CodeRabbit on PR petry-projects/.github#85: the previous assertion + # CodeRabbit on PR combsmith/.github#85: the previous assertion # ended with `|| true`, so it always passed regardless of the message # content. Use --separate-stderr to capture stderr and assert the # structured `[gh-safe][rest-failure]` prefix is emitted. @@ -169,7 +169,7 @@ teardown() { } # --------------------------------------------------------------------------- -# Regression tests for Copilot review feedback on PR petry-projects/.github#85 +# Regression tests for Copilot review feedback on PR combsmith/.github#85 # --------------------------------------------------------------------------- @test "graphql: invalid --jq filter EXITS NON-ZERO instead of returning []" { diff --git a/test/workflows/feature-ideation/lint-prompt.bats b/test/workflows/feature-ideation/lint-prompt.bats index 1ba14d1a4..7371e4cad 100644 --- a/test/workflows/feature-ideation/lint-prompt.bats +++ b/test/workflows/feature-ideation/lint-prompt.bats @@ -161,7 +161,7 @@ YML # --------------------------------------------------------------------------- # Exit-code precedence: file errors (2) must not be downgraded by later lint -# findings (1). Caught by CodeRabbit review on PR petry-projects/.github#85. +# findings (1). Caught by CodeRabbit review on PR combsmith/.github#85. # --------------------------------------------------------------------------- @test "lint-prompt: missing file before lint-failing file still exits 2" { @@ -199,7 +199,7 @@ YML @test "lint-prompt: GitHub Actions expressions with nested braces do not false-positive" { # ${{ format('${FOO}', github.ref) }} should be stripped entirely so ${FOO} # inside the expression is not flagged as a bare shell expansion. - # Caught by CodeRabbit review on PR petry-projects/.github#85. + # Caught by CodeRabbit review on PR combsmith/.github#85. write_yml "${TT_TMP}/nested-expr.yml" <<'YML' jobs: analyze: diff --git a/test/workflows/feature-ideation/match-discussions.bats b/test/workflows/feature-ideation/match-discussions.bats index b92bce07a..3e6bcbc4a 100644 --- a/test/workflows/feature-ideation/match-discussions.bats +++ b/test/workflows/feature-ideation/match-discussions.bats @@ -21,7 +21,7 @@ teardown() { # Computes the discussions count from the array length so the fixture # always satisfies the producer/consumer contract (even though the # matcher only reads .items, validating contracts in test fixtures -# is good hygiene). CodeRabbit on PR petry-projects/.github#85. +# is good hygiene). CodeRabbit on PR combsmith/.github#85. build_signals() { local discussions="$1" local count @@ -30,7 +30,7 @@ build_signals() { { "schema_version": "1.0.0", "scan_date": "2026-04-07T00:00:00Z", - "repo": "petry-projects/talkterm", + "repo": "combsmith/talkterm", "open_issues": { "count": 0, "items": [] }, "closed_issues_30d": { "count": 0, "items": [] }, "ideas_discussions": { "count": ${count}, "items": ${discussions} }, @@ -168,7 +168,7 @@ build_proposals() { } @test "match: rejects non-numeric MATCH_THRESHOLD with usage error" { - # Caught by Copilot review on PR petry-projects/.github#85: previously + # Caught by Copilot review on PR combsmith/.github#85: previously # a typo in MATCH_THRESHOLD produced an opaque Python traceback. build_signals '[]' build_proposals '[{"title":"x"}]' @@ -193,7 +193,7 @@ build_proposals() { } @test "match: malformed JSON in signals file exits non-zero" { - # Caught by CodeRabbit review on PR petry-projects/.github#85. + # Caught by CodeRabbit review on PR combsmith/.github#85. printf 'not valid json' >"${TT_TMP}/signals.json" build_proposals '[{"title":"x"}]' run bash "$MATCH" "${TT_TMP}/signals.json" "${TT_TMP}/proposals.json" @@ -201,7 +201,7 @@ build_proposals() { } @test "match: malformed JSON in proposals file exits non-zero" { - # Caught by CodeRabbit review on PR petry-projects/.github#85. + # Caught by CodeRabbit review on PR combsmith/.github#85. build_signals '[]' printf 'not valid json' >"${TT_TMP}/proposals.json" run bash "$MATCH" "${TT_TMP}/signals.json" "${TT_TMP}/proposals.json" diff --git a/test/workflows/feature-ideation/signals-schema.bats b/test/workflows/feature-ideation/signals-schema.bats index 6c19d8fb6..54c7a3f85 100644 --- a/test/workflows/feature-ideation/signals-schema.bats +++ b/test/workflows/feature-ideation/signals-schema.bats @@ -53,7 +53,7 @@ FIX="${TT_FIXTURES_DIR}/expected" } @test "schema: invalid date-time scan_date FAILS validation (format checker enforced)" { - # Caught by Copilot review on PR petry-projects/.github#85: + # Caught by Copilot review on PR combsmith/.github#85: # Draft202012Validator does NOT enforce `format` keywords by default. # The validator must instantiate FormatChecker explicitly. bad_file="${BATS_TEST_TMPDIR}/bad-scan-date.json" @@ -70,7 +70,7 @@ FIX="${TT_FIXTURES_DIR}/expected" } @test "schema: RFC-3339 lowercase t/z date-time scan_date passes" { - # codeant-ai on PR petry-projects/.github#1194: RFC-3339 §5.6 permits a + # codeant-ai on PR combsmith/.github#1194: RFC-3339 §5.6 permits a # lowercase "t" separator and lowercase "z" zone designator; the checker # must accept them, not just their uppercase forms. good_file="${BATS_TEST_TMPDIR}/lowercase-scan-date.json" @@ -89,7 +89,7 @@ FIX="${TT_FIXTURES_DIR}/expected" } @test "schema: SCHEMA_VERSION constant matches schema file version comment" { - # CodeRabbit on PR petry-projects/.github#85: enforce that the + # CodeRabbit on PR combsmith/.github#85: enforce that the # SCHEMA_VERSION constant in collect-signals.sh stays in lockstep with # the version annotation in signals.schema.json. Bumping one without # the other is a compatibility break. diff --git a/test/workflows/feature-ideation/stubs/gh b/test/workflows/feature-ideation/stubs/gh index 27584df25..7a62098ee 100755 --- a/test/workflows/feature-ideation/stubs/gh +++ b/test/workflows/feature-ideation/stubs/gh @@ -23,7 +23,7 @@ set -euo pipefail if [ -n "${GH_STUB_LOG:-}" ]; then # Use %q so each arg is shell-quoted; tests can re-parse argv losslessly. - # Caught by Copilot review on PR petry-projects/.github#85: previously + # Caught by Copilot review on PR combsmith/.github#85: previously # used $* which joined with spaces and lost argument boundaries. # shellcheck disable=SC2059 printf '%q ' "$@" >>"$GH_STUB_LOG" diff --git a/test/workflows/initiative-driver/gate-tooling.bats b/test/workflows/initiative-driver/gate-tooling.bats index ce6249e75..cc10796d0 100644 --- a/test/workflows/initiative-driver/gate-tooling.bats +++ b/test/workflows/initiative-driver/gate-tooling.bats @@ -21,10 +21,10 @@ GATE_STEP='Agent rate-limit admission gate (enforcing)' [ "$output" = 'cd0b16751454d2eb3486ec04477d7ee9cc96c425' ] } -@test "stub: gate tooling checkout still targets petry-projects/.github" { +@test "stub: gate tooling checkout still targets combsmith/.github" { run yq -r ".jobs.dispatch.steps[] | select(.name == \"${CHECKOUT_STEP}\") | .with.repository" "$STUB" [ "$status" -eq 0 ] - [ "$output" = 'petry-projects/.github' ] + [ "$output" = 'combsmith/.github' ] } @test "stub: gate step detects a missing gate script and reports an ::error::" { diff --git a/test/workflows/pr-auto-review/sweep-dispatch.bats b/test/workflows/pr-auto-review/sweep-dispatch.bats index 3cb055f05..29a612eb7 100644 --- a/test/workflows/pr-auto-review/sweep-dispatch.bats +++ b/test/workflows/pr-auto-review/sweep-dispatch.bats @@ -82,19 +82,19 @@ STUB setup() { write_gh_stub export GH_TOKEN="t" - export SEARCH_OWNER="petry-projects" + export SEARCH_OWNER="combsmith" export SWEEP_LABEL="standards-sync" export MAX_PER_RUN="8" export DRY_RUN="0" - export DISPATCH_REPO="petry-projects/.github-private" + export DISPATCH_REPO="combsmith/.github-private" # Keep retries bounded and instant so the suite stays fast + deterministic. export DISPATCH_RETRIES="2" export DISPATCH_RETRY_SLEEP="0" export STUB_COUNTER="${BATS_TEST_TMPDIR}/dispatch-count" # Two ready, non-draft PRs. export STUB_PR_LIST='[ - {"url":"https://github.com/petry-projects/repo-a/pull/1","isDraft":false}, - {"url":"https://github.com/petry-projects/repo-c/pull/3","isDraft":false} + {"url":"https://github.com/combsmith/repo-a/pull/1","isDraft":false}, + {"url":"https://github.com/combsmith/repo-c/pull/3","isDraft":false} ]' } @@ -105,38 +105,38 @@ run_sweep() { run bash "${TT_SCRIPTS_DIR}/sweep-dispatch.sh"; } @test "sweep: both ready PRs dispatch and the run succeeds" { run_sweep [ "$status" -eq 0 ] - echo "$output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-a/pull/1' - echo "$output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-c/pull/3' + echo "$output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-a/pull/1' + echo "$output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-c/pull/3' echo "$output" | grep -q 'dispatched 2 of 2' } # ── fault isolation: a transient dispatch failure must not abort the sweep ───── @test "sweep: a transient dispatch failure on one PR does not abort the run" { - export STUB_DISPATCH_FAIL_URL="https://github.com/petry-projects/repo-a/pull/1" + export STUB_DISPATCH_FAIL_URL="https://github.com/combsmith/repo-a/pull/1" run_sweep # The whole run must still succeed — a transient dispatch error is retried # next cycle, not a workflow failure. [ "$status" -eq 0 ] # repo-a persistently fails → warning, not an abort. - echo "$output" | grep -q 'failed to dispatch https://github.com/petry-projects/repo-a/pull/1' + echo "$output" | grep -q 'failed to dispatch https://github.com/combsmith/repo-a/pull/1' # repo-c is still reached and dispatched (loop was not aborted). - echo "$output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-c/pull/3' + echo "$output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-c/pull/3' echo "$output" | grep -q 'dispatched 1 of 2' } # ── fault isolation: a transient fact-fetch failure skips only that PR ───────── @test "sweep: a transient 'gh pr view' failure skips that PR and continues" { - export STUB_VIEW_FAIL_URL="https://github.com/petry-projects/repo-a/pull/1" + export STUB_VIEW_FAIL_URL="https://github.com/combsmith/repo-a/pull/1" run_sweep [ "$status" -eq 0 ] local sweep_output="$output" # repo-c still dispatches. - echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-c/pull/3' + echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-c/pull/3' echo "$sweep_output" | grep -q 'dispatched 1 of 2' # repo-a could not be evaluated → skipped, never dispatched. - run grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-a/pull/1' <<< "$sweep_output" + run grep -q 'dispatched auto-review for https://github.com/combsmith/repo-a/pull/1' <<< "$sweep_output" [ "$status" -eq 1 ] } @@ -145,11 +145,11 @@ run_sweep() { run bash "${TT_SCRIPTS_DIR}/sweep-dispatch.sh"; } @test "sweep: a dispatch that fails once is retried and then succeeds" { export STUB_DISPATCH_FAIL_ONCE="1" # Only one PR so the single retry budget is spent on it deterministically. - export STUB_PR_LIST='[{"url":"https://github.com/petry-projects/repo-a/pull/1","isDraft":false}]' + export STUB_PR_LIST='[{"url":"https://github.com/combsmith/repo-a/pull/1","isDraft":false}]' run_sweep [ "$status" -eq 0 ] local sweep_output="$output" - echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-a/pull/1' + echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-a/pull/1' echo "$sweep_output" | grep -q 'dispatched 1 of 1' # No persistent-failure warning — the retry recovered it. run grep -q 'failed to dispatch' <<< "$sweep_output" @@ -168,10 +168,10 @@ run_sweep() { run bash "${TT_SCRIPTS_DIR}/sweep-dispatch.sh"; } [ "$status" -eq 0 ] local sweep_output="$output" # repo-c is still reached and dispatched — null data on repo-a must not abort. - echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-c/pull/3' + echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-c/pull/3' echo "$sweep_output" | grep -q 'dispatched 1 of 2' # repo-a had null PR data → warning + skip, never dispatched. - run grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-a/pull/1' <<< "$sweep_output" + run grep -q 'dispatched auto-review for https://github.com/combsmith/repo-a/pull/1' <<< "$sweep_output" [ "$status" -eq 1 ] } @@ -186,10 +186,10 @@ run_sweep() { run bash "${TT_SCRIPTS_DIR}/sweep-dispatch.sh"; } [ "$status" -eq 0 ] local sweep_output="$output" # repo-c is still reached and dispatched — errors on repo-a must not abort. - echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-c/pull/3' + echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-c/pull/3' echo "$sweep_output" | grep -q 'dispatched 1 of 2' # repo-a had GraphQL errors → warning + skip, never dispatched. - run grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-a/pull/1' <<< "$sweep_output" + run grep -q 'dispatched auto-review for https://github.com/combsmith/repo-a/pull/1' <<< "$sweep_output" [ "$status" -eq 1 ] } @@ -204,9 +204,9 @@ run_sweep() { run bash "${TT_SCRIPTS_DIR}/sweep-dispatch.sh"; } [ "$status" -eq 0 ] local sweep_output="$output" # repo-c is still reached and dispatched — null threads on repo-a must not abort. - echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-c/pull/3' + echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-c/pull/3' echo "$sweep_output" | grep -q 'dispatched 1 of 2' # repo-a had null reviewThreads → warning + skip, never dispatched. - run grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-a/pull/1' <<< "$sweep_output" + run grep -q 'dispatched auto-review for https://github.com/combsmith/repo-a/pull/1' <<< "$sweep_output" [ "$status" -eq 1 ] } diff --git a/test/workflows/pr-auto-review/sweep.bats b/test/workflows/pr-auto-review/sweep.bats index d14c51da8..194295666 100644 --- a/test/workflows/pr-auto-review/sweep.bats +++ b/test/workflows/pr-auto-review/sweep.bats @@ -24,9 +24,9 @@ setup() { # Three open PRs, the middle one a draft. LIST='[ - {"url":"https://github.com/petry-projects/repo-a/pull/1","isDraft":false}, - {"url":"https://github.com/petry-projects/repo-b/pull/2","isDraft":true}, - {"url":"https://github.com/petry-projects/repo-c/pull/3","isDraft":false} + {"url":"https://github.com/combsmith/repo-a/pull/1","isDraft":false}, + {"url":"https://github.com/combsmith/repo-b/pull/2","isDraft":true}, + {"url":"https://github.com/combsmith/repo-c/pull/3","isDraft":false} ]' # ── draft exclusion ────────────────────────────────────────────────────────── @@ -34,8 +34,8 @@ LIST='[ @test "candidates: drafts are excluded, non-drafts kept in input order" { run pr_auto_review_sweep_candidates 10 <<<"$LIST" [ "$status" -eq 0 ] - [ "${lines[0]}" = "https://github.com/petry-projects/repo-a/pull/1" ] - [ "${lines[1]}" = "https://github.com/petry-projects/repo-c/pull/3" ] + [ "${lines[0]}" = "https://github.com/combsmith/repo-a/pull/1" ] + [ "${lines[1]}" = "https://github.com/combsmith/repo-c/pull/3" ] [ "${#lines[@]}" -eq 2 ] } @@ -45,7 +45,7 @@ LIST='[ run pr_auto_review_sweep_candidates 1 <<<"$LIST" [ "$status" -eq 0 ] [ "${#lines[@]}" -eq 1 ] - [ "${lines[0]}" = "https://github.com/petry-projects/repo-a/pull/1" ] + [ "${lines[0]}" = "https://github.com/combsmith/repo-a/pull/1" ] } @test "candidates: MAX larger than the candidate count returns all non-drafts" { @@ -91,14 +91,14 @@ LIST='[ } @test "candidates: an object missing isDraft is treated as non-draft" { - run pr_auto_review_sweep_candidates 10 <<<'[{"url":"https://github.com/petry-projects/repo-a/pull/7"}]' + run pr_auto_review_sweep_candidates 10 <<<'[{"url":"https://github.com/combsmith/repo-a/pull/7"}]' [ "$status" -eq 0 ] [ "${#lines[@]}" -eq 1 ] - [ "${lines[0]}" = "https://github.com/petry-projects/repo-a/pull/7" ] + [ "${lines[0]}" = "https://github.com/combsmith/repo-a/pull/7" ] } @test "candidates: all drafts → nothing" { - run pr_auto_review_sweep_candidates 10 <<<'[{"url":"https://github.com/petry-projects/repo-a/pull/1","isDraft":true}]' + run pr_auto_review_sweep_candidates 10 <<<'[{"url":"https://github.com/combsmith/repo-a/pull/1","isDraft":true}]' [ "$status" -eq 0 ] [ "${#lines[@]}" -eq 0 ] } diff --git a/test/workflows/pr-review-mention/ack.bats b/test/workflows/pr-review-mention/ack.bats index f9a07cacf..0f4a37b74 100644 --- a/test/workflows/pr-review-mention/ack.bats +++ b/test/workflows/pr-review-mention/ack.bats @@ -33,7 +33,7 @@ teardown() { # honoured; the rest get harmless defaults. run_ack() { GH_TOKEN="x" \ - PR_URL="https://github.com/petry-projects/.github/pull/1" \ + PR_URL="https://github.com/combsmith/.github/pull/1" \ BOT_LOGIN="donpetry-bot" \ EVENT_NAME="${EVENT_NAME:-issue_comment}" \ SENDER_LOGIN="${SENDER_LOGIN:-someone}" \ diff --git a/tests/canary_rollout.bats b/tests/canary_rollout.bats index 76c2a09b8..e65bed823 100644 --- a/tests/canary_rollout.bats +++ b/tests/canary_rollout.bats @@ -360,7 +360,7 @@ DG_KNOBS='{"min_baseline_sample":10,"margin_permille":100}' # ── _reusable_differs: cross-repo host-aware blob compare (#613) ─────────────── # When an agent's host != THIS_REPO (e.g. dev-lead hosted in .github-private while the # engine runs from .github), the reusable blob is NOT in the local checkout — the compare -# must go through `gh api` on the host. agent-shield (host = petry-projects/.github) is the +# must go through `gh api` on the host. agent-shield (host = combsmith/.github) is the # cross-repo agent here, with THIS_REPO forced to .github-private via GITHUB_REPOSITORY. @test "_reusable_differs: cross-repo agent resolves host blobs via gh api — differ → 1" { STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")"; export PATH="$STUB_BIN:$PATH" @@ -370,7 +370,7 @@ DG_KNOBS='{"min_baseline_sample":10,"margin_permille":100}' echo ' *"ref=PRIOR"*) echo "bbbbbbbbbb" ;;' echo ' *) echo "" ;;' echo 'esac'; } > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" - run env GITHUB_REPOSITORY="petry-projects/.github-private" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="combsmith/.github-private" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && _reusable_differs agent-shield CAND PRIOR" [ "$status" -eq 0 ]; [ "$output" = "1" ] } @@ -378,7 +378,7 @@ DG_KNOBS='{"min_baseline_sample":10,"margin_permille":100}' @test "_reusable_differs: cross-repo agent — identical host blob → 0" { STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")"; export PATH="$STUB_BIN:$PATH" printf '#!/usr/bin/env bash\necho "samesamesame"\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" - run env GITHUB_REPOSITORY="petry-projects/.github-private" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="combsmith/.github-private" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && _reusable_differs agent-shield CAND PRIOR" [ "$status" -eq 0 ]; [ "$output" = "0" ] } @@ -386,7 +386,7 @@ DG_KNOBS='{"min_baseline_sample":10,"margin_permille":100}' @test "_reusable_differs: cross-repo agent — unresolvable blob fails CLOSED → 1" { STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")"; export PATH="$STUB_BIN:$PATH" printf '#!/usr/bin/env bash\necho ""\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" - run env GITHUB_REPOSITORY="petry-projects/.github-private" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="combsmith/.github-private" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && _reusable_differs agent-shield CAND PRIOR" [ "$status" -eq 0 ]; [ "$output" = "1" ] } @@ -931,7 +931,7 @@ _pv_rings() { # ── canary-rings.json SoT shape (rings + gate knobs) ────────────────────────── @test "canary-rings.json: pr-auto-review onboarded to canary; unmanaged block emptied" { - run jq -e '.agents["pr-auto-review"].host == "petry-projects/.github"' "$RINGS" + run jq -e '.agents["pr-auto-review"].host == "combsmith/.github"' "$RINGS" [ "$status" -eq 0 ] run jq -e '.agents["pr-auto-review"].run_workflow == "PR Auto-Review — Ready Check"' "$RINGS" [ "$status" -eq 0 ] @@ -943,7 +943,7 @@ _pv_rings() { } @test "canary-rings.json: add-to-project onboarded to full ring model (#651)" { - run jq -e '.agents["add-to-project"].host == "petry-projects/.github"' "$RINGS" + run jq -e '.agents["add-to-project"].host == "combsmith/.github"' "$RINGS" [ "$status" -eq 0 ] run bash -c "jq -r '.agents[\"add-to-project\"].rings | sort_by(.order) | map(.channel) | join(\",\")' '$RINGS'" [ "$output" = "next,ring0,ring1,stable" ] @@ -955,7 +955,7 @@ _pv_rings() { } @test "canary-rings.json: feature-ideation onboarded (cross-repo host, standard rings, #614)" { - run jq -e '.agents["feature-ideation"].host == "petry-projects/.github"' "$RINGS" + run jq -e '.agents["feature-ideation"].host == "combsmith/.github"' "$RINGS" [ "$status" -eq 0 ] run jq -e '.agents["feature-ideation"].reusable == ".github/workflows/feature-ideation-reusable.yml"' "$RINGS" [ "$status" -eq 0 ] @@ -968,7 +968,7 @@ _pv_rings() { } @test "canary-rings.json: ci-failure-analyst onboarded (this-repo host, standard rings, #1159)" { - run jq -e '.agents["ci-failure-analyst"].host == "petry-projects/.github-private"' "$RINGS" + run jq -e '.agents["ci-failure-analyst"].host == "combsmith/.github-private"' "$RINGS" [ "$status" -eq 0 ] run jq -e '.agents["ci-failure-analyst"].reusable == ".github/workflows/ci-failure-analyst-reusable.yml"' "$RINGS" [ "$status" -eq 0 ] @@ -985,9 +985,9 @@ _pv_rings() { @test "canary-rings.json: pr-review onboarded (cross-repo host, standard rings, grandfathered filename, #1106)" { # AC4: cross-repo agent — its reusable lives in .github-private, so releases/tags host there. - run jq -e '.agents["pr-review"].host == "petry-projects/.github-private"' "$RINGS" + run jq -e '.agents["pr-review"].host == "combsmith/.github-private"' "$RINGS" [ "$status" -eq 0 ] - # AC4: the reusable is the grandfathered non-`-reusable.yml` engine (petry-projects/.github-private#1127) — + # AC4: the reusable is the grandfathered non-`-reusable.yml` engine (combsmith/.github-private#1127) — # exactly why the *-reusable.yml drift scan never caught the gap this issue closes. run jq -e '.agents["pr-review"].reusable == ".github/workflows/pr-review.yml"' "$RINGS" [ "$status" -eq 0 ] @@ -1002,7 +1002,7 @@ _pv_rings() { [ "$status" -eq 0 ] run jq -e '.agents["pr-review"].rings[] | select(.channel=="stable") | (.members | index("*")) != null' "$RINGS" [ "$status" -eq 0 ] - run jq -e '.agents["pr-review"].rings[] | select(.channel=="ring1") | (.members|index("petry-projects/TalkTerm")) and (.members|index("petry-projects/bmad-bgreat-suite"))' "$RINGS" + run jq -e '.agents["pr-review"].rings[] | select(.channel=="ring1") | (.members|index("combsmith/TalkTerm")) and (.members|index("combsmith/bmad-bgreat-suite"))' "$RINGS" [ "$status" -eq 0 ] # standard #548 gate + organic-traffic model (no synthetic-canary fields) run jq -e '.agents["pr-review"].gate.transitions["ring1->stable"].sample_min == 1' "$RINGS" @@ -1012,11 +1012,11 @@ _pv_rings() { } @test "canary-rings.json: valid JSON + dev-lead host + ordered rings" { - run jq -e '.agents["dev-lead"].host == "petry-projects/.github-private"' "$RINGS" + run jq -e '.agents["dev-lead"].host == "combsmith/.github-private"' "$RINGS" [ "$status" -eq 0 ] run bash -c "jq -r '.agents[\"dev-lead\"].rings | sort_by(.order) | map(.channel) | join(\",\")' '$RINGS'" [ "$output" = "next,ring0,ring1,stable" ] - run jq -e '.agents["dev-lead"].rings[] | select(.channel=="ring1") | (.members | index("petry-projects/TalkTerm")) and (.members | index("petry-projects/bmad-bgreat-suite"))' "$RINGS" + run jq -e '.agents["dev-lead"].rings[] | select(.channel=="ring1") | (.members | index("combsmith/TalkTerm")) and (.members | index("combsmith/bmad-bgreat-suite"))' "$RINGS" [ "$status" -eq 0 ] } @@ -1027,12 +1027,12 @@ _pv_rings() { # TalkTerm/bmad traffic (organic or human-triggered) arrives. local a for a in initiative-planner idea-triage idea-enhancer; do - run jq -e --arg a "$a" '.agents[$a].host == "petry-projects/.github"' "$RINGS" + run jq -e --arg a "$a" '.agents[$a].host == "combsmith/.github"' "$RINGS" [ "$status" -eq 0 ] run bash -c "jq -r --arg a '$a' '.agents[\$a].rings | sort_by(.order) | map(.channel) | join(\",\")' '$RINGS'" [ "$output" = "next,ring0,ring1,stable" ] # ring1 = the real consumers that gate ring1->stable - run jq -e --arg a "$a" '.agents[$a].rings[] | select(.channel=="ring1") | (.members|index("petry-projects/TalkTerm")) and (.members|index("petry-projects/bmad-bgreat-suite"))' "$RINGS" + run jq -e --arg a "$a" '.agents[$a].rings[] | select(.channel=="ring1") | (.members|index("combsmith/TalkTerm")) and (.members|index("combsmith/bmad-bgreat-suite"))' "$RINGS" [ "$status" -eq 0 ] # standard #548 gate: inner rings waive, ring1->stable needs >=1 real run run jq -e --arg a "$a" '.agents[$a].gate.transitions["next->ring0"].waive_sample_if_no_caller == true and .agents[$a].gate.transitions["ring0->ring1"].waive_sample == true and .agents[$a].gate.transitions["ring1->stable"].sample_min == 1' "$RINGS" @@ -1078,12 +1078,12 @@ _pv_rings() { # ── orchestrator: resolve_members (host-relative tokens) ────────────────────── @test "orchestrator: resolve_members expands \$host / \$org_infra / * " { run bash -c "source '$ORCH' && CANARY_RINGS='$RINGS' resolve_members dev-lead next" - [ "$status" -eq 0 ]; [ "$output" = "petry-projects/.github-private" ] + [ "$status" -eq 0 ]; [ "$output" = "combsmith/.github-private" ] run bash -c "source '$ORCH' && CANARY_RINGS='$RINGS' resolve_members dev-lead ring0" - [ "$status" -eq 0 ]; [ "$output" = "petry-projects/.github" ] + [ "$status" -eq 0 ]; [ "$output" = "combsmith/.github" ] run bash -c "source '$ORCH' && CANARY_RINGS='$RINGS' resolve_members dev-lead ring1" - [[ "$output" == *"petry-projects/TalkTerm"* ]] - [[ "$output" == *"petry-projects/bmad-bgreat-suite"* ]] + [[ "$output" == *"combsmith/TalkTerm"* ]] + [[ "$output" == *"combsmith/bmad-bgreat-suite"* ]] } # ── orchestrator: evaluate / promote (read-only + dry-run) with stubs ───────── @@ -1347,7 +1347,7 @@ GITEOF # `gh run view --log` prints the resolved "Uses: …@refs/tags/ ()" line, with # = $1 (the release the run actually executed); "none" prints a log with no Uses: line. _executed_sha_stub() { - local executed="$1" conclusion="${2:-failure}" fail_sub="${3:-repo petry-projects/TalkTerm --workflow}" cut_iso run_iso + local executed="$1" conclusion="${2:-failure}" fail_sub="${3:-repo combsmith/TalkTerm --workflow}" cut_iso run_iso STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")"; export PATH="$STUB_BIN:$PATH" cut_iso="$(date -u -d "-3 days" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -v"-3d" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null)" run_iso="$(date -u -d "-2 days" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -v"-2d" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null)" @@ -1370,7 +1370,7 @@ case "\$*" in *"run view"*"--log"*) # Mirrors real \`gh run view --log\` output: " ". ts="2026-09-25T00:00:00.1234567Z" - U="Uses: petry-projects/.github-private/.github/workflows/dev-lead-reusable.yml@refs/tags/dev-lead/v2-ring1" + U="Uses: combsmith/.github-private/.github/workflows/dev-lead-reusable.yml@refs/tags/dev-lead/v2-ring1" if [ "$executed" = logfail ]; then exit 1 elif [ "$executed" = none ]; then printf 'build\tUNKNOWN STEP\t%s nothing relevant\n' "\$ts" elif [ "$executed" = collision ]; then printf 'build\tUNKNOWN STEP\t%s Uses: someone/else/.github/workflows/dev-lead-reusable.yml@refs/tags/x (bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)\n' "\$ts" @@ -1447,7 +1447,7 @@ GITEOF # The source tier's sample still counts runs from before the candidate reached it, so dropping only # their failures would let a candidate with no executions there reach PROMOTE. The host (.github-private) # is the source tier of next->ring0 and its failing run's log names the OLD sha: it must still count. - _executed_sha_stub bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb failure "repo petry-projects/.github-private --workflow" + _executed_sha_stub bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb failure "repo combsmith/.github-private --workflow" run env CANARY_RINGS="$RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"BLOCKED"* ]] @@ -1501,7 +1501,7 @@ GITEOF } # ── orchestrator: cross-repo agents resolve tags on `host`, not the local checkout ─ -# (#1049) A cross-repo agent (host = petry-projects/.github) keeps its / +# (#1049) A cross-repo agent (host = combsmith/.github) keeps its / # and /vX.Y.Z tags on the HOST repo, not this checkout. `evaluate` must resolve them # there via `gh api` (dereferencing annotated tags) — reading the LOCAL refs makes every # ring resolve empty → "all rings equal → fully rolled out", which would falsely SKIP a @@ -1589,7 +1589,7 @@ GITEOF } # ── orchestrator: cross-repo promote MOVES the channel tag on the HOST via gh api (#1054) ─ -# A cross-repo agent (host = petry-projects/.github) keeps its channel tags on the host, so +# A cross-repo agent (host = combsmith/.github) keeps its channel tags on the host, so # the promote move must go through `gh api PATCH .../git/refs/tags/...`, NOT local `git tag -f` # (which fails "nonexistent object" for a host commit absent from this checkout — #1054). @test "orchestrator: cross-repo promote --dry-run shows the host gh-api move, not a local git tag (#1054)" { @@ -1597,7 +1597,7 @@ GITEOF run env CANARY_RINGS="$RINGS" bash "$ORCH" promote auto-rebase --dry-run [ "$status" -eq 0 ] [[ "$output" == *"DRY-RUN"* ]] - [[ "$output" == *"gh api PATCH repos/petry-projects/.github/git/refs/tags/auto-rebase/stable"* ]] + [[ "$output" == *"gh api PATCH repos/combsmith/.github/git/refs/tags/auto-rebase/stable"* ]] [[ "$output" != *"git tag -f"* ]] } @@ -1649,17 +1649,17 @@ GITEOF [ "$status" -eq 0 ] [[ "$output" == *"promoted auto-rebase/stable"* ]] # The move went through gh api PATCH on the HOST, never local git tag/push. - grep -q "PATCH repos/petry-projects/.github/git/refs/tags/auto-rebase/stable" "$MOVE_LOG" + grep -q "PATCH repos/combsmith/.github/git/refs/tags/auto-rebase/stable" "$MOVE_LOG" ! grep -q "^LOCAL:" "$MOVE_LOG" # The move is exposed for the workflow's GitHub Deployment step (#502). grep -q "promoted_agent=auto-rebase" "$out" grep -q "promoted_ring=stable" "$out" # promoted_host is the OWNING repo (the cross-repo host), so the deployment is created # where the moved commit exists — not GITHUB_REPOSITORY, which would 422 "No ref found" (#1059). - grep -q "promoted_host=petry-projects/.github" "$out" + grep -q "promoted_host=combsmith/.github" "$out" # The promotions log gets one TSV line per move (agent, ring, sha, owning-repo) so a # promote-all run can record a deployment for EVERY promotion, not just the last. - grep -qP "^auto-rebase\tstable\t[0-9a-f]+\tpetry-projects/\.github$" "$plog" + grep -qP "^auto-rebase\tstable\t[0-9a-f]+\tcombsmith/\.github$" "$plog" } @test "orchestrator: cross-repo promote --dry-run shows the host move but touches neither git nor the API (#1054)" { @@ -1668,7 +1668,7 @@ GITEOF [ "$status" -eq 0 ] [[ "$output" == *"DRY-RUN"* ]] [[ "$output" == *"auto-rebase/stable"* ]] - [[ "$output" == *"petry-projects/.github"* ]] + [[ "$output" == *"combsmith/.github"* ]] [ ! -f "$MOVE_LOG" ] } @@ -1683,7 +1683,7 @@ GITEOF [ "$status" -eq 1 ] # the failed write surfaces as a non-zero run [[ "$output" == *"::error::failed to move"* ]] # One failure-log line: agent, ring, candidate sha, owning host, and a reason (5 columns). - grep -qP "^auto-rebase\tstable\t[0-9a-f]+\tpetry-projects/\.github\t.+" "$flog" + grep -qP "^auto-rebase\tstable\t[0-9a-f]+\tcombsmith/\.github\t.+" "$flog" } @test "orchestrator: a gate-BLOCKED promotion writes NOTHING to the failure log (#1023)" { @@ -1734,7 +1734,7 @@ GHEOF @test "_gh_move_tag: surfaces the API rejection and does NOT fall back to POST on a non-404 PATCH failure (#743)" { _move_tag_stub reject - run bash -c "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + run bash -c "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -ne 0 ] [[ "$output" == *"::error::"* ]] [[ "$output" == *"blocked by ruleset release-channel-tags"* ]] @@ -1744,7 +1744,7 @@ GHEOF @test "_gh_move_tag: a successful PATCH moves the tag and never falls back to POST (#743)" { _move_tag_stub ok - run bash -c "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + run bash -c "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -eq 0 ] grep -q '^PATCH$' "$CALL_LOG" ! grep -q '^POST$' "$CALL_LOG" @@ -1753,7 +1753,7 @@ GHEOF @test "_gh_move_tag: falls back to POST (create) when the ref is genuinely absent (404) (#743)" { _move_tag_stub absent ok - run bash -c "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + run bash -c "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -eq 0 ] grep -q '^PATCH$' "$CALL_LOG" grep -q '^POST$' "$CALL_LOG" @@ -1761,7 +1761,7 @@ GHEOF @test "_gh_move_tag: surfaces the create error when the 404 POST fallback also fails (#743)" { _move_tag_stub absent reject - run bash -c "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + run bash -c "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -ne 0 ] [[ "$output" == *"::error::"* ]] [[ "$output" == *"Validation Failed"* ]] @@ -1791,7 +1791,7 @@ GHEOF @test "_gh_move_tag: routes the PATCH through CANARY_WRITE_TOKEN when set (#745)" { _token_capture_stub run env GH_TOKEN=owner-wide CANARY_WRITE_TOKEN=repo-scoped bash -c \ - "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -eq 0 ] grep -q 'PATCH.*repo-scoped' "$TOKEN_LOG" ! grep -q 'PATCH.*owner-wide' "$TOKEN_LOG" @@ -1800,7 +1800,7 @@ GHEOF @test "_gh_move_tag: falls back to the ambient GH_TOKEN when CANARY_WRITE_TOKEN is unset (#745)" { _token_capture_stub run env -u CANARY_WRITE_TOKEN GH_TOKEN=owner-wide bash -c \ - "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -eq 0 ] grep -q 'PATCH.*owner-wide' "$TOKEN_LOG" } @@ -1808,7 +1808,7 @@ GHEOF @test "_gh_create_annotated_tag: routes the object create + ref publish through CANARY_WRITE_TOKEN when set (#745)" { _token_capture_stub run env GH_TOKEN=owner-wide CANARY_WRITE_TOKEN=repo-scoped bash -c \ - "source '$ORCH' && _gh_create_annotated_tag petry-projects/.github agent-shield/v2.0.0 12b0075a9c48000000000000000000000000000 'agent-shield release v2.0.0'" + "source '$ORCH' && _gh_create_annotated_tag combsmith/.github agent-shield/v2.0.0 12b0075a9c48000000000000000000000000000 'agent-shield release v2.0.0'" [ "$status" -eq 0 ] # both the git/tags object create and the git/refs publish must carry the write token [ "$(grep -c 'repo-scoped' "$TOKEN_LOG")" -ge 2 ] @@ -1846,7 +1846,7 @@ case "\$*" in printf 'HTTP/2.0 403 Forbidden\r\n' printf 'X-Accepted-GitHub-Permissions: contents=write; contents=read\r\n' printf '\r\n' - echo '{"full_name":"petry-projects/.github"}' + echo '{"full_name":"combsmith/.github"}' exit 0 ;; *"installation/repositories"*) echo "DIAG_INSTALL" >> "$CALL_LOG" @@ -1861,7 +1861,7 @@ GHEOF @test "_gh_move_tag: on a 403 dumps the effective-permission diagnostic then surfaces the error (#749)" { _diag_403_stub selected run env GH_TOKEN=owner-wide CANARY_WRITE_TOKEN=repo-scoped bash -c \ - "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -ne 0 ] [[ "$output" == *"effective-permission diagnostic"* ]] [[ "$output" == *"X-Accepted-GitHub-Permissions: contents=write"* ]] @@ -1876,7 +1876,7 @@ GHEOF @test "_gh_move_tag: the 403 diagnostic introspects through CANARY_WRITE_TOKEN (#749)" { _diag_403_stub selected run env GH_TOKEN=owner-wide CANARY_WRITE_TOKEN=repo-scoped bash -c \ - "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" grep -q 'installation/repositories.*repo-scoped' "$TOKEN_LOG" ! grep -q 'installation/repositories.*owner-wide' "$TOKEN_LOG" } @@ -1884,14 +1884,14 @@ GHEOF @test "_gh_move_tag: the 403 diagnostic reports the higher total_count for an owner-wide installation token (#749)" { _diag_403_stub all run env GH_TOKEN=owner-wide CANARY_WRITE_TOKEN=repo-scoped bash -c \ - "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [[ "$output" == *"total_count=50"* ]] [[ "$output" != *"total_count=2"* ]] } @test "_gh_move_tag: a non-403 (422 ruleset) failure does NOT trigger the 403 diagnostic (#749)" { _move_tag_stub reject - run bash -c "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + run bash -c "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -ne 0 ] [[ "$output" != *"effective-permission diagnostic"* ]] [[ "$output" == *"::error::"* ]] @@ -1914,7 +1914,7 @@ esac GHEOF chmod +x "$STUB_BIN/gh" run env GH_TOKEN=tok bash -c \ - "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -ne 0 ] [[ "$output" == *"effective-permission diagnostic"* ]] # Must not print a jq error about parse failure @@ -1939,7 +1939,7 @@ esac GHEOF chmod +x "$STUB_BIN/gh" run env GH_TOKEN=tok bash -c \ - "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -ne 0 ] [[ "$output" == *"effective-permission diagnostic"* ]] [[ "$output" != *"parse error"* ]] @@ -1990,7 +1990,7 @@ case "\$*" in *"run list"*) $run_list_case ;; *"run view"*) echo '{"jobs":[{"steps":[{"name":"Some step","conclusion":"failure"}]}]}' ;; "issue list"*) echo '$blocker_list' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/777" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/777" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -2009,7 +2009,7 @@ GHEOF # Pin GITHUB_STEP_SUMMARY to a temp file — under CI the runner sets it, so the table lands # in the summary, not stdout; asserting the file keeps the test env-independent. local summ="$BATS_TEST_TMPDIR/summary.md"; : > "$summ" - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues --dry-run + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues --dry-run [ "$status" -eq 0 ] [[ "$output" == *"would OPEN blocker issue for dev-lead"* ]] grep -q "Canary Rollout — fleet status" "$summ" # table still renders under --dry-run @@ -2019,7 +2019,7 @@ GHEOF @test "orchestrator: sync-issues opens ONE blocker issue (with evidence) + writes the fleet summary — no dashboard issue" { _sync_stub failure '[]' local summ="$BATS_TEST_TMPDIR/summary.md"; : > "$summ" - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"opened blocker issue #777 for dev-lead"* ]] [[ "$output" == *"wrote fleet-status table to the job summary"* ]] @@ -2044,7 +2044,7 @@ GHEOF _sync_stub failure '[]' sed 's#"issue create"\*).*#"issue create"*) echo "gh: HTTP 403 (Issues:write?)" >\&2; exit 1 ;;#' "$STUB_BIN/gh" > "$STUB_BIN/gh.tmp" && mv "$STUB_BIN/gh.tmp" "$STUB_BIN/gh" && chmod +x "$STUB_BIN/gh" local summ="$BATS_TEST_TMPDIR/summary_fail.md"; : > "$summ" - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"could not open blocker issue for dev-lead (Issues:write on the App?)"* ]] [[ "$output" == *"wrote fleet-status table to the job summary"* ]] @@ -2055,7 +2055,7 @@ GHEOF @test "orchestrator: sync-issues auto-closes a cleared agent's open blocker issue" { # dev-lead now clean (success → not BLOCKED) but an OPEN blocker issue #501 exists → close it. _sync_stub success '[{"number":501,"state":"OPEN","body":""}]' - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"closed cleared blocker issue #501 for dev-lead"* ]] grep -q "CLOSE|.*501" "$ISSUE_LOG" @@ -2067,7 +2067,7 @@ GHEOF _sync_stub success '[]' local summ="$BATS_TEST_TMPDIR/summary_sep.md" printf 'prior step output (no trailing newline)' > "$summ" - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] # The header must appear at the start of a line — not concatenated onto the prior content. grep -q '^# Canary Rollout' "$summ" @@ -2086,7 +2086,7 @@ _promo_fail_sync_stub() { #!/usr/bin/env bash case "\$*" in "issue list"*) echo '$issue_list' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github/issues/900" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github/issues/900" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -2099,8 +2099,8 @@ GHEOF @test "orchestrator: sync-promotion-failures opens a tracking issue on the FIRST failure — not yet escalated (#1023)" { _promo_fail_sync_stub '[]' - local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" - run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures + local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" + run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"opened promotion-failure issue #900 for dev-lead (count=1)"* ]] grep -q -- "--label canary-promotion-failure" "$ISSUE_LOG" @@ -2112,8 +2112,8 @@ GHEOF # An existing tracking issue already at count=1; another failure this run → count=2 = threshold. local existing='[{"number":901,"state":"OPEN","body":"\n"}]' _promo_fail_sync_stub "$existing" - local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" - run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTION_FAILURE_ESCALATE_AFTER=2 CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures + local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" + run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTION_FAILURE_ESCALATE_AFTER=2 CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"updated promotion-failure issue #901 for dev-lead (count=2)"* ]] grep -q -- "issue edit 901 .*--add-label dev-lead --add-label needs-human" "$ISSUE_LOG" @@ -2123,9 +2123,9 @@ GHEOF local existing='[{"number":903,"state":"OPEN","body":"\n"}]' _promo_fail_sync_stub "$existing" local flog="$BATS_TEST_TMPDIR/pf.tsv" slog="$BATS_TEST_TMPDIR/ok.tsv" - printf 'dev-lead\tstable\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" - printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\n' > "$slog" - run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTION_FAILURE_ESCALATE_AFTER=2 CANARY_PROMOTIONS_FAILED_LOG="$flog" CANARY_PROMOTIONS_LOG="$slog" bash "$ORCH" sync-promotion-failures + printf 'dev-lead\tstable\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" + printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\n' > "$slog" + run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTION_FAILURE_ESCALATE_AFTER=2 CANARY_PROMOTIONS_FAILED_LOG="$flog" CANARY_PROMOTIONS_LOG="$slog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"updated promotion-failure issue #903 for dev-lead (count=2)"* ]] ! grep -q "^CLOSE|" "$ISSUE_LOG" @@ -2135,9 +2135,9 @@ GHEOF # dev-lead succeeded this run (in the SUCCESS log) but an OPEN failure issue exists → close it. local existing='[{"number":902,"state":"OPEN","body":"\n"}]' _promo_fail_sync_stub "$existing" - local slog="$BATS_TEST_TMPDIR/ok.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\n' > "$slog" + local slog="$BATS_TEST_TMPDIR/ok.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\n' > "$slog" local flog="$BATS_TEST_TMPDIR/pf.tsv"; : > "$flog" - run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTIONS_LOG="$slog" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures + run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTIONS_LOG="$slog" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"closed recovered promotion-failure issue #902 for dev-lead"* ]] grep -q "CLOSE|.*902" "$ISSUE_LOG" @@ -2147,9 +2147,9 @@ GHEOF # dev-lead failed initially (in FAILED log) but succeeded later (in SUCCESS log); success takes precedence. local existing='[{"number":903,"state":"OPEN","body":"\n"}]' _promo_fail_sync_stub "$existing" - local slog="$BATS_TEST_TMPDIR/ok.tsv"; printf 'dev-lead\tring0\tdddddddddddddddd\tpetry-projects/.github-private\n' > "$slog" - local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" - run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTIONS_LOG="$slog" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures + local slog="$BATS_TEST_TMPDIR/ok.tsv"; printf 'dev-lead\tring0\tdddddddddddddddd\tcombsmith/.github-private\n' > "$slog" + local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" + run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTIONS_LOG="$slog" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"closed recovered promotion-failure issue #903 for dev-lead"* ]] grep -q "CLOSE|.*903" "$ISSUE_LOG" @@ -2160,9 +2160,9 @@ GHEOF # FAILED (its tracking issue stays/gets opened), not "recovered". local existing='[{"number":905,"state":"OPEN","body":"\n"}]' _promo_fail_sync_stub "$existing" - local slog="$BATS_TEST_TMPDIR/ok.tsv"; printf 'dev-lead\tring0\tdddddddddddddddd\tpetry-projects/.github-private\n' > "$slog" - local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring1\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" - run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTIONS_LOG="$slog" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures + local slog="$BATS_TEST_TMPDIR/ok.tsv"; printf 'dev-lead\tring0\tdddddddddddddddd\tcombsmith/.github-private\n' > "$slog" + local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring1\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" + run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTIONS_LOG="$slog" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"updated promotion-failure issue #905 for dev-lead (count=2)"* ]] [[ "$output" != *"closed recovered"* ]] @@ -2175,8 +2175,8 @@ GHEOF # the first new failure after recovery should start at count=1 (not count=6). local existing='[{"number":904,"state":"CLOSED","body":"\n"}]' _promo_fail_sync_stub "$existing" - local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" - run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTION_FAILURE_ESCALATE_AFTER=2 CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures + local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" + run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTION_FAILURE_ESCALATE_AFTER=2 CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"(count=1)"* ]] ! grep -q -- "--add-label needs-human" "$ISSUE_LOG" @@ -2184,8 +2184,8 @@ GHEOF @test "orchestrator: sync-promotion-failures --dry-run plans but writes nothing to GitHub (#1023)" { _promo_fail_sync_stub '[]' - local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" - run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures --dry-run + local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" + run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures --dry-run [ "$status" -eq 0 ] [[ "$output" == *"would OPEN promotion-failure issue for dev-lead"* ]] [ ! -s "$ISSUE_LOG" ] @@ -2193,7 +2193,7 @@ GHEOF @test "orchestrator: sync-promotion-failures is a clean no-op when no promotion was attempted (#1023)" { _promo_fail_sync_stub '[]' - run env ISSUE_REPO="petry-projects/.github" bash "$ORCH" sync-promotion-failures + run env ISSUE_REPO="combsmith/.github" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"no promotion attempts recorded this run"* ]] [ ! -s "$ISSUE_LOG" ] @@ -2263,7 +2263,7 @@ GITEOF } @test "orchestrator: autocut is a no-op when CANARY_AUTO_CUT is not 'true' (kill-switch off)" { - _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" run env CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] @@ -2272,18 +2272,18 @@ GITEOF } @test "orchestrator: autocut cuts a patch-bumped version + moves next when the reusable blob differs on main" { - _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # Highest existing tag is v2.1.0 → patch bump → v2.1.1, annotated tag cut from main HEAD on the # HOST repo (.github-private for dev-lead), then `next` force-moved onto the same commit — all gh-api. - grep -q "repos/petry-projects/.github-private/git/tags .*tag=dev-lead/v2.1.1 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "repos/combsmith/.github-private/git/tags .*tag=dev-lead/v2.1.1 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" } @test "orchestrator: autocut is idempotent — identical blob on main and next is a clean no-op" { - _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ sameBLOB sameBLOB aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] @@ -2292,7 +2292,7 @@ GITEOF } @test "orchestrator: autocut --dry-run prints the intended cut without writing any tag" { - _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut --dry-run [ "$status" -eq 0 ] @@ -2302,25 +2302,25 @@ GITEOF } @test "orchestrator: autocut honors the registry autocut.bump override (minor)" { - _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" minor run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # minor bump of v2.1.0 → v2.2.0 - grep -q "repos/petry-projects/.github-private/git/tags .*tag=dev-lead/v2.2.0 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "repos/combsmith/.github-private/git/tags .*tag=dev-lead/v2.2.0 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" } @test "orchestrator: autocut is cross-repo aware — cuts v2.1.1 for auto-rebase on the host repo (#1069)" { - # auto-rebase is hosted in petry-projects/.github; its next candidate + release tags live there, + # auto-rebase is hosted in combsmith/.github; its next candidate + release tags live there, # so the next commit is resolved via gh api (not local git) and BOTH the tag create and the # next move are written to that host — not GITHUB_REPOSITORY. - _autocut_stub auto-rebase petry-projects/.github .github/workflows/auto-rebase-reusable.yml \ + _autocut_stub auto-rebase combsmith/.github .github/workflows/auto-rebase-reusable.yml \ ece45480ece45480ece45480ece45480ece45480 2763750027637500276375002763750027637500 \ ece45480ece45480ece45480ece45480ece45480 2763750027637500276375002763750027637500 "2.1.0" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] - grep -q "repos/petry-projects/.github/git/tags .*tag=auto-rebase/v2.1.1 .*object=ece45480ece45480ece45480ece45480ece45480" "$GH_LOG" - grep -q "PATCH repos/petry-projects/.github/git/refs/tags/auto-rebase/next .*sha=ece45480ece45480ece45480ece45480ece45480" "$GH_LOG" + grep -q "repos/combsmith/.github/git/tags .*tag=auto-rebase/v2.1.1 .*object=ece45480ece45480ece45480ece45480ece45480" "$GH_LOG" + grep -q "PATCH repos/combsmith/.github/git/refs/tags/auto-rebase/next .*sha=ece45480ece45480ece45480ece45480ece45480" "$GH_LOG" } @test "orchestrator: autocut — existing release tag matching mainsha skips create and still moves next (idempotent retry)" { @@ -2328,7 +2328,7 @@ GITEOF # mainsha), but `next` was not yet moved. The idempotency branch must skip POST git/tags # and proceed straight to the PATCH for next without calling _gh_create_annotated_tag. local mainsha="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT "$mainsha" cccccccccccccccccccccccccccccccccccccccc "2.1.0" "" "$mainsha" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] @@ -2346,7 +2346,7 @@ GITEOF # invariant. The engine must warn and skip rather than advance next to an untagged commit. local mainsha="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" local stale_sha="dddddddddddddddddddddddddddddddddddddddd" - _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT "$mainsha" cccccccccccccccccccccccccccccccccccccccc "2.1.0" "" "$stale_sha" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] @@ -2393,18 +2393,18 @@ GITEOF # The stub answers `gh api repos//contents/.github/workflows` with a per-host JSON # array (env HOSTPRIV_JSON / HOSTPUB_JSON); the orchestrator filters *-reusable.yml itself. _drift_stub() { - # $1 = JSON array for petry-projects/.github-private ; $2 = JSON array for petry-projects/.github + # $1 = JSON array for combsmith/.github-private ; $2 = JSON array for combsmith/.github local priv_json="$1" pub_json="${2:-[]}" STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")"; export PATH="$STUB_BIN:$PATH" # '.github' is a substring of '.github-private', so match the more specific repo FIRST. cat > "$STUB_BIN/gh" < "$DRIFT_RINGS" # host has dev-lead (registered) + foo (unmanaged) + bar (genuinely unregistered) _drift_stub '[ @@ -2461,9 +2461,9 @@ _drift_rings_one_agent() { [ "$status" -eq 0 ] # foo is reported as unmanaged, NOT flagged as unregistered drift [[ "$output" == *"unmanaged (intentional"* ]] - [[ "$output" != *"DRIFT[unregistered] petry-projects/.github-private: .github/workflows/foo-reusable.yml"* ]] + [[ "$output" != *"DRIFT[unregistered] combsmith/.github-private: .github/workflows/foo-reusable.yml"* ]] # bar (neither registered nor unmanaged) IS still flagged, and it's the ONLY one - [[ "$output" == *"DRIFT[unregistered] petry-projects/.github-private: .github/workflows/bar-reusable.yml"* ]] + [[ "$output" == *"DRIFT[unregistered] combsmith/.github-private: .github/workflows/bar-reusable.yml"* ]] [[ "$output" == *"1 unregistered"* ]] } @@ -2491,7 +2491,7 @@ _drift_rings_one_agent() { @test "orchestrator: drift does NOT false-flag a present grandfathered-named reusable (pr-review.yml, #1166)" { DRIFT_RINGS="$BATS_TEST_TMPDIR/drift-grandfathered.json" jq '{version, description, org_infra_repos, member_tokens, - agents: {"pr-review": (.agents["dev-lead"] + {host: "petry-projects/.github-private", + agents: {"pr-review": (.agents["dev-lead"] + {host: "combsmith/.github-private", reusable: ".github/workflows/pr-review.yml"})}}' \ "$RINGS" > "$DRIFT_RINGS" # The host listing includes pr-review.yml (present, but not `-reusable.yml`). @@ -2503,7 +2503,7 @@ _drift_rings_one_agent() { [ "$status" -eq 0 ] # pr-review.yml is registered AND present → neither missing-file nor unregistered. [[ "$output" != *"DRIFT[missing-file]"* ]] - [[ "$output" != *"DRIFT[unregistered] petry-projects/.github-private: .github/workflows/pr-review.yml"* ]] + [[ "$output" != *"DRIFT[unregistered] combsmith/.github-private: .github/workflows/pr-review.yml"* ]] [[ "$output" == *"0 unregistered, 0 missing-file"* ]] } @@ -2513,7 +2513,7 @@ _drift_rings_one_agent() { @test "orchestrator: drift still reports a registered grandfathered reusable that is truly gone (#1166)" { DRIFT_RINGS="$BATS_TEST_TMPDIR/drift-grandfathered-gone.json" jq '{version, description, org_infra_repos, member_tokens, - agents: {"pr-review": (.agents["dev-lead"] + {host: "petry-projects/.github-private", + agents: {"pr-review": (.agents["dev-lead"] + {host: "combsmith/.github-private", reusable: ".github/workflows/pr-review.yml"})}}' \ "$RINGS" > "$DRIFT_RINGS" # Host listing does NOT contain pr-review.yml — the file is genuinely gone. @@ -2531,7 +2531,7 @@ _drift_rings_one_agent() { @test "orchestrator: drift still flags a registered non-YAML path even when present on the host" { DRIFT_RINGS="$BATS_TEST_TMPDIR/drift-nonyaml.json" jq '{version, description, org_infra_repos, member_tokens, - agents: {"pr-review": (.agents["dev-lead"] + {host: "petry-projects/.github-private", + agents: {"pr-review": (.agents["dev-lead"] + {host: "combsmith/.github-private", reusable: ".github/workflows/README.md"})}}' \ "$RINGS" > "$DRIFT_RINGS" _drift_stub '[ @@ -2566,7 +2566,7 @@ _drift_rings_one_agent() { # A scaffold JSON object keyed by the derived agent name 'foo' the maintainer can fill in. [[ "$output" == *"\"foo\""* ]] [[ "$output" == *"\"reusable\": \".github/workflows/foo-reusable.yml\""* ]] - [[ "$output" == *"petry-projects/.github-private"* ]] + [[ "$output" == *"combsmith/.github-private"* ]] } @test "orchestrator: drift skips a host it cannot enumerate — no false missing-file avalanche" { @@ -2656,8 +2656,8 @@ GITEOF [[ "$output" == *"pr-review"* ]] # a registered agent (dev-lead) and the reserved `standards` namespace are NOT flagged; # a release tag (pr-review/v1.8.0) is not a channel tag and never drives this verdict. - [[ "$output" != *"registry-incomplete] petry-projects/.github-private: 'dev-lead'"* ]] - [[ "$output" != *"registry-incomplete] petry-projects/.github-private: 'standards'"* ]] + [[ "$output" != *"registry-incomplete] combsmith/.github-private: 'dev-lead'"* ]] + [[ "$output" != *"registry-incomplete] combsmith/.github-private: 'standards'"* ]] # exactly one completeness finding (pr-review), counted once across both repos. [[ "$output" == *"registry-completeness summary: 1"* ]] } @@ -2673,7 +2673,7 @@ GITEOF #!/usr/bin/env bash case "$*" in *".github-private/git/matching-refs/tags"*) echo '[]' ;; - *"petry-projects/.github/git/matching-refs/tags"*) + *"combsmith/.github/git/matching-refs/tags"*) # Unregistered-agent tags ONLY on the public .github repo: a sweep that skips it would pass vacuously cat <<'JSON' [{"ref":"refs/tags/unregistered-agent/v1-next"},{"ref":"refs/tags/unregistered-agent/v1-stable"},{"ref":"refs/tags/dev-lead/v1-next"}] @@ -2756,8 +2756,8 @@ GITEOF [ "$status" -eq 0 ] [[ "$output" == *"DRIFT[registry-incomplete]"*"'bare-agent'"* ]] # registered (dev-lead), reserved (standards) and release-only tags are not flagged - [[ "$output" != *"registry-incomplete] petry-projects/.github-private: 'dev-lead'"* ]] - [[ "$output" != *"registry-incomplete] petry-projects/.github-private: 'standards'"* ]] + [[ "$output" != *"registry-incomplete] combsmith/.github-private: 'dev-lead'"* ]] + [[ "$output" != *"registry-incomplete] combsmith/.github-private: 'standards'"* ]] [[ "$output" != *"release-only"* ]] [[ "$output" == *"registry-completeness summary: 1"* ]] } @@ -3276,7 +3276,7 @@ case "\$*" in + [range(0;\$bt)|{databaseId:(1001+.),conclusion:(if . < \$bf then "failure" else "success" end),createdAt:\$bb,workflowName:"Dev-Lead Agent"}] ) | map(select(\$s=="" or .createdAt >= \$s))' ;; "issue list"*) echo '[]' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/777" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/777" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -3291,7 +3291,7 @@ GHEOF @test "orchestrator: sync-issues files a PRE_EXISTING blocker (no needs-human) for an auto-downgraded SUSPECT (#668 inc6)" { _downgrade_sync_stub 1 10 1 10 - run env CANARY_RINGS="$DG_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$DG_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"opened blocker issue #777 for dev-lead"* ]] # Body carries the auto-downgrade note + the candidate-vs-baseline rate comparison. @@ -3333,7 +3333,7 @@ case "\$*" in + [range(0;\$bt)|{databaseId:(1001+.),conclusion:(if . < \$bf then "failure" else "success" end),createdAt:\$bb,workflowName:"Dev-Lead Agent"}] ) | map(select(\$s=="" or .createdAt >= \$s))' ;; "issue list"*) echo '[{"number":501,"state":"OPEN","body":""}]' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/777" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/777" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -3350,7 +3350,7 @@ GHEOF # Existing open blocker #501 (was SUSPECT, has needs-human). Now auto-downgraded → PRE_EXISTING. # The update path must explicitly REMOVE needs-human so stale routing is cleared. _downgrade_sync_update_stub 1 10 1 10 - run env CANARY_RINGS="$DG_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$DG_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"updated blocker issue #501 for dev-lead"* ]] # PRE_EXISTING → must NOT add needs-human @@ -3475,7 +3475,7 @@ GHEOF # The blocker body must surface the workload-timeout discriminating question prominently # so a human confirm is a fast check, and keep the SUSPECT label + needs-human routing. run env CANARY_RINGS="$RINGS" bash -c \ - "source '$ORCH' && _blocker_body dev-lead 'next->ring0' cccccccccccc 1 0 SUSPECT petry-projects/.github-private '_(evidence)_'" + "source '$ORCH' && _blocker_body dev-lead 'next->ring0' cccccccccccc 1 0 SUSPECT combsmith/.github-private '_(evidence)_'" [ "$status" -eq 0 ] [[ "$output" == *"SUSPECT"* ]] [[ "$output" == *"needs-human"* ]] @@ -3485,7 +3485,7 @@ GHEOF @test "_blocker_body: PRE_EXISTING triage still renders the genuine pre-existing banner" { # Regression guard: a real PRE_EXISTING triage must keep its banner + fix-forward note. run env CANARY_RINGS="$RINGS" bash -c \ - "source '$ORCH' && _blocker_body dev-lead 'next->ring0' cccccccccccc 1 0 PRE_EXISTING petry-projects/.github-private '_(evidence)_'" + "source '$ORCH' && _blocker_body dev-lead 'next->ring0' cccccccccccc 1 0 PRE_EXISTING combsmith/.github-private '_(evidence)_'" [ "$status" -eq 0 ] [[ "$output" == *"PRE_EXISTING"* ]] [[ "$output" == *"byte-identical"* ]] @@ -3495,7 +3495,7 @@ GHEOF # Fail-closed path (_frontier_state, cut_z empty): state=BLOCKED, triage="-", cum_fail=0. # The body must not falsely assert an environmental/byte-identical failure — there is none. run env CANARY_RINGS="$RINGS" bash -c \ - "source '$ORCH' && _blocker_body ci-failure-analyst 'next->ring0' df3b7d462460 0 0 - petry-projects/.github-private '_(no candidate cut date resolved — cannot list failing runs)_'" + "source '$ORCH' && _blocker_body ci-failure-analyst 'next->ring0' df3b7d462460 0 0 - combsmith/.github-private '_(no candidate cut date resolved — cannot list failing runs)_'" [ "$status" -eq 0 ] [[ "$output" != *"PRE_EXISTING"* ]] [[ "$output" != *"byte-identical"* ]] @@ -3550,7 +3550,7 @@ case "\$*" in *"run list"*) jq -nc --arg d "$run_iso" '[range(3)|{conclusion:"failure",createdAt:\$d,databaseId:88002,workflowName:"Dev-Lead Agent"}]' ;; *"run view"*) echo '{"jobs":[{"steps":[{"name":"Stage timeout (exit code 124)","conclusion":"failure"}]}]}' ;; "issue list"*) echo '$blocker_list' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/777" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/777" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -3590,7 +3590,7 @@ _sync_gap_stub() { # BLOCKED issue, triage REGRESSION (fail-closed), routed to dev-lead + needs-human. _sync_gap_stub '[]' local summ="$BATS_TEST_TMPDIR/summary_gap.md"; : > "$summ" - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" \ + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" \ CANARY_GH_RETRY_SLEEP=0 CANARY_GH_RETRIES=2 GITHUB_STEP_SUMMARY="$summ" \ bash "$ORCH" sync-issues [ "$status" -eq 0 ] @@ -3610,7 +3610,7 @@ _sync_gap_stub() { # An OPEN blocker exists for dev-lead. A fetch outage must NOT be read as 'cleared' and close # it — it must be UPDATED (kept open) and re-annotated with the gap. _sync_gap_stub '[{"number":501,"state":"OPEN","body":""}]' - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" \ + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" \ CANARY_GH_RETRY_SLEEP=0 CANARY_GH_RETRIES=2 bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"updated blocker issue #501 for dev-lead"* ]] @@ -3648,7 +3648,7 @@ _sync_gap_stub() { @test "orchestrator: sync-issues ends NON-ZERO when an agent's state is totally undeterminable (fail-closed, not a green no-op) (#820)" { # Force a total inability for the single registered agent and assert the step fails closed. _sync_gap_stub '[]' - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" \ + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" \ CANARY_GH_RETRY_SLEEP=0 CANARY_GH_RETRIES=2 bash -c " source '$ORCH' _frontier_state_resilient() { return 1; } @@ -3661,7 +3661,7 @@ _sync_gap_stub() { @test "orchestrator: sync-issues CREATE path applies needs-human for SUSPECT triage" { # No existing issue → create path; SUSPECT (differs=1 + suspect step) must add needs-human. _sync_suspect_stub '[]' - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"opened blocker issue #777 for dev-lead"* ]] grep -q -- "--add-label needs-human" "$ISSUE_LOG" @@ -3671,7 +3671,7 @@ _sync_gap_stub() { # Existing open blocker #501 → update path; SUSPECT triage must still add needs-human. # The create path was fixed in 4cd379b; this test pins the update-path parity contract. _sync_suspect_stub '[{"number":501,"state":"OPEN","body":""}]' - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"updated blocker issue #501 for dev-lead"* ]] grep -q -- "--add-label needs-human" "$ISSUE_LOG" @@ -3774,7 +3774,7 @@ GITEOF @test "_confirm_body: renders the compare diff link + the promote --confirm instruction" { run env CANARY_RINGS="$RINGS" bash -c \ - "source '$ORCH' && _confirm_body dev-lead 'ring1->stable' cccccccccccc bbbbbbbbbbbb petry-projects/.github-private 5 1" + "source '$ORCH' && _confirm_body dev-lead 'ring1->stable' cccccccccccc bbbbbbbbbbbb combsmith/.github-private 5 1" [ "$status" -eq 0 ] [[ "$output" == *"canary-confirm:dev-lead"* ]] # idempotency marker [[ "$output" == *"compare/bbbbbbbbbbbb...cccccccccccc"* ]] # stable -> candidate diff @@ -3784,7 +3784,7 @@ GITEOF @test "_confirm_body: gracefully handles empty prior (no prior stable release)" { run env CANARY_RINGS="$RINGS" bash -c \ - "source '$ORCH' && _confirm_body dev-lead 'ring1->stable' cccccccccccc '' petry-projects/.github-private 5 1" + "source '$ORCH' && _confirm_body dev-lead 'ring1->stable' cccccccccccc '' combsmith/.github-private 5 1" [ "$status" -eq 0 ] [[ "$output" == *"canary-confirm:dev-lead"* ]] [[ "$output" == *"(no prior stable release)"* ]] # fallback diff link @@ -3821,7 +3821,7 @@ case "\$*" in *"run list"*) jq -nc --arg d "$run_iso" '[range(20)|{conclusion:"success",createdAt:\$d,databaseId:88004,workflowName:"Dev-Lead Agent"}]' ;; *"run view"*) echo '{"jobs":[{"steps":[]}]}' ;; "issue list"*) echo '$issue_list' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/777" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/777" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -3837,7 +3837,7 @@ GHEOF @test "orchestrator: sync-issues opens a canary-confirm issue for an AWAITING_CONFIRMATION agent" { _confirm_sync_stub '[]' local summ="$BATS_TEST_TMPDIR/summary-confirm.md"; : > "$summ" - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"opened confirm issue #777 for dev-lead"* ]] # A SEPARATE issue keyed by the canary-confirm label + marker (not the blocker issue). @@ -3851,7 +3851,7 @@ GHEOF # dev-lead is at next->ring0 (PROMOTE, NOT require_confirmation) but an OPEN confirm issue # #502 lingers → it must be closed (the go/no-go no longer applies). _sync_stub success '[{"number":502,"state":"OPEN","body":""}]' - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"closed cleared confirm issue #502 for dev-lead"* ]] grep -q "CLOSE|.*502" "$ISSUE_LOG" @@ -3928,7 +3928,7 @@ case "\$*" in jq -nc --arg d "$run_iso" --arg c "\$__c" '[range(20)|{conclusion:\$c,createdAt:\$d,databaseId:88010,workflowName:"Dev-Lead Agent"}]' ;; *"run view"*) echo '{"jobs":[{"steps":[{"name":"Compile TypeScript","conclusion":"failure"}]}]}' ;; "issue list"*) echo '$issue_list' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/909" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/909" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -3945,7 +3945,7 @@ GHEOF # next=C1 cut 1h ago (next->ring0 SOAKING), ring0=ring1=C3 cut 30h ago, stable=prior. # ring1->stable must STILL be evaluated as AWAITING_CONFIRMATION even though `next` moved. _multicand_stub C1 C3 C3 PRIOR "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"ring1->stable"* ]] [[ "$output" == *"AWAITING_CONFIRMATION"* ]] @@ -3960,7 +3960,7 @@ GHEOF _multicand_stub C1 C3 C3 PRIOR "1 hours" "3 days" "30 hours" "" "" \ '[{"number":901,"state":"OPEN","body":""}]' local summ="$BATS_TEST_TMPDIR/mc-a.md"; : > "$summ" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] grep -q "EDIT|.*901" "$ISSUE_LOG" # the C3 confirm issue is refreshed, not closed run grep -q "CLOSE|.*901" "$ISSUE_LOG" # the hold survived the newer next cut @@ -3972,7 +3972,7 @@ GHEOF # next=C1 (soaking), ring0=ring1=C3 (AWAITING at ring1->stable). --confirm clears ONLY the # ring1->stable hold; the newer, still-soaking next candidate is untouched (AC4/AC7b). _multicand_stub C1 C3 C3 PRIOR "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --confirm --dry-run + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --confirm --dry-run [ "$status" -eq 0 ] # stable advances to ring1's candidate (C3 = eeee…), confirmed [[ "$output" == *"tags/dev-lead/stable sha=eeeeeeeeeeee"* ]] @@ -3984,7 +3984,7 @@ GHEOF @test "#1118: no tier skip — ring1 only ever advances to the commit currently on ring0" { # next=C1, ring0=C2, ring1=C3, stable=prior; every pair clean and old enough to PROMOTE. _multicand_stub C1 C2 C3 PRIOR "3 days" "40 hours" "30 hours" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --dry-run + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --dry-run [ "$status" -eq 0 ] # ring0 advances to next's commit (C1 = cccc…) [[ "$output" == *"tags/dev-lead/ring0 sha=cccccccccccc"* ]] @@ -3998,9 +3998,9 @@ GHEOF @test "#1118: a BLOCKED lower pair does not block an independently clean higher pair" { # next=C1 with a REGRESSION on the next tier (reusable differs + a failure there); # ring0=ring1=C3 independently clean → ring1->stable is AWAITING, unblocked by the lower pair. - _multicand_stub C1 C3 C3 PRIOR "3 days" "3 days" "30 hours" "petry-projects/.github-private" C1 + _multicand_stub C1 C3 C3 PRIOR "3 days" "3 days" "30 hours" "combsmith/.github-private" C1 local summ="$BATS_TEST_TMPDIR/mc-d.md"; : > "$summ" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] # lower pair blocked → its canary-blocker issue opens (REGRESSION at next->ring0) [[ "$output" == *"opened blocker issue"* ]] @@ -4013,8 +4013,8 @@ GHEOF @test "#1118: --override advances ONLY the lowest pending pair — never an AWAITING_CONFIRMATION pair for another candidate" { # next=C1 BLOCKED (REGRESSION), ring0=ring1=C3 AWAITING at ring1->stable. An operator --override of # the blocked newest candidate must not also push stable past the human go/no-go (#668 L3 stays). - _multicand_stub C1 C3 C3 PRIOR "3 days" "3 days" "30 hours" "petry-projects/.github-private" C1 - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --override --dry-run + _multicand_stub C1 C3 C3 PRIOR "3 days" "3 days" "30 hours" "combsmith/.github-private" C1 + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --override --dry-run [ "$status" -eq 0 ] [[ "$output" == *"tags/dev-lead/ring0 sha=cccccccccccc"* ]] # the overridden lowest pair advances [[ "$output" != *"tags/dev-lead/stable sha="* ]] # the higher pair keeps its own gate @@ -4024,7 +4024,7 @@ GHEOF @test "#1118: an UNRESOLVABLE source commit with a populated destination fails closed (BLOCKED), never a false COMPLETE" { # next has no resolvable tag but ring0 does: next->ring0 is pending and must hold BLOCKED. _multicand_stub NONE C3 C3 PRIOR "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"next->ring0"* ]] [[ "$output" == *"BLOCKED"* ]] @@ -4036,7 +4036,7 @@ GHEOF # every field, hiding BLOCKED), so sync-issues opens its blocker issue. _multicand_stub NONE C3 C3 PRIOR "1 hours" "3 days" "30 hours" local summ="$BATS_TEST_TMPDIR/mc-n.md"; : > "$summ" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"opened blocker issue"* ]] grep -q "BLOCKED" "$summ" @@ -4044,7 +4044,7 @@ GHEOF @test "#1118: promote --override never acts on an unresolvable candidate (no tag is moved to a sentinel)" { _multicand_stub NONE C3 C3 PRIOR "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --override --dry-run + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --override --dry-run [ "$status" -eq 0 ] [[ "$output" == *"unresolvable"* ]] [[ "$output" != *"tags/dev-lead/ring0 sha=-"* ]] @@ -4054,8 +4054,8 @@ GHEOF @test "#1118: a lower ring whose tag is UNRESOLVABLE stays in scope — its failures still block a higher pair (fail closed)" { # ring0 has no resolvable tag and its member (.github) is failing; ring1->stable must not shed # those failures just because ring0's commit is unknown rather than provably different. - _multicand_stub C1 NONE C3 PRIOR "3 days" "3 days" "30 hours" "repo petry-projects/.github --workflow" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead + _multicand_stub C1 NONE C3 PRIOR "3 days" "3 days" "30 hours" "repo combsmith/.github --workflow" + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"[ring1->stable]: BLOCKED"* ]] } @@ -4070,9 +4070,9 @@ GHEOF @test "#1225: _gh_tag_commit — an absent tag (404) is empty and NOT recorded as a lookup error" { STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")" # the tag ref 404s, but the host repo itself stays readable (so the 404 is a genuine absence) - printf '#!/usr/bin/env bash\ncase "$*" in *git/ref/tags/*) echo "gh: Not Found (HTTP 404)" >&2; exit 1 ;; *) echo petry-projects/.github ;; esac\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" + printf '#!/usr/bin/env bash\ncase "$*" in *git/ref/tags/*) echo "gh: Not Found (HTTP 404)" >&2; exit 1 ;; *) echo combsmith/.github ;; esac\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" local flag="$BATS_TEST_TMPDIR/tagfail"; : > "$flag" - run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit petry-projects/.github dev-lead/next" + run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit combsmith/.github dev-lead/next" [ "$status" -eq 0 ] [ -z "$output" ] [ ! -s "$flag" ] @@ -4082,7 +4082,7 @@ GHEOF STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")" printf '#!/usr/bin/env bash\necho "gh: Not Found (HTTP 404)" >&2; exit 1\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" local flag="$BATS_TEST_TMPDIR/tagfail"; : > "$flag" - run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit petry-projects/.github dev-lead/next 2>/dev/null" + run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit combsmith/.github dev-lead/next 2>/dev/null" [ "$status" -eq 0 ] grep -q "dev-lead/next" "$flag" } @@ -4091,7 +4091,7 @@ GHEOF STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")" printf '#!/usr/bin/env bash\necho "gh: repository not found (HTTP 500)" >&2; exit 1\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" local flag="$BATS_TEST_TMPDIR/tagfail"; : > "$flag" - run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit petry-projects/.github dev-lead/next 2>/dev/null" + run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit combsmith/.github dev-lead/next 2>/dev/null" [ "$status" -eq 0 ] grep -q "dev-lead/next" "$flag" } @@ -4099,7 +4099,7 @@ GHEOF @test "#1225: a lookup error whose flag write FAILS still reads as unknown in _ring_commits" { STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")" printf '#!/usr/bin/env bash\necho "gh: Server Error (HTTP 502)" >&2; exit 1\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" - run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="/nonexistent-dir/flag" bash -c "source '$ORCH'; _gh_tag_commit petry-projects/.github dev-lead/next 2>/dev/null" + run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="/nonexistent-dir/flag" bash -c "source '$ORCH'; _gh_tag_commit combsmith/.github dev-lead/next 2>/dev/null" [ "$status" -eq 0 ] [[ "$output" == *"!tag-lookup-error-unrecorded"* ]] } @@ -4108,7 +4108,7 @@ GHEOF STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")" printf '#!/usr/bin/env bash\necho "gh: Server Error (HTTP 502)" >&2; exit 1\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" local flag="$BATS_TEST_TMPDIR/tagfail"; : > "$flag" - run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit petry-projects/.github dev-lead/next 2>/dev/null" + run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit combsmith/.github dev-lead/next 2>/dev/null" [ "$status" -eq 0 ] # never fails the caller (every other call site keeps working) [ -z "$output" ] grep -q "dev-lead/next" "$flag" @@ -4125,7 +4125,7 @@ esac GHEOF chmod +x "$STUB_BIN/gh" local flag="$BATS_TEST_TMPDIR/tagfail"; : > "$flag" - run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit petry-projects/.github dev-lead/ring0 2>/dev/null" + run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit combsmith/.github dev-lead/ring0 2>/dev/null" [ "$status" -eq 0 ] [ -z "$output" ] grep -q "dev-lead/ring0" "$flag" @@ -4133,7 +4133,7 @@ GHEOF @test "#1225: a TOTAL tag-lookup outage holds BLOCKED and NEVER reports fully rolled out" { _multicand_stub ERR ERR ERR ERR "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"[next->ring0]: BLOCKED"* ]] [[ "$output" == *"[ring0->ring1]: BLOCKED"* ]] @@ -4144,7 +4144,7 @@ GHEOF @test "#1225: a TOTAL tag-lookup outage — promote moves nothing and does not report nothing-to-promote" { _multicand_stub ERR ERR ERR ERR "3 days" "3 days" "30 hours" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --dry-run + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --dry-run [ "$status" -eq 0 ] [[ "$output" == *"BLOCKED"* ]] [[ "$output" != *"fully rolled out"* ]] @@ -4154,7 +4154,7 @@ GHEOF @test "#1225: a TOTAL tag-lookup outage — promote --override still moves nothing" { _multicand_stub ERR ERR ERR ERR "3 days" "3 days" "30 hours" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --override --dry-run + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --override --dry-run [[ "$output" == *"a ring tag lookup errored; not promoting"* ]] [[ "$output" != *"advancing dev-lead"* ]] [[ "$output" != *"tags/dev-lead/"*" sha="* ]] @@ -4164,7 +4164,7 @@ GHEOF _multicand_stub ERR ERR ERR ERR "1 hours" "3 days" "30 hours" "" "" \ '[{"number":905,"state":"OPEN","body":""},{"number":906,"state":"OPEN","body":""}]' local summ="$BATS_TEST_TMPDIR/tg-a.md"; : > "$summ" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 1 ] [[ "$output" == *"tag lookup"* ]] grep -q "EDIT|.*905" "$ISSUE_LOG" # the open blocker is refreshed (held), never closed @@ -4177,7 +4177,7 @@ GHEOF @test "#1225: every tag genuinely ABSENT (404) keeps the legacy COMPLETE (#1118 AC6)" { _multicand_stub NONE NONE NONE NONE "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"fully rolled out"* ]] [[ "$output" != *"BLOCKED"* ]] @@ -4186,7 +4186,7 @@ GHEOF @test "#1225: sync-issues on an all-ABSENT (unseeded/legacy) agent is a clean COMPLETE, exit 0" { _multicand_stub NONE NONE NONE NONE "1 hours" "3 days" "30 hours" local summ="$BATS_TEST_TMPDIR/tg-b.md"; : > "$summ" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] grep -qF '| `dev-lead` | COMPLETE |' "$summ" run grep -q "CREATE|" "$ISSUE_LOG" # no blocker opened for an agent with no tags yet @@ -4197,7 +4197,7 @@ GHEOF # next errors; ring0=ring1=C3 (cut 30h) and stable=prior → ring1->stable is independently # AWAITING_CONFIRMATION exactly as in the all-resolved case; only next->ring0 is held. _multicand_stub ERR C3 C3 PRIOR "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"[next->ring0]: BLOCKED"* ]] [[ "$output" == *"[ring1->stable]: AWAITING_CONFIRMATION"* ]] @@ -4207,7 +4207,7 @@ GHEOF @test "#1225: an ERRORED destination lookup holds that pair — never PROMOTEs onto an unknown ring" { # stable errors; next=C1 clean and old enough to PROMOTE into ring0, which must still advance. _multicand_stub C1 C3 C3 ERR "3 days" "3 days" "30 hours" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --dry-run + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --dry-run [ "$status" -eq 0 ] [[ "$output" == *"tags/dev-lead/ring0 sha=cccccccccccc"* ]] [[ "$output" != *"tags/dev-lead/stable sha="* ]] @@ -4217,7 +4217,7 @@ GHEOF @test "#1225: sync-issues opens a tag-lookup blocker for a single errored pair and still exits non-zero" { _multicand_stub ERR C3 C3 PRIOR "1 hours" "3 days" "30 hours" local summ="$BATS_TEST_TMPDIR/tg-c.md"; : > "$summ" - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 1 ] [[ "$output" == *"opened blocker issue"* ]] grep -q "CREATE|.*tag lookup failed" "$ISSUE_LOG" @@ -4227,8 +4227,8 @@ GHEOF # The confirm issue's idempotency marker is keyed on the ring1 CANDIDATE (#1118 AC3), so a # recut ring1 candidate does not silently transfer a human's pending go/no-go to a new commit. @test "#1118: _confirm_body keys the canary-confirm marker on agent AND candidate" { - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$RINGS" bash -c \ - "source '$ORCH' && _confirm_body dev-lead 'ring1->stable' cafe1234cafe bbbbbbbbbbbb petry-projects/.github-private 5 1" + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$RINGS" bash -c \ + "source '$ORCH' && _confirm_body dev-lead 'ring1->stable' cafe1234cafe bbbbbbbbbbbb combsmith/.github-private 5 1" [ "$status" -eq 0 ] [[ "$output" == *""* ]] } @@ -4362,17 +4362,17 @@ _corr_cut() { date -u -d '-3 days' +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -v @test "_correctness_verdict: a gross candidate decision-mix shift → SHIFT" { _correctness_stub skip-checks-pending 20 dispatched 22 - run env CANARY_RINGS="$CORR_RINGS" bash -c "source '$ORCH' && _correctness_verdict dev-lead $_CORR_CAND '$(_corr_cut)' petry-projects/.github-private" + run env CANARY_RINGS="$CORR_RINGS" bash -c "source '$ORCH' && _correctness_verdict dev-lead $_CORR_CAND '$(_corr_cut)' combsmith/.github-private" [ "$status" -eq 0 ]; [ "$output" = "SHIFT" ] } @test "_correctness_verdict: candidate mix matches the baseline → OK (no effect)" { _correctness_stub dispatched 20 dispatched 22 - run env CANARY_RINGS="$CORR_RINGS" bash -c "source '$ORCH' && _correctness_verdict dev-lead $_CORR_CAND '$(_corr_cut)' petry-projects/.github-private" + run env CANARY_RINGS="$CORR_RINGS" bash -c "source '$ORCH' && _correctness_verdict dev-lead $_CORR_CAND '$(_corr_cut)' combsmith/.github-private" [ "$status" -eq 0 ]; [ "$output" = "OK" ] } @test "_correctness_verdict: candidate sample below the minimum → INSUFFICIENT (no-op)" { _correctness_stub dispatched 5 dispatched 22 - run env CANARY_RINGS="$CORR_RINGS" bash -c "source '$ORCH' && _correctness_verdict dev-lead $_CORR_CAND '$(_corr_cut)' petry-projects/.github-private" + run env CANARY_RINGS="$CORR_RINGS" bash -c "source '$ORCH' && _correctness_verdict dev-lead $_CORR_CAND '$(_corr_cut)' combsmith/.github-private" [ "$status" -eq 0 ]; [ "$output" = "INSUFFICIENT" ] } @@ -4442,7 +4442,7 @@ case "\$*" in + [range(1001;1001+\$bn)|{databaseId:.,conclusion:"success",createdAt:\$bb,workflowName:"Dev-Lead Agent"}] ) | map(select(\$s=="" or .createdAt >= \$s))' ;; "issue list"*) echo '$blocker_list' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/777" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/777" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -4458,7 +4458,7 @@ GHEOF @test "orchestrator: sync-issues renders the decision-mix table in the blocker for a correctness SHIFT (#668 L2)" { _correctness_sync_stub skip-checks-pending 20 dispatched 22 '[]' - run env CANARY_RINGS="$CORR_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$CORR_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"opened blocker issue #777 for dev-lead"* ]] # The blocker body (passed to `gh issue create --body`) carries the correctness note + mix table. @@ -4552,7 +4552,7 @@ case "\$*" in esac GHEOF chmod +x "$STUB_BIN/gh" - run bash -c "source '$ORCH' && _gh_candidate_cut_date petry-projects/.github-private dev-lead $_X" + run bash -c "source '$ORCH' && _gh_candidate_cut_date combsmith/.github-private dev-lead $_X" [ "$status" -eq 0 ] [ "$output" = "$_CUT" ] } @@ -4568,7 +4568,7 @@ case "\$*" in esac GHEOF chmod +x "$STUB_BIN/gh" - run bash -c "source '$ORCH' && _gh_candidate_cut_date petry-projects/.github-private dev-lead $_X" + run bash -c "source '$ORCH' && _gh_candidate_cut_date combsmith/.github-private dev-lead $_X" [ "$status" -eq 0 ] [ -z "$output" ] } @@ -4593,7 +4593,7 @@ case "\$*" in esac GHEOF chmod +x "$STUB_BIN/gh" - run bash -c "source '$ORCH' && _gh_candidate_cut_date petry-projects/.github-private dev-lead $_X" + run bash -c "source '$ORCH' && _gh_candidate_cut_date combsmith/.github-private dev-lead $_X" [ "$status" -eq 0 ] [ "$output" = "$_CUT" ] } @@ -4612,7 +4612,7 @@ esac GHEOF chmod +x "$STUB_BIN/gh" # GITHUB_REPOSITORY=.github forces THIS_REPO=.github, so dev-lead (host .github-private) is cross-repo. - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && candidate_cut_date dev-lead $_X" [ "$status" -eq 0 ] [ "$output" = "$_CUT" ] @@ -4637,7 +4637,7 @@ esac GITEOF chmod +x "$STUB_BIN/git" # auto-rebase host = .github == THIS_REPO → the local for-each-ref path. - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && candidate_cut_date auto-rebase $_X" [ "$status" -eq 0 ] [ "$output" = "$_CUT" ] @@ -4754,7 +4754,7 @@ GITEOF run env CANARY_RINGS="$RINGS" GITHUB_OUTPUT="$out" bash "$ORCH" promote dev-lead [ "$status" -eq 0 ] [[ "$output" == *"promoted dev-lead/v2-ring0"* ]] - grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/v2-ring0" "$MOVE_LOG" + grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/v2-ring0" "$MOVE_LOG" # A v2 promotion NEVER touches a v1-* tag. ! grep -q "v1-" "$MOVE_LOG" # promoted_ring stays the logical tier (ring0), not the major-scoped tag. @@ -4859,7 +4859,7 @@ GITEOF [ "$status" -eq 0 ] [[ "$output" == *"promoted dev-lead/ring0"* ]] [[ "$output" != *"v1-ring0"* ]] - grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/ring0 " "$MOVE_LOG" + grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/ring0 " "$MOVE_LOG" # a release major alone (no v-line seeded) must NOT sprout a v-scoped tag run grep -q "v1-" "$MOVE_LOG" [ "$status" -eq 1 ] @@ -4924,7 +4924,7 @@ GITEOF _channeldrift_stub # Force THIS_REPO=.github-private so persona-mention (host=.github) is cross-repo and resolves # its channel tags via gh api (the stub), not local git. - run env GITHUB_REPOSITORY="petry-projects/.github-private" CANARY_RINGS="$CHANNELDRIFT_RINGS" bash "$ORCH" drift + run env GITHUB_REPOSITORY="combsmith/.github-private" CANARY_RINGS="$CHANNELDRIFT_RINGS" bash "$ORCH" drift [ "$status" -eq 0 ] [[ "$output" == *"DRIFT[channel-tag]"* ]] [[ "$output" == *"persona-mention"* ]] @@ -4982,37 +4982,37 @@ GITEOF } @test "orchestrator: autocut of a MAJOR bump seeds a fresh v-next line, not the old next (#657 F4)" { - _f4_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _f4_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" major run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # major bump v2.1.0 → v3.0.0; the immutable release cut as usual, next seeded on the FRESH v3 line. grep -q "git/tags .*tag=dev-lead/v3.0.0 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" # The fresh major line does NOT move the old bare next (that would break the running fleet). ! grep -q "git/refs/tags/dev-lead/next " "$GH_LOG" } @test "orchestrator: autocut of a patch bump advances the current major's v2-next when that line exists (#657 F4)" { - _f4_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _f4_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" patch \ cccccccccccccccccccccccccccccccccccccccc run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # patch bump v2.1.0 → v2.1.1; the v2 line exists → next advances ON the major line, not bare next. grep -q "git/tags .*tag=dev-lead/v2.1.1 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/v2-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/v2-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" ! grep -q "git/refs/tags/dev-lead/next " "$GH_LOG" } @test "orchestrator: autocut of a patch bump falls back to bare next when no v-line exists yet (#657 F4)" { # Today's bare fleet: no v2-next tag → resolution falls back to bare next → byte-identical move. - _f4_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _f4_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" patch run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] grep -q "git/tags .*tag=dev-lead/v2.1.1 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" ! grep -q "git/refs/tags/dev-lead/v2-next" "$GH_LOG" } @@ -5107,14 +5107,14 @@ YML @test "orchestrator: autocut detects a feat! commit → MAJOR + seeds a fresh v-next (#712)" { local commits='[{"sha":"newcommit0000000000000000000000000000","commit":{"message":"feat!: drop the legacy dry_run input\n\nRemoves a caller-facing knob."}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' # interface unchanged (same yaml both refs) — the major comes purely from the commit signal. - _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$(_iface_yaml)" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # major bump v2.1.0 → v3.0.0; next seeded on the FRESH v3 line, old bare next untouched. grep -q "git/tags .*tag=dev-lead/v3.0.0 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" ! grep -q "git/refs/tags/dev-lead/next " "$GH_LOG" } @@ -5139,13 +5139,13 @@ jobs: steps: [] YML )" - _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$new_yaml" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] grep -q "git/tags .*tag=dev-lead/v3.0.0 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" } @test "orchestrator: autocut detects a newly-required workflow_call input → MAJOR (interface break) (#712)" { @@ -5175,7 +5175,7 @@ jobs: steps: [] YML )" - _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$new_yaml" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5210,7 +5210,7 @@ jobs: steps: [] YML )" - _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$new_yaml" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5222,7 +5222,7 @@ YML @test "orchestrator: autocut detects a fix-only change → PATCH (#712)" { local commits='[{"sha":"newcommit0000000000000000000000000000","commit":{"message":"fix: correct a log message"}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' - _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$(_iface_yaml)" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5233,7 +5233,7 @@ YML @test "orchestrator: autocut fails SAFE to PATCH when the commit-signal fetch errors (#712)" { # commits?path returns a non-array error payload → signal fetch fails → never auto-major. local commits='{"message":"Not Found","status":"404"}' - _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$(_iface_yaml)" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5245,13 +5245,13 @@ YML @test "orchestrator: autocut knob override forces MAJOR over a patch-only diff (#712)" { # Signals say patch (fix commit, no interface change) but the registry knob forces major. local commits='[{"sha":"newcommit0000000000000000000000000000","commit":{"message":"fix: small tweak"}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' - _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$(_iface_yaml)" major run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] grep -q "git/tags .*tag=dev-lead/v3.0.0 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" } # ── autocut bump-signal scoping + pagination + fail-safe (#1023 defect 1) ─────── @@ -5329,7 +5329,7 @@ _filler_page() { jq -nc '[range(100)|{sha:("f\(.)"),commit:{message:"chore: fill # `feat!` that would force a major touched an unrelated file (docs/), so it never appears in # `commits?path=` and must not move the bump. Scoping ⇒ patch, not major. local re1='[{"sha":"newcommit0000000000000000000000000000","commit":{"message":"fix: correct a log line"}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' - _scoped_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _scoped_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "2026-08-01T00:00:00Z" "$re1" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5343,7 +5343,7 @@ _filler_page() { jq -nc '[range(100)|{sha:("f\(.)"),commit:{message:"chore: fill # path carries a `feat!`. Multi-path union ⇒ major (a change to a watched dependency counts). local re1='[{"sha":"newcommit0000000000000000000000000000","commit":{"message":"fix: reusable tidy"}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' local ex1='[{"sha":"libcommit00000000000000000000000000000","commit":{"message":"feat!: drop the legacy shared entrypoint"}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' - _scoped_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _scoped_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "2026-08-01T00:00:00Z" "$re1" "[]" "$ex1" '["scripts/lib/shared.sh"]' run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5356,7 +5356,7 @@ _filler_page() { jq -nc '[range(100)|{sha:("f\(.)"),commit:{message:"chore: fill # BREAKING CHANGE commit are on page 2. If pagination stopped at the cap the break would ship as # a patch — the dangerous direction. Enumerating past the cap ⇒ major. local re2='[{"sha":"breaker000000000000000000000000000000000","commit":{"message":"feat: extend the matrix\n\nBREAKING CHANGE: the matrix input is now required."}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' - _scoped_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _scoped_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "2026-08-01T00:00:00Z" "$(_filler_page)" "$re2" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5368,7 +5368,7 @@ _filler_page() { jq -nc '[range(100)|{sha:("f\(.)"),commit:{message:"chore: fill # Every page is a full 100-commit page and the boundary is never reached within the page cap → # the range cannot be enumerated. It must NOT silently downgrade to patch: fail safe to major # with a ::warning::. - _scoped_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ + _scoped_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "2026-08-01T00:00:00Z" "$(_filler_page)" "$(_filler_page)" run env CANARY_AUTO_CUT=true CANARY_MAX_COMMIT_PAGES=2 CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5530,20 +5530,20 @@ GITEOF @test "orchestrator: autocut cuts on a SCRIPT-ONLY change (reusable blob identical) (#1019)" { local compare='{"files":[{"filename":"scripts/lib/dev-lead-retrigger.sh"}],"commits":[{"commit":{"message":"fix: forced dispatches survive sweep concurrency"}}]}' - _scriptonly_stub persona-mention petry-projects/.github .github/workflows/persona-mention-reusable.yml \ + _scriptonly_stub persona-mention combsmith/.github .github/workflows/persona-mention-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "1.2.0" "$compare" run env CANARY_AUTO_CUT=true CANARY_RINGS="$SCRIPTONLY_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # fix-only script change → patch bump v1.2.0 → v1.2.1, cut on the host + next moved. - grep -q "repos/petry-projects/.github/git/tags .*tag=persona-mention/v1.2.1 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/petry-projects/.github/git/refs/tags/persona-mention/next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "repos/combsmith/.github/git/tags .*tag=persona-mention/v1.2.1 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/combsmith/.github/git/refs/tags/persona-mention/next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" } @test "orchestrator: autocut does NOT cut when only a non-watched path changed (#1019)" { # reusable identical AND the only change is under docs/ (not scripts/prompts/personas/ or the # reusable) → nothing a consumer executes changed → no cut. local compare='{"files":[{"filename":"docs/notes.md"}],"commits":[{"commit":{"message":"docs: tidy"}}]}' - _scriptonly_stub persona-mention petry-projects/.github .github/workflows/persona-mention-reusable.yml \ + _scriptonly_stub persona-mention combsmith/.github .github/workflows/persona-mention-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "1.2.0" "$compare" run env CANARY_AUTO_CUT=true CANARY_RINGS="$SCRIPTONLY_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] @@ -5553,7 +5553,7 @@ GITEOF @test "orchestrator: autocut bump detection applies to a script-only feat → MINOR (#1019)" { local compare='{"files":[{"filename":"scripts/lib/dev-lead-retrigger.sh"}],"commits":[{"commit":{"message":"feat: add a --force retrigger mode"}}]}' - _scriptonly_stub persona-mention petry-projects/.github .github/workflows/persona-mention-reusable.yml \ + _scriptonly_stub persona-mention combsmith/.github .github/workflows/persona-mention-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "1.2.0" "$compare" run env CANARY_AUTO_CUT=true CANARY_RINGS="$SCRIPTONLY_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] @@ -5562,13 +5562,13 @@ GITEOF @test "orchestrator: autocut bump detection applies to a script-only feat! → MAJOR (#1019)" { local compare='{"files":[{"filename":"scripts/lib/dev-lead-retrigger.sh"}],"commits":[{"commit":{"message":"feat!: drop the legacy retrigger path"}}]}' - _scriptonly_stub persona-mention petry-projects/.github .github/workflows/persona-mention-reusable.yml \ + _scriptonly_stub persona-mention combsmith/.github .github/workflows/persona-mention-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "1.2.0" "$compare" run env CANARY_AUTO_CUT=true CANARY_RINGS="$SCRIPTONLY_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # major bump v1.2.0 → v2.0.0 seeded on a fresh v2-next line. grep -q "git/tags .*tag=persona-mention/v2.0.0 " "$GH_LOG" - grep -q "PATCH repos/petry-projects/.github/git/refs/tags/persona-mention/v2-next " "$GH_LOG" + grep -q "PATCH repos/combsmith/.github/git/refs/tags/persona-mention/v2-next " "$GH_LOG" } # ── _gh_move_tag: create the ref when the PATCH reports 422 "Reference does not exist" ── @@ -5577,7 +5577,7 @@ GITEOF # exist" (NOT 404). The mover must treat that as create-if-missing and POST the ref (#1019). @test "_gh_move_tag: creates the ref on a 422 'Reference does not exist' (#1019)" { _move_tag_stub noref ok - run bash -c "source '$ORCH' && _gh_move_tag petry-projects/.github persona-mention/ring0 8837cee9db2988837cee9db2988837cee9db298" + run bash -c "source '$ORCH' && _gh_move_tag combsmith/.github persona-mention/ring0 8837cee9db2988837cee9db2988837cee9db298" [ "$status" -eq 0 ] grep -q '^PATCH$' "$CALL_LOG" grep -q '^POST$' "$CALL_LOG" @@ -5693,7 +5693,7 @@ GHEOF # ci-failure-analyst): host-relative rings (next = the host) so `next`+`ring0` # span both org-infra repos whichever hosts the agent. @test "pr-review is registered with its .github-private host + engine reusable (#1166)" { - [ "$(jq -r '.agents["pr-review"].host' "$RINGS")" = "petry-projects/.github-private" ] + [ "$(jq -r '.agents["pr-review"].host' "$RINGS")" = "combsmith/.github-private" ] [ "$(jq -r '.agents["pr-review"].reusable' "$RINGS")" = ".github/workflows/pr-review.yml" ] # run_workflow must resolve the agent's runs for the gate's sample floor — non-empty. [ -n "$(jq -r '.agents["pr-review"].run_workflow // empty' "$RINGS")" ] @@ -5759,11 +5759,11 @@ GITEOF # persona-mention is cross-repo (host=.github); next resolves via gh api. next != main and a # scripts/ file differs between them → merged-but-unshipped. local compare='{"files":[{"filename":"scripts/lib/persona-mention.sh"}],"commits":[{"commit":{"message":"fix: x"}}]}' - _shipdrift_stub persona-mention petry-projects/.github \ + _shipdrift_stub persona-mention combsmith/.github \ cccccccccccccccccccccccccccccccccccccccc aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "$compare" # Force THIS_REPO=.github-private so persona-mention (host=.github) is cross-repo and resolves # its `next` channel tag via gh api (the stub), not local git (mirrors the #613 cross-repo tests). - run env GITHUB_REPOSITORY="petry-projects/.github-private" CANARY_RINGS="$SHIPDRIFT_RINGS" bash "$ORCH" drift + run env GITHUB_REPOSITORY="combsmith/.github-private" CANARY_RINGS="$SHIPDRIFT_RINGS" bash "$ORCH" drift [ "$status" -eq 0 ] [[ "$output" == *"DRIFT[unshipped]"* ]] [[ "$output" == *"persona-mention"* ]] @@ -5832,14 +5832,14 @@ GITEOF @test "_resolved_channel: release-major≠channel-major resolves to v1-ring0, never v14-ring0 nor bare ring0 (#1065)" { _divergent_major_stub # cross-repo (host=.github-private, THIS_REPO=.github) so channel tags resolve via gh api. - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && _resolved_channel_tag dev-lead ring0" [ "$status" -eq 0 ] [ "$output" = "dev-lead/v1-ring0" ] [ "$output" != "dev-lead/v14-ring0" ] [ "$output" != "dev-lead/ring0" ] # the resolved commit is the v1-ring0 tag's, never the bare ring0's (no fallback). - run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && _resolved_channel dev-lead ring0 | cut -f2" [ "$output" = "d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1" ] [ "$output" != "b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0" ] @@ -6836,7 +6836,7 @@ _ingress_frontier() { } @test "_blocker_body: UNRESOLVED triage explains the blind member, not a cut-date indeterminate (#1224)" { - run bash -c "source '$ORCH' && _blocker_body dev-lead 'next->ring0' cand 0 0 UNRESOLVED petry-projects/.github-private '- \`org/collapsed\` — ingress present'" + run bash -c "source '$ORCH' && _blocker_body dev-lead 'next->ring0' cand 0 0 UNRESOLVED combsmith/.github-private '- \`org/collapsed\` — ingress present'" [ "$status" -eq 0 ] [[ "$output" == *"UNRESOLVED"* ]] [[ "$output" == *"ingress_job"* ]] @@ -6935,7 +6935,7 @@ _ingress_registry_lint() { @test "registry lint: every registered ingress_job is a job of the canonical agent-ingress.yml template (#1246 item 10)" { if [ ! -f "$INGRESS_TEMPLATE" ]; then - skip "canonical template not published yet ($INGRESS_TEMPLATE; petry-projects/.github-private#1729 AC11(a)) — lint is dormant until it lands" + skip "canonical template not published yet ($INGRESS_TEMPLATE; combsmith/.github-private#1729 AC11(a)) — lint is dormant until it lands" fi run _ingress_registry_lint "$RINGS" "$INGRESS_TEMPLATE" [ "$status" -eq 0 ] || { echo "ingress_job not declared by the canonical ingress:"; echo "$output"; return 1; } diff --git a/tests/persona_mention.bats b/tests/persona_mention.bats index 9cc6c18d5..03d402392 100644 --- a/tests/persona_mention.bats +++ b/tests/persona_mention.bats @@ -22,7 +22,7 @@ manifest() { id: qa-lead name: QA Lead address: - handle: petry-projects/qa-lead + handle: combsmith/qa-lead triggers: default_mode: advisory opt_out_label: qa-lead:hands-off @@ -40,18 +40,18 @@ MENTION_ON=' - surface: mention # --- slug extraction ------------------------------------------------------- @test "pm_extract_slugs finds a handle in prose" { - run pm_extract_slugs "hey @petry-projects/qa-lead please look at this" + run pm_extract_slugs "hey @combsmith/qa-lead please look at this" [ "$status" -eq 0 ] [ "$output" = "qa-lead" ] } @test "pm_extract_slugs collapses duplicates so one mention dispatches once" { - run pm_extract_slugs "@petry-projects/qa-lead and again @petry-projects/qa-lead" + run pm_extract_slugs "@combsmith/qa-lead and again @combsmith/qa-lead" [ "$output" = "qa-lead" ] } @test "pm_extract_slugs finds several distinct personas, order preserved" { - run pm_extract_slugs "@petry-projects/qa-lead and @petry-projects/dev-lead" + run pm_extract_slugs "@combsmith/qa-lead and @combsmith/dev-lead" [ "${lines[0]}" = "qa-lead" ] [ "${lines[1]}" = "dev-lead" ] [ "${#lines[@]}" -eq 2 ] @@ -101,29 +101,29 @@ MENTION_ON=' - surface: mention } @test "pm_should_route blocks a comment authored by an agent (axis 1)" { - run pm_should_route donpetry-bot OWNER "@petry-projects/qa-lead please review" + run pm_should_route donpetry-bot OWNER "@combsmith/qa-lead please review" [ "$status" -ne 0 ] } @test "pm_should_route blocks a comment carrying the agent marker (axis 2)" { - run pm_should_route don-petry OWNER ' @petry-projects/dev-lead over to you' + run pm_should_route don-petry OWNER ' @combsmith/dev-lead over to you' [ "$status" -ne 0 ] } @test "pm_should_route blocks the combinatorial cross-persona loop" { # The failure mode §4.1 warns about: qa-lead answering a thread and mentioning # dev-lead. Marked AND bot-authored — either axis alone must stop it. - run pm_should_route donpetry-bot OWNER ' @petry-projects/dev-lead your turn' + run pm_should_route donpetry-bot OWNER ' @combsmith/dev-lead your turn' [ "$status" -ne 0 ] } @test "pm_should_route allows a trusted human addressing a persona" { - run pm_should_route don-petry OWNER "@petry-projects/qa-lead please review" + run pm_should_route don-petry OWNER "@combsmith/qa-lead please review" [ "$status" -eq 0 ] } @test "pm_should_route blocks an untrusted commenter" { - run pm_should_route drive-by NONE "@petry-projects/qa-lead please review" + run pm_should_route drive-by NONE "@combsmith/qa-lead please review" [ "$status" -ne 0 ] } @@ -220,7 +220,7 @@ MENTION_ON=' - surface: mention @test "pm_manifest_url builds the raw manifest path by convention" { run pm_manifest_url qa-lead - [ "$output" = "https://raw.githubusercontent.com/petry-projects/.github-private/main/personas/qa-lead/persona.yml" ] + [ "$output" = "https://raw.githubusercontent.com/combsmith/.github-private/main/personas/qa-lead/persona.yml" ] } @test "pm_manifest_url honours PERSONA_REF for testing against a branch" { @@ -235,7 +235,7 @@ MENTION_ON=' - surface: mention @test "pm_extract_slugs ignores a handle inside a fenced code block" { run pm_extract_slugs 'Example: ``` -@petry-projects/qa-lead review this +@combsmith/qa-lead review this ``` done' [ -z "$output" ] @@ -244,21 +244,21 @@ done' @test "pm_extract_slugs ignores a handle inside a tilde fence" { run pm_extract_slugs 'Example: ~~~ -@petry-projects/qa-lead review this +@combsmith/qa-lead review this ~~~ done' [ -z "$output" ] } @test "pm_extract_slugs ignores a handle in inline code" { - run pm_extract_slugs 'The handle is `@petry-projects/qa-lead` for QA.' + run pm_extract_slugs 'The handle is `@combsmith/qa-lead` for QA.' [ -z "$output" ] } @test "pm_extract_slugs ignores a handle in a blockquote (quote-reply)" { # GitHub's one-click Quote reply prefixes '>'. Re-running an agent over quoted # text is not what the quoter meant, and no recursion axis catches it. - run pm_extract_slugs '> @petry-projects/qa-lead please review + run pm_extract_slugs '> @combsmith/qa-lead please review Agreed.' [ -z "$output" ] @@ -267,7 +267,7 @@ Agreed.' @test "pm_extract_slugs still fires on a real mention beside a quote" { run pm_extract_slugs '> some earlier comment -@petry-projects/qa-lead thoughts?' +@combsmith/qa-lead thoughts?' [ "$output" = "qa-lead" ] } @@ -276,14 +276,14 @@ Agreed.' ``` npm test ``` -@petry-projects/qa-lead can you look?' +@combsmith/qa-lead can you look?' [ "$output" = "qa-lead" ] } @test "pm_should_route ignores a comment whose only handle is in a code fence" { run pm_should_route don-petry OWNER 'docs: ``` -@petry-projects/qa-lead +@combsmith/qa-lead ```' [ "$status" -ne 0 ] } @@ -346,7 +346,7 @@ YAML @test "pm_interaction_url builds the raw contract path by convention" { run pm_interaction_url qa-lead - [ "$output" = "https://raw.githubusercontent.com/petry-projects/.github-private/main/personas/qa-lead/interaction.yml" ] + [ "$output" = "https://raw.githubusercontent.com/combsmith/.github-private/main/personas/qa-lead/interaction.yml" ] } @test "pm_interaction_url honours PERSONA_REF for testing against a branch" { diff --git a/tests/standards_release.bats b/tests/standards_release.bats index 5587c1243..65e78e355 100644 --- a/tests/standards_release.bats +++ b/tests/standards_release.bats @@ -212,7 +212,7 @@ EOF #!/usr/bin/env bash case "$*" in "rev-parse HEAD") echo "2222222222222222222222222222222222222222" ;; - "config --get remote.origin.url") echo "https://github.com/petry-projects/.github.git" ;; + "config --get remote.origin.url") echo "https://github.com/combsmith/.github.git" ;; *) : ;; esac EOF diff --git a/tests/test_agent_rate_limit.bats b/tests/test_agent_rate_limit.bats index fad75469b..75eb18338 100644 --- a/tests/test_agent_rate_limit.bats +++ b/tests/test_agent_rate_limit.bats @@ -72,7 +72,7 @@ write_config() { } }, org_wide: {}, - exempt_actors: ["dependabot[bot]", "@petry-projects/org-leads"], + exempt_actors: ["dependabot[bot]", "@combsmith/org-leads"], exempt_labels: ["security"] }' >"$AGENT_RATE_LIMITS_CONFIG" } diff --git a/tests/test_agent_rate_limit_gate.bats b/tests/test_agent_rate_limit_gate.bats index a9941dc75..1ea168404 100644 --- a/tests/test_agent_rate_limit_gate.bats +++ b/tests/test_agent_rate_limit_gate.bats @@ -74,7 +74,7 @@ STUB circuit_breaker: { consecutive_failure_threshold: $cb_threshold, backoff_minutes: $cb_backoff } } }, org_wide: {}, - exempt_actors: ["dependabot[bot]", "@petry-projects/org-leads"], + exempt_actors: ["dependabot[bot]", "@combsmith/org-leads"], exempt_labels: ["security"] }' >"$AGENT_RATE_LIMITS_CONFIG" } @@ -102,7 +102,7 @@ STUB weekly_scoped: { kind: "weekly_scoped", pause_worthy: false } } } }, - exempt_actors: ["dependabot[bot]", "@petry-projects/org-leads"], + exempt_actors: ["dependabot[bot]", "@combsmith/org-leads"], exempt_labels: ["security"] }' >"$AGENT_RATE_LIMITS_CONFIG" } @@ -129,7 +129,7 @@ STUB weekly_scoped: { kind: "weekly_scoped", pause_worthy: false } } } }, - exempt_actors: ["dependabot[bot]", "@petry-projects/org-leads"], + exempt_actors: ["dependabot[bot]", "@combsmith/org-leads"], exempt_labels: ["security"] }' >"$AGENT_RATE_LIMITS_CONFIG" } @@ -381,7 +381,7 @@ refute_mutated() { export GH_RUNS_JSON GH_RUNS_JSON="$(runs_json 'failure@2026-09-01T00:04:00Z' 'failure@2026-09-01T00:03:00Z' 'failure@2026-09-01T00:02:00Z')" export GH_ISSUE_BODY="tracking issue, no marker yet" - run bash -c "SOURCE_NOW=1788221100 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" + run bash -c "SOURCE_NOW=1788221100 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=defer"* ]] # Exactly one comment posting the breaker marker, and the label applied. @@ -398,7 +398,7 @@ refute_mutated() { # Body already carries the marker for initiative-driver → no second post. export GH_ISSUE_BODY GH_ISSUE_BODY="prior escalation $(bash -c "source '$(cd "$BATS_TEST_DIRNAME/.." && pwd)/scripts/lib/agent-rate-limit.sh'; arl_breaker_marker initiative-driver")" - run bash -c "SOURCE_NOW=1788221100 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" + run bash -c "SOURCE_NOW=1788221100 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=defer"* ]] run grep -c 'issue comment' "$GH_STUB_LOG" @@ -413,7 +413,7 @@ refute_mutated() { export GH_RUNS_JSON GH_RUNS_JSON="$(runs_json 'failure@2026-09-01T00:04:00Z' 'failure@2026-09-01T00:03:00Z' 'failure@2026-09-01T00:02:00Z')" export GH_ISSUE_BODY="no marker" - run bash -c "DRY_RUN=true SOURCE_NOW=1788221100 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" + run bash -c "DRY_RUN=true SOURCE_NOW=1788221100 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=allow"* ]] refute_mutated @@ -463,7 +463,7 @@ refute_mutated() { @test "enforce: an allow decision issues no mutating gh subcommand" { write_config "initiative-driver" 1 10 20 3 30 export GH_RUNS_JSON; GH_RUNS_JSON="[]" - run bash -c "SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" + run bash -c "SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=allow"* ]] refute_mutated @@ -616,7 +616,7 @@ refute_mutated() { write_telemetry "$(envelope_limits 95 40)" export GH_RUNS_JSON; GH_RUNS_JSON="[]" export GH_ISSUE_BODY="tracking issue, no token marker yet" - run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" + run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=defer"* ]] run grep -c 'issue comment' "$GH_STUB_LOG" @@ -631,7 +631,7 @@ refute_mutated() { export GH_RUNS_JSON; GH_RUNS_JSON="[]" export GH_ISSUE_BODY GH_ISSUE_BODY="prior escalation $(bash -c "source '$(cd "$BATS_TEST_DIRNAME/.." && pwd)/scripts/lib/agent-rate-limit.sh'; arl_token_breaker_marker session")" - run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" + run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=defer"* ]] run grep -c 'issue comment' "$GH_STUB_LOG" @@ -648,7 +648,7 @@ refute_mutated() { export GH_ISSUE_BODY="tracking issue, no token marker in body" export GH_ISSUE_COMMENTS_JSON GH_ISSUE_COMMENTS_JSON="$(jq -n --arg m "$(bash -c "source '$(cd "$BATS_TEST_DIRNAME/.." && pwd)/scripts/lib/agent-rate-limit.sh'; arl_token_breaker_marker session")" '[{body: ("prior escalation " + $m)}]')" - run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" + run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=defer"* ]] run grep -c 'issue comment' "$GH_STUB_LOG" @@ -660,7 +660,7 @@ refute_mutated() { write_telemetry "$(envelope_limits 95 40)" export GH_RUNS_JSON; GH_RUNS_JSON="[]" export GH_ISSUE_BODY="tracking issue, no token marker yet" - run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' feature-ideation --mode log-only --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" + run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' feature-ideation --mode log-only --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=allow"* ]] refute_mutated diff --git a/tests/test_agent_rate_limit_ingress.bats b/tests/test_agent_rate_limit_ingress.bats index 5f81b4531..0df028025 100644 --- a/tests/test_agent_rate_limit_ingress.bats +++ b/tests/test_agent_rate_limit_ingress.bats @@ -243,9 +243,9 @@ seed_collapsed() { @test "concurrency: AGENT_RATE_LIMITS_ORG_REPOS tallies a mixed collapsed/non-collapsed fleet" { runs_fixture _local dev-lead '[{"status":"in_progress"},{"status":"in_progress"}]' # legacy: 2 - seed_collapsed petry-projects/markets # collapsed: 2 - runs_fixture petry-projects/other dev-lead '[{"status":"queued"},{"status":"completed"}]' # legacy: 1 - export AGENT_RATE_LIMITS_ORG_REPOS="petry-projects/markets, petry-projects/other" + seed_collapsed combsmith/markets # collapsed: 2 + runs_fixture combsmith/other dev-lead '[{"status":"queued"},{"status":"completed"}]' # legacy: 1 + export AGENT_RATE_LIMITS_ORG_REPOS="combsmith/markets, combsmith/other" run --separate-stderr bash -c 'source "$1"; arl_count_concurrent_runs dev-lead' _ "$LIB" [ "$status" -eq 0 ] [ "$output" = "5" ] @@ -253,16 +253,16 @@ seed_collapsed() { @test "concurrency: an unresolved OTHER org repo counts 0 with a warning (no org-wide wedge)" { runs_fixture _local dev-lead '[{"status":"in_progress"}]' - export AGENT_RATE_LIMITS_ORG_REPOS="petry-projects/ghost" + export AGENT_RATE_LIMITS_ORG_REPOS="combsmith/ghost" run --separate-stderr bash -c 'source "$1"; arl_count_concurrent_runs dev-lead' _ "$LIB" [ "$status" -eq 0 ] [ "$output" = "1" ] - [[ "$stderr" == *"petry-projects/ghost"* ]] + [[ "$stderr" == *"combsmith/ghost"* ]] } @test "concurrency: the gated (current) repo unresolved still fails closed even with healthy org repos" { - seed_collapsed petry-projects/markets - export AGENT_RATE_LIMITS_ORG_REPOS="petry-projects/markets" + seed_collapsed combsmith/markets + export AGENT_RATE_LIMITS_ORG_REPOS="combsmith/markets" run --separate-stderr bash -c 'source "$1"; arl_count_concurrent_runs dev-lead' _ "$LIB" [ "$status" -eq 3 ] [ "$output" = "unresolved" ] @@ -270,9 +270,9 @@ seed_collapsed() { @test "concurrency: a permission-caused bare 404 on a private org repo is transient, not permanently missing" { runs_fixture _local dev-lead '[{"status":"in_progress"}]' - : >"$GH_FIX/runs/petry-projects_private__dev-lead.forbidden" - : >"$GH_FIX/runs/petry-projects_private__agent-ingress.yml.forbidden" - export AGENT_RATE_LIMITS_ORG_REPOS="petry-projects/private" + : >"$GH_FIX/runs/combsmith_private__dev-lead.forbidden" + : >"$GH_FIX/runs/combsmith_private__agent-ingress.yml.forbidden" + export AGENT_RATE_LIMITS_ORG_REPOS="combsmith/private" run --separate-stderr bash -c 'source "$1"; arl_count_concurrent_runs dev-lead' _ "$LIB" [ "$status" -eq 0 ] [ "$output" = "1" ] @@ -317,8 +317,8 @@ seed_collapsed() { @test "concurrency: a transient repo in AGENT_RATE_LIMITS_ORG_REPOS degrades only that repo" { runs_fixture _local dev-lead '[{"status":"in_progress"}]' - transient_fixture petry-projects/flaky dev-lead - export AGENT_RATE_LIMITS_ORG_REPOS="petry-projects/flaky" + transient_fixture combsmith/flaky dev-lead + export AGENT_RATE_LIMITS_ORG_REPOS="combsmith/flaky" run --separate-stderr bash -c 'source "$1"; arl_count_concurrent_runs dev-lead' _ "$LIB" [ "$status" -eq 0 ] [ "$output" = "1" ] diff --git a/tests/test_agent_rate_limit_token_budget.bats b/tests/test_agent_rate_limit_token_budget.bats index 6dd0b7855..b9e1054ad 100644 --- a/tests/test_agent_rate_limit_token_budget.bats +++ b/tests/test_agent_rate_limit_token_budget.bats @@ -81,7 +81,7 @@ write_token_config() { } } }, - exempt_actors: ["dependabot[bot]", "@petry-projects/org-leads"], + exempt_actors: ["dependabot[bot]", "@combsmith/org-leads"], exempt_labels: ["security"] }' >"$AGENT_RATE_LIMITS_CONFIG" } diff --git a/tests/test_agent_rate_limit_weekly_glide.bats b/tests/test_agent_rate_limit_weekly_glide.bats index 2e943f92c..0b535ae38 100644 --- a/tests/test_agent_rate_limit_weekly_glide.bats +++ b/tests/test_agent_rate_limit_weekly_glide.bats @@ -87,7 +87,7 @@ write_glide_config() { } } }, - exempt_actors: ["dependabot[bot]", "@petry-projects/org-leads"], + exempt_actors: ["dependabot[bot]", "@combsmith/org-leads"], exempt_labels: ["security"] }' >"$AGENT_RATE_LIMITS_CONFIG" } diff --git a/tests/test_agent_rate_limits_config.bats b/tests/test_agent_rate_limits_config.bats index 9765ce725..96417f109 100644 --- a/tests/test_agent_rate_limits_config.bats +++ b/tests/test_agent_rate_limits_config.bats @@ -217,7 +217,7 @@ AGENT_TYPES=(dev-lead compliance-audit feature-ideation initiative-driver) } @test "org-leads break-glass actor is present in the exempt-actor list" { - run jq -e '.exempt_actors | index("@petry-projects/org-leads") != null' "$CONFIG" + run jq -e '.exempt_actors | index("@combsmith/org-leads") != null' "$CONFIG" [ "$status" -eq 0 ] [ "$output" = "true" ] } diff --git a/tests/test_bootstrap_new_repo.bats b/tests/test_bootstrap_new_repo.bats index a199ac6cf..296c27069 100644 --- a/tests/test_bootstrap_new_repo.bats +++ b/tests/test_bootstrap_new_repo.bats @@ -11,7 +11,7 @@ setup() { export PATH="$STUB_BIN:$PATH" CALLS="$STUB_BIN/calls.log"; export CALLS STUB_DIR="$(mktemp -d)" || { echo "Failed to create STUB_DIR" >&2; exit 1; } - # Fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github + # Fleet rulesets (code-quality, pr-quality) now live in combsmith/.github # (relocated under #575), so the REAL apply-rulesets.sh runs in fleet mode. Point # it at a local fixture so resolution needs no network; the authoritative content # is validated in .github. release-channel-tags stays repo-local and is NOT @@ -20,7 +20,7 @@ setup() { printf '{"name":"code-quality","target":"branch","enforcement":"active"}\n' > "$FLEET_DIR/code-quality.json" printf '{"name":"pr-quality","target":"branch","enforcement":"active"}\n' > "$FLEET_DIR/pr-quality.json" export FLEET_RULESETS_DIR="$FLEET_DIR" - # Canonical apply-repo-settings.sh (petry-projects/.github) requires a token and + # Canonical apply-repo-settings.sh (combsmith/.github) requires a token and # fetches current state even under dry-run (to diff). gh is stubbed, so this dummy # is never used for a real call — it only satisfies the guard. export GH_TOKEN=dummy @@ -83,7 +83,7 @@ EOF # NOTE: the codified pr-quality.json / code-quality.json shape assertions moved out # of this suite with the JSONs themselves — the fleet rulesets are now owned by -# petry-projects/.github (standards/rulesets/, relocated under #575) and their +# combsmith/.github (standards/rulesets/, relocated under #575) and their # content is validated there. This suite covers bootstrap's ORCHESTRATION: that it # applies exactly the two fleet rulesets (via fleet-mode apply-rulesets.sh) and not # the repo-local release-channel-tags. @@ -211,9 +211,9 @@ _ring_sot_copy() { # central file 1: this repo's canary-rings.json [[ "$output" == *"would add owner/new-repo"* ]] [[ "$output" == *"ring1"* ]] - # central file 2: cross-repo ring-pins.sh in petry-projects/.github + # central file 2: cross-repo ring-pins.sh in combsmith/.github [[ "$output" == *"ring-pins.sh"* ]] - [[ "$output" == *"petry-projects/.github"* ]] + [[ "$output" == *"combsmith/.github"* ]] # stub repin to the matching channel tag [[ "$output" == *"@dev-lead/ring1"* ]] # dry-run makes no write API calls and does not mutate the SoT @@ -242,7 +242,7 @@ _ring_sot_copy() { _stub_gh _ring_sot_copy run env DRY_RUN=true GITHUB_ACTOR=octocat CANARY_RINGS="$RING_SOT" \ - bash "$BOOTSTRAP" petry-projects/acme-service + bash "$BOOTSTRAP" combsmith/acme-service [ "$status" -eq 0 ] # (1/5) ring — auditable record, default stable, record-only. @@ -275,8 +275,8 @@ _ring_sot_copy() { # (6/6) .gitignore secrets baseline — the marker-wrapped L1 block is seeded. [[ "$output" == *".gitignore"* ]] - [[ "$output" == *">>> BEGIN petry-projects secrets baseline"* ]] - [[ "$output" == *"<<< END petry-projects secrets baseline"* ]] + [[ "$output" == *">>> BEGIN combsmith secrets baseline"* ]] + [[ "$output" == *"<<< END combsmith secrets baseline"* ]] # PASS summary + the no-drift invariant: a pure DRY_RUN makes no write API calls. [[ "$output" == *"PASS"* ]] @@ -296,8 +296,8 @@ _ring_sot_copy() { run env DRY_RUN=true CANARY_RINGS="$RING_SOT" bash "$BOOTSTRAP" owner/new-repo [ "$status" -eq 0 ] [[ "$output" == *".gitignore"* ]] - [[ "$output" == *">>> BEGIN petry-projects secrets baseline"* ]] - [[ "$output" == *"<<< END petry-projects secrets baseline"* ]] + [[ "$output" == *">>> BEGIN combsmith secrets baseline"* ]] + [[ "$output" == *"<<< END combsmith secrets baseline"* ]] # STORY3 anchors ride inside the seeded block. [[ "$output" == *"*.pem"* ]] [[ "$output" == *"*.key"* ]] diff --git a/tests/test_seed_repo_template_gitignore.bats b/tests/test_seed_repo_template_gitignore.bats index 5a5d70eaa..50d946328 100644 --- a/tests/test_seed_repo_template_gitignore.bats +++ b/tests/test_seed_repo_template_gitignore.bats @@ -21,8 +21,8 @@ emit() { STANDARDS_DIR="$REPO_ROOT" bash "$SEED" --emit-baseline .gitignore; } @test "template .gitignore leads with the marker-wrapped L1 block" { run emit [ "$status" -eq 0 ] - [ "${lines[0]}" = '# >>> BEGIN petry-projects secrets baseline (managed by .github — do not edit) >>>' ] - echo "$output" | grep -qxF '# <<< END petry-projects secrets baseline <<<' + [ "${lines[0]}" = '# >>> BEGIN combsmith secrets baseline (managed by .github — do not edit) >>>' ] + echo "$output" | grep -qxF '# <<< END combsmith secrets baseline <<<' } @test "template .gitignore passes the STORY3 anchor check (.env, *.pem, *.key present)" { @@ -37,7 +37,7 @@ emit() { STANDARDS_DIR="$REPO_ROOT" bash "$SEED" --emit-baseline .gitignore; } run emit [ "$status" -eq 0 ] local end_ln node_ln - end_ln="$(printf '%s\n' "$output" | grep -nxF '# <<< END petry-projects secrets baseline <<<' | head -1 | cut -d: -f1)" + end_ln="$(printf '%s\n' "$output" | grep -nxF '# <<< END combsmith secrets baseline <<<' | head -1 | cut -d: -f1)" node_ln="$(printf '%s\n' "$output" | grep -nxF 'node_modules/' | head -1 | cut -d: -f1)" [ -n "$end_ln" ] && [ -n "$node_ln" ] [ "$end_ln" -lt "$node_ln" ] @@ -50,7 +50,7 @@ emit() { STANDARDS_DIR="$REPO_ROOT" bash "$SEED" --emit-baseline .gitignore; } # The baseline re-allows .env.example via `!.env.example`; an L2 `.env.*` would # silently re-hide it. Assert no L2 line re-ignores it. local end_ln l2 - end_ln="$(printf '%s\n' "$output" | grep -nxF '# <<< END petry-projects secrets baseline <<<' | head -1 | cut -d: -f1)" + end_ln="$(printf '%s\n' "$output" | grep -nxF '# <<< END combsmith secrets baseline <<<' | head -1 | cut -d: -f1)" l2="$(printf '%s\n' "$output" | tail -n +"$((end_ln + 1))")" ! printf '%s\n' "$l2" | grep -qxF '.env.*' ! printf '%s\n' "$l2" | grep -qxF '.env' From d610496b23d7a7a82fb88b3a9e5aab6002668cf4 Mon Sep 17 00:00:00 2001 From: don-petry Date: Wed, 14 Oct 2026 10:02:35 -0500 Subject: [PATCH 16/17] chore: limit the org-rename rewrite to the files this PR changes Restores every other file to this branch's previous content, so the PR diff stays this PR's own change; its petry-projects references stay rewritten to combsmith. --- .github/CODEOWNERS | 4 +- .github/copilot-instructions.md | 6 +- .github/dependabot.yml | 2 +- .github/schemas/signals.schema.json | 2 +- .../scripts/add-to-project/add-issue-or-pr.sh | 2 +- .../add-to-project/classify-initiative.sh | 2 +- .github/scripts/add-to-project/lib.sh | 4 +- .../add-to-project/reconcile-backlog.sh | 2 +- .../feature-ideation/collect-signals.sh | 8 +- .../feature-ideation/discussion-mutations.sh | 2 +- .../feature-ideation/lib/compose-signals.sh | 4 +- .../feature-ideation/lib/date-utils.sh | 2 +- .../feature-ideation/lib/filter-bots.sh | 4 +- .../scripts/feature-ideation/lib/gh-safe.sh | 6 +- .../scripts/feature-ideation/lint-caller.sh | 2 +- .../scripts/feature-ideation/lint-prompt.sh | 10 +- .../feature-ideation/match-discussions.sh | 6 +- .../feature-ideation/validate-signals.py | 6 +- .../scripts/pr-auto-review/sweep-dispatch.sh | 8 +- .../workflows/add-to-project-reconcile.yml | 10 +- .github/workflows/add-to-project-reusable.yml | 16 +- .github/workflows/add-to-project.yml | 14 +- .github/workflows/agent-shield-reusable.yml | 4 +- .github/workflows/agent-shield.yml | 6 +- .../apply-repo-settings-reusable.yml | 12 +- .../workflows/apply-repo-settings-tests.yml | 2 +- .github/workflows/auto-rebase-reusable.yml | 6 +- .github/workflows/auto-rebase.yml | 6 +- .github/workflows/ci.yml | 2 +- .github/workflows/copilot-setup-steps.yml | 8 +- .../dependabot-automerge-reusable.yml | 2 +- .github/workflows/dependabot-automerge.yml | 6 +- .../workflows/dependabot-rebase-reusable.yml | 2 +- .github/workflows/dependabot-rebase.yml | 8 +- .../workflows/dependency-audit-reusable.yml | 2 +- .github/workflows/dependency-audit.yml | 6 +- .github/workflows/dev-lead.yml | 8 +- .../workflows/dismiss-stale-bot-reviews.yml | 22 +- .github/workflows/duplicate-decl-gate.yml | 4 +- .../workflows/feature-ideation-reusable.yml | 10 +- .github/workflows/feature-ideation.yml | 18 +- .github/workflows/idea-enhancer-reusable.yml | 6 +- .github/workflows/idea-triage-reusable.yml | 6 +- .github/workflows/initiative-driver.yml | 28 +- .../workflows/initiative-planner-reusable.yml | 8 +- .github/workflows/initiative-planner.yml | 12 +- .github/workflows/migration-tooling-tests.yml | 2 +- .github/workflows/org-scorecard.yml | 4 +- .../workflows/persona-mention-reusable.yml | 40 +- .github/workflows/pinned-version-report.yml | 2 +- .github/workflows/pr-auto-review-reusable.yml | 6 +- .github/workflows/pr-auto-review-sweep.yml | 4 +- .github/workflows/pr-auto-review.yml | 8 +- .../workflows/pr-review-mention-reusable.yml | 6 +- .github/workflows/pr-review-mention.yml | 8 +- .github/workflows/sonarcloud-audit.yml | 2 +- .github/workflows/sonarcloud.yml | 2 +- .github/workflows/standards-deploy-tests.yml | 2 +- .github/workflows/standards-deploy.yml | 4 +- .gitignore | 10 +- AGENTS.md | 58 +-- CLAUDE.md | 4 +- CONTRIBUTING.md | 16 +- README.md | 14 +- SECURITY.md | 2 +- docs/bootstrap/new-repo-validation.md | 62 +-- docs/initiatives/agent-canary-rings-adr.md | 6 +- docs/initiatives/agent-rate-limits-adr.md | 26 +- .../agents-md-validation-cycle-log.md | 4 +- docs/initiatives/agents-md-validation.md | 18 +- docs/initiatives/canary-rollout-adr.md | 24 +- docs/initiatives/pull-request-limits-adr.md | 12 +- profile/README.md | 72 ++-- scripts/agent-rate-limit-gate.sh | 2 +- scripts/agents-md-lint.sh | 6 +- scripts/apply-repo-settings.sh | 10 +- scripts/apply-rulesets.sh | 8 +- scripts/automerge-standards-sync.sh | 4 +- scripts/bootstrap-new-repo.sh | 18 +- scripts/canary-rollout.sh | 6 +- scripts/check-cron-timing.sh | 2 +- scripts/check-duplicate-decls.sh | 2 +- scripts/compliance-audit.sh | 74 ++-- scripts/compliance-remediate.sh | 22 +- scripts/compliance-retrigger.sh | 4 +- scripts/cut-standards-release.sh | 4 +- scripts/deploy-standard-workflows.sh | 8 +- scripts/fix-check-suite-prefs.sh | 2 +- scripts/fix-ruleset-bypass.sh | 4 +- scripts/lib/agent-ingress.sh | 4 +- scripts/lib/agents-md-rules.json | 6 +- scripts/lib/cron-timing.sh | 2 +- scripts/lib/gitignore-baseline.sh | 4 +- scripts/lib/labels.sh | 6 +- scripts/lib/persona-mention.sh | 18 +- scripts/lib/pr-limit-gate.sh | 6 +- scripts/lib/push-protection.sh | 10 +- scripts/lib/ring-pins.sh | 6 +- scripts/lib/standards-deploy.sh | 6 +- scripts/migrate-claude-label.sh | 4 +- scripts/org_report.sh | 2 +- scripts/org_status.sh | 24 +- scripts/pinned-version-report.sh | 4 +- scripts/pr-limits-report.sh | 4 +- scripts/seed-repo-template.sh | 6 +- scripts/sonarcloud-audit.sh | 4 +- scripts/standards-deploy-driver.sh | 4 +- scripts/sync-gitignore-baseline.sh | 2 +- sonar-project.properties | 2 +- standards/advanced-security.md | 24 +- standards/agent-rate-limits.json | 4 +- standards/agent-rate-limits.md | 36 +- standards/agent-standards.md | 8 +- standards/canary-rings.json | 202 ++++----- standards/ci-standards.md | 104 ++--- standards/codeowners-standard.md | 30 +- standards/commercial-support-standard.md | 10 +- standards/copilot-instructions-standard.md | 18 +- standards/dependabot-policy.md | 16 +- standards/github-settings.md | 44 +- standards/gitignore-standard.md | 6 +- standards/initiatives-project.md | 22 +- standards/persona-standards.md | 28 +- standards/personas/TEMPLATE/README.md | 14 +- standards/personas/TEMPLATE/persona.yml | 16 +- standards/personas/persona.schema.json | 8 +- standards/pr-limits.json | 4 +- standards/pr-limits.md | 22 +- standards/push-protection.md | 14 +- standards/ruleset-remediation-runbook.md | 14 +- standards/rulesets/README.md | 16 +- standards/standards-versioning.md | 6 +- standards/workflows/add-to-project.yml | 16 +- standards/workflows/agent-ingress.yml | 16 +- standards/workflows/agent-shield.yml | 8 +- standards/workflows/apply-repo-settings.yml | 10 +- standards/workflows/auto-rebase.yml | 8 +- standards/workflows/ci.yml | 6 +- standards/workflows/copilot-setup-steps.yml | 8 +- standards/workflows/dependabot-automerge.yml | 8 +- standards/workflows/dependabot-rebase.yml | 8 +- standards/workflows/dependency-audit.yml | 8 +- standards/workflows/dev-lead.yml | 16 +- .../workflows/dismiss-stale-bot-reviews.yml | 22 +- standards/workflows/feature-ideation.yml | 16 +- standards/workflows/idea-enhancer.yml | 12 +- standards/workflows/idea-triage.yml | 12 +- standards/workflows/initiative-driver.yml | 28 +- standards/workflows/initiative-planner.yml | 12 +- standards/workflows/persona-mention.yml | 16 +- standards/workflows/pr-auto-review.yml | 10 +- standards/workflows/pr-review-mention.yml | 10 +- standards/workflows/sonarcloud.yml | 6 +- .../apply-repo-settings.bats | 2 +- .../reusable-contract.bats | 12 +- .../apply-rulesets/apply-rulesets.bats | 28 +- .../automerge-standards-sync/automerge.bats | 14 +- .../agents-md-structural-lint.bats | 4 +- .../centralized-stub-pins.bats | 10 +- .../close-resolved-issues.bats | 2 +- .../compliance-audit/codeowners-catchall.bats | 12 +- .../compliance-audit/codeowners-content.bats | 10 +- .../codeowners-unreadable.bats | 2 +- .../dev-lead-stub-channel-sync.bats | 28 +- .../feature-ideation-placeholder-context.bats | 4 +- .../compliance-audit/gitignore-baseline.bats | 8 +- .../ruleset-contents-drift.bats | 4 +- .../rulesets-hands-off-routing.bats | 2 +- .../sonar-s7637-exemption.bats | 14 +- .../stale-channel-major-agreement.bats | 2 +- .../compliance-audit/stub-surface-drift.bats | 8 +- .../gitignore-baseline.bats | 18 +- .../security-analysis.bats | 10 +- .../compliance-retrigger/transient-retry.bats | 8 +- .../compliance-retrigger/workflow-health.bats | 8 +- .../deploy-standard-workflows/dry-run.bats | 2 +- .../deploy-standard-workflows/emit-vform.bats | 8 +- .../feature-ideation-seed-repin.bats | 2 +- .../ingress-collapse.bats | 6 +- .../persona-mention-deployable.bats | 2 +- .../verbatim-managed-stub.bats | 2 +- .../duplicate-decl-gate.bats | 4 +- test/scripts/lib/gitignore-baseline.bats | 8 +- test/scripts/lib/ring-pins.bats | 34 +- test/scripts/lib/standards-deploy.bats | 22 +- .../migrate-major-channels/migrate.bats | 10 +- .../resolve-and-drift.bats | 4 +- test/scripts/pr-limits/pr-limit-gate.bats | 2 +- test/scripts/pr-limits/pr-limits-report.bats | 2 +- .../standards-deploy-driver/driver.bats | 2 +- .../add-to-project/add-issue-or-pr.bats | 2 +- .../add-to-project/classify-initiative.bats | 56 +-- .../add-to-project/reconcile-backlog.bats | 4 +- .../auto-rebase/conflict-sentinel.bats | 2 +- .../orchestrator.bats | 14 +- .../feature-ideation/collect-signals.bats | 4 +- .../feature-ideation/date-utils.bats | 2 +- .../discussion-mutations.bats | 2 +- .../INVALID-missing-field.signals.json | 2 +- .../fixtures/expected/empty-repo.signals.json | 2 +- .../fixtures/expected/populated.signals.json | 2 +- .../fixtures/expected/truncated.signals.json | 2 +- test/workflows/feature-ideation/gh-safe.bats | 4 +- .../feature-ideation/lint-prompt.bats | 4 +- .../feature-ideation/match-discussions.bats | 10 +- .../feature-ideation/signals-schema.bats | 6 +- test/workflows/feature-ideation/stubs/gh | 2 +- .../initiative-driver/gate-tooling.bats | 4 +- .../pr-auto-review/sweep-dispatch.bats | 40 +- test/workflows/pr-auto-review/sweep.bats | 18 +- test/workflows/pr-review-mention/ack.bats | 2 +- tests/canary_rollout.bats | 400 +++++++++--------- tests/persona_mention.bats | 36 +- tests/standards_release.bats | 2 +- tests/test_agent_rate_limit.bats | 2 +- tests/test_agent_rate_limit_gate.bats | 22 +- tests/test_agent_rate_limit_ingress.bats | 24 +- tests/test_agent_rate_limit_token_budget.bats | 2 +- tests/test_agent_rate_limit_weekly_glide.bats | 2 +- tests/test_agent_rate_limits_config.bats | 2 +- tests/test_bootstrap_new_repo.bats | 20 +- tests/test_seed_repo_template_gitignore.bats | 8 +- 222 files changed, 1490 insertions(+), 1490 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8a097b9d2..d8556fd53 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,10 +2,10 @@ # Each line is a pattern followed by one or more owners. # Owners are matched in order, last matching pattern wins. # -# Standard: use the @combsmith/org-leads team for all code owner +# Standard: use the @petry-projects/org-leads team for all code owner # assignments instead of listing individuals or bot accounts directly. # This keeps CODEOWNERS files stable and centralizes membership management. # See: standards/codeowners-standard.md # Default catch-all — org-leads own everything -* @combsmith/org-leads +* @petry-projects/org-leads diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 8127da5c9..3a81f33fa 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,13 +1,13 @@ -# Copilot Instructions — combsmith/.github +# Copilot Instructions — petry-projects/.github -> **Note:** This file applies to the `combsmith/.github` repository only. Copilot +> **Note:** This file applies to the `petry-projects/.github` repository only. Copilot > instruction files are repository-scoped — there is no automatic org-wide propagation. Every > other repo in the org must have its own `.github/copilot-instructions.md`. Use this file as > the canonical template; the weekly compliance audit enforces deployment to each repo. ## Repository Overview -This is the **org standards repository** for `combsmith`. It contains org-wide AI agent +This is the **org standards repository** for `petry-projects`. It contains org-wide AI agent standards (`AGENTS.md`), canonical CI workflow templates (`standards/workflows/`), the compliance audit script, and the canonical Copilot instruction files that every repo should adopt. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ba1ee5e72..1b267f263 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ # Dependabot configuration — GitHub Actions ecosystem only (docs-only repo). -# Standard: https://github.com/combsmith/.github/blob/main/standards/dependabot-policy.md +# Standard: https://github.com/petry-projects/.github/blob/main/standards/dependabot-policy.md version: 2 updates: - package-ecosystem: "github-actions" diff --git a/.github/schemas/signals.schema.json b/.github/schemas/signals.schema.json index c4c2b3d1d..ded4367e1 100644 --- a/.github/schemas/signals.schema.json +++ b/.github/schemas/signals.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/combsmith/.github/blob/main/.github/schemas/signals.schema.json", + "$id": "https://github.com/petry-projects/.github/blob/main/.github/schemas/signals.schema.json", "$comment": "version: 1.0.0 — must match SCHEMA_VERSION in collect-signals.sh; enforced by bats", "title": "Feature Ideation Signals", "description": "Canonical contract between collect-signals.sh and the BMAD Analyst (Mary) prompt. Any change to this schema is a breaking change to the workflow.", diff --git a/.github/scripts/add-to-project/add-issue-or-pr.sh b/.github/scripts/add-to-project/add-issue-or-pr.sh index f77513cbc..d78327c1f 100644 --- a/.github/scripts/add-to-project/add-issue-or-pr.sh +++ b/.github/scripts/add-to-project/add-issue-or-pr.sh @@ -9,7 +9,7 @@ # compliance-audit,health-check,fleet-tracker,daily-report) — the noise # filter that keeps automation-generated churn off the board. # -# Reconcile, not just add (combsmith/.github#415 §2): if an item that +# Reconcile, not just add (petry-projects/.github#415 §2): if an item that # was on the board stops qualifying — required label removed, or an excluded # label added — its project item is removed, built on the shared # find_project_item / delete_project_item helpers in lib.sh. diff --git a/.github/scripts/add-to-project/classify-initiative.sh b/.github/scripts/add-to-project/classify-initiative.sh index ed9c0aea1..f037331a6 100755 --- a/.github/scripts/add-to-project/classify-initiative.sh +++ b/.github/scripts/add-to-project/classify-initiative.sh @@ -2,7 +2,7 @@ # classify-initiative.sh — assign the Initiative single-select field (and its # rolled-up Theme) on Initiatives-project items that don't have one yet. # -# Why this exists (combsmith/.github#415): the add-to-project automation +# Why this exists (petry-projects/.github#415): the add-to-project automation # only ever places items ON the board (addProjectV2ItemById); nothing set the # Initiative field, so nearly every item sat on the board unassociated with any # initiative. This is the continuous, deterministic classifier that fills that diff --git a/.github/scripts/add-to-project/lib.sh b/.github/scripts/add-to-project/lib.sh index 63d214c33..3d683ef9a 100644 --- a/.github/scripts/add-to-project/lib.sh +++ b/.github/scripts/add-to-project/lib.sh @@ -2,7 +2,7 @@ # lib.sh — shared helpers for the add-to-project scripts. # # This is the "designed once" mechanism called for in -# combsmith/.github#415: a single paginated project-item lookup +# petry-projects/.github#415: a single paginated project-item lookup # (find_project_item) parameterized by a match predicate, plus the # add / draft / delete mutations and the env guard. Both # add-issue-or-pr.sh and reconcile-discussion.sh source this file so the @@ -24,7 +24,7 @@ _atp_require_env() { return 64 fi if [ -z "${GH_TOKEN:-}" ]; then - printf '::error::[%s] GH_TOKEN is empty. INITIATIVES_APP_ID / INITIATIVES_APP_PRIVATE_KEY are likely unset or stale. See combsmith/.github#387.\n' "$1" >&2 + printf '::error::[%s] GH_TOKEN is empty. INITIATIVES_APP_ID / INITIATIVES_APP_PRIVATE_KEY are likely unset or stale. See petry-projects/.github#387.\n' "$1" >&2 return 64 fi } diff --git a/.github/scripts/add-to-project/reconcile-backlog.sh b/.github/scripts/add-to-project/reconcile-backlog.sh index 2cea5c7db..bebbc118a 100644 --- a/.github/scripts/add-to-project/reconcile-backlog.sh +++ b/.github/scripts/add-to-project/reconcile-backlog.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # reconcile-backlog.sh — periodic/manual backlog reconcile for add-to-project. # -# Why this exists (combsmith/.github#518): the event-driven add-to-project +# Why this exists (petry-projects/.github#518): the event-driven add-to-project # path misses qualifying items in two structural cases — # 1. issues/PRs created by the default GITHUB_TOKEN (app/github-actions): # GitHub does not fire workflows from default-token events, so diff --git a/.github/scripts/feature-ideation/collect-signals.sh b/.github/scripts/feature-ideation/collect-signals.sh index 692a70727..b2ae23cc3 100755 --- a/.github/scripts/feature-ideation/collect-signals.sh +++ b/.github/scripts/feature-ideation/collect-signals.sh @@ -30,7 +30,7 @@ set -euo pipefail # compatibility break: validate-signals.py will reject the runtime output # if the constants drift, AND the bats `signals-schema: SCHEMA_VERSION # constant matches schema file` test enforces this in CI. -# Caught by CodeRabbit review on PR combsmith/.github#85. +# Caught by CodeRabbit review on PR petry-projects/.github#85. SCHEMA_VERSION="1.0.0" SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" @@ -61,7 +61,7 @@ main() { # Validate that limit overrides are positive integers before forwarding to # GraphQL — a value like `ISSUE_LIMIT=foo` would cause an opaque downstream # failure instead of a clean usage error. Caught by CodeRabbit review on - # PR combsmith/.github#85. + # PR petry-projects/.github#85. local _lim_name _lim_val for _lim_name in ISSUE_LIMIT PR_LIMIT DISCUSSION_LIMIT; do case "$_lim_name" in @@ -77,7 +77,7 @@ main() { # Strict owner/name format — reject leading/trailing slashes, empty segments, # and extra path parts (e.g. "org//repo", "/repo", "org/repo/extra"). - # Caught by CodeRabbit review on PR combsmith/.github#85. + # Caught by CodeRabbit review on PR petry-projects/.github#85. if [[ ! $REPO =~ ^[^/]+/[^/]+$ ]]; then printf '[collect-signals] REPO must be in owner/name format, got: %s\n' "$REPO" >&2 return 64 @@ -100,7 +100,7 @@ main() { --json number,title,labels,createdAt,author) # Compute truncation warning BEFORE bot filtering. If we filter out bots # first, the count could drop below the limit and mask a real truncation. - # Caught by Copilot review on PR combsmith/.github#85. + # Caught by Copilot review on PR petry-projects/.github#85. local raw_open_count raw_open_count=$(printf '%s' "$open_issues_raw" | jq 'length') if [ "$raw_open_count" -ge "$issue_limit" ]; then diff --git a/.github/scripts/feature-ideation/discussion-mutations.sh b/.github/scripts/feature-ideation/discussion-mutations.sh index d0a7a6a28..ae7a8dcb3 100755 --- a/.github/scripts/feature-ideation/discussion-mutations.sh +++ b/.github/scripts/feature-ideation/discussion-mutations.sh @@ -156,7 +156,7 @@ GRAPHQL # GraphQL `labelIds: [ID!]!` requires a JSON array variable. `gh api`'s # `-f`/`-F` flags don't express GraphQL array variables, so build the # full request body as JSON and send it via stdin. Caught by Copilot - # review on PR combsmith/.github#85: the previous version sent + # review on PR petry-projects/.github#85: the previous version sent # labelIds as the literal string `["L_1"]`, which the API rejects. local body body=$(jq -nc --arg q "$query" --arg id "$discussion_id" --arg label "$label_id" \ diff --git a/.github/scripts/feature-ideation/lib/compose-signals.sh b/.github/scripts/feature-ideation/lib/compose-signals.sh index e59228dde..1c699349b 100755 --- a/.github/scripts/feature-ideation/lib/compose-signals.sh +++ b/.github/scripts/feature-ideation/lib/compose-signals.sh @@ -16,7 +16,7 @@ # $5 merged_prs # $6 feature_requests # $7 bug_reports -# $8 repo (string, e.g. "combsmith/talkterm") +# $8 repo (string, e.g. "petry-projects/talkterm") # $9 scan_date (ISO-8601 string) # $10 schema_version (string) # $11 truncation_warnings (JSON array, may be []) @@ -51,7 +51,7 @@ compose_signals() { idx=$((idx + 1)) # Require a JSON array, not just valid JSON. Objects/strings/nulls accepted # by `jq -e .` would silently produce wrong counts (key count, char count). - # Caught by CodeRabbit review on PR combsmith/.github#85. + # Caught by CodeRabbit review on PR petry-projects/.github#85. if ! printf '%s' "$input" | jq -e 'type == "array"' >/dev/null 2>&1; then printf '[compose-signals] arg #%d must be a JSON array: %s\n' "$idx" "${input:0:120}" >&2 return 65 # EX_DATAERR diff --git a/.github/scripts/feature-ideation/lib/date-utils.sh b/.github/scripts/feature-ideation/lib/date-utils.sh index 8a9cf8099..ae2722bd0 100755 --- a/.github/scripts/feature-ideation/lib/date-utils.sh +++ b/.github/scripts/feature-ideation/lib/date-utils.sh @@ -12,7 +12,7 @@ set -euo pipefail date_days_ago() { # Guard arg count before reading $1: under set -u a zero-arg call would abort # the shell with "unbound variable" instead of reaching the validation path. - # Caught by CodeRabbit review on PR combsmith/.github#85. + # Caught by CodeRabbit review on PR petry-projects/.github#85. if [ "$#" -ne 1 ]; then printf '[date-utils] expected 1 arg (days), got: %d\n' "$#" >&2 return 64 diff --git a/.github/scripts/feature-ideation/lib/filter-bots.sh b/.github/scripts/feature-ideation/lib/filter-bots.sh index 44b5fed6c..f994e3e27 100755 --- a/.github/scripts/feature-ideation/lib/filter-bots.sh +++ b/.github/scripts/feature-ideation/lib/filter-bots.sh @@ -37,12 +37,12 @@ filter_bots_build_list() { if [ -n "${FEATURE_IDEATION_BOT_AUTHORS:-}" ]; then # Use `IFS=',' read` (not unquoted expansion) to avoid pathname-globbing # against the filesystem if any entry contains wildcard characters. - # Caught by CodeRabbit review on PR combsmith/.github#85. + # Caught by CodeRabbit review on PR petry-projects/.github#85. local extras=() IFS=',' read -r -a extras <<<"${FEATURE_IDEATION_BOT_AUTHORS}" # Trim leading/trailing whitespace from each comma-separated entry so # `"bot1, bot2"` resolves to `bot1` and `bot2`, not `bot1` and ` bot2`. - # Caught by CodeRabbit review on PR combsmith/.github#85. + # Caught by CodeRabbit review on PR petry-projects/.github#85. local trimmed=() local entry for entry in "${extras[@]}"; do diff --git a/.github/scripts/feature-ideation/lib/gh-safe.sh b/.github/scripts/feature-ideation/lib/gh-safe.sh index 90e5ab08d..8060c5c46 100755 --- a/.github/scripts/feature-ideation/lib/gh-safe.sh +++ b/.github/scripts/feature-ideation/lib/gh-safe.sh @@ -95,7 +95,7 @@ gh_safe_graphql() { if [ "${args[$i]}" = "--jq" ]; then # Guard bounds before dereferencing args[i+1]: under set -u an out-of- # bounds access aborts the shell. Caught by CodeRabbit review on PR - # combsmith/.github#85. + # petry-projects/.github#85. if [ $((i + 1)) -ge "${#args[@]}" ]; then _gh_safe_err "graphql-bad-args" "--jq requires a jq filter argument" return 64 @@ -158,7 +158,7 @@ gh_safe_graphql() { # NB: do NOT swallow jq errors with `|| true`. A typo or wrong path in # the filter must surface as a hard failure, not a silent empty result — # otherwise we re-introduce R1 in a different shape. Caught by Copilot - # review on PR combsmith/.github#85. + # review on PR petry-projects/.github#85. local filtered jq_rc jq_err jq_err=$(mktemp) set +e @@ -194,7 +194,7 @@ gh_safe_graphql() { gh_safe_graphql_input() { # Guard arg count before reading $1: under set -u a zero-arg call aborts the # shell instead of reaching the JSON validation. Caught by CodeRabbit review - # on PR combsmith/.github#85. + # on PR petry-projects/.github#85. if [ "$#" -ne 1 ]; then _gh_safe_err "graphql-bad-input" "expected 1 arg: JSON request body, got $#" return 64 diff --git a/.github/scripts/feature-ideation/lint-caller.sh b/.github/scripts/feature-ideation/lint-caller.sh index 0b8bde1a7..eab96c1fe 100755 --- a/.github/scripts/feature-ideation/lint-caller.sh +++ b/.github/scripts/feature-ideation/lint-caller.sh @@ -9,7 +9,7 @@ # events, so a `with:` value that references `${{ inputs.* }}` fails the whole # run (zero jobs, "Invalid workflow file") when the workflow is also triggered # by an event that has no `inputs` — e.g. `discussion: created`. The job `if:` -# does NOT save you. This is combsmith/.github#571. +# does NOT save you. This is petry-projects/.github#571. # # The fix is to resolve dispatch inputs in an ordinary `prep` job (whose step # expressions run at job time and are skipped on `discussion`) and pass them to diff --git a/.github/scripts/feature-ideation/lint-prompt.sh b/.github/scripts/feature-ideation/lint-prompt.sh index 2d22b24f9..a1d18b63c 100755 --- a/.github/scripts/feature-ideation/lint-prompt.sh +++ b/.github/scripts/feature-ideation/lint-prompt.sh @@ -39,7 +39,7 @@ def _strip_github_expressions(s: str) -> str: containing `}` inside string literals (e.g. format() calls) are fully consumed rather than prematurely terminated. This prevents false-positive shell-expansion matches on content that is actually inside a GH expression. - Caught by CodeRabbit review on PR combsmith/.github#85. + Caught by CodeRabbit review on PR petry-projects/.github#85. """ result: list[str] = [] i = 0 @@ -79,13 +79,13 @@ findings = [] # (which is evaluated before the prompt is rendered) and NOT \$ or $$ # escapes (which produce literal characters in the rendered prompt). # Both branches use the same lookbehind so escape handling is consistent. -# Caught by CodeRabbit review on PR combsmith/.github#85. +# Caught by CodeRabbit review on PR petry-projects/.github#85. shell_expansion = re.compile(r'(?` block scalar indicators plus YAML chomping modifiers # (`-` or `+`) so `prompt: |-`, `prompt: |+`, `prompt: >-`, `prompt: >+` -# are all recognised. Caught by CodeRabbit review on PR combsmith/.github#85. +# are all recognised. Caught by CodeRabbit review on PR petry-projects/.github#85. prompt_marker = re.compile(r'(?:direct_prompt|prompt):\s*[|>]?[-+]?\s*$') for lineno, raw in enumerate(lines, start=1): @@ -113,7 +113,7 @@ for lineno, raw in enumerate(lines, start=1): # contain `}` internally (e.g. format() calls or string literals) are # not fully removed and leave false-positive shell expansion matches. # Use a small stateful scanner instead. - # Caught by CodeRabbit review on PR combsmith/.github#85. + # Caught by CodeRabbit review on PR petry-projects/.github#85. no_gh = _strip_github_expressions(raw) for match in shell_expansion.finditer(no_gh): findings.append((lineno, match.group(0), raw.rstrip())) @@ -151,7 +151,7 @@ main() { fi # Capture the actual exit code so we preserve exit-2 (file error) over # exit-1 (lint finding). A later lint failure must not overwrite an earlier - # file error. Caught by CodeRabbit review on PR combsmith/.github#85. + # file error. Caught by CodeRabbit review on PR petry-projects/.github#85. if scan_file "$file"; then file_rc=0 else diff --git a/.github/scripts/feature-ideation/match-discussions.sh b/.github/scripts/feature-ideation/match-discussions.sh index 8e3985cc7..c4af54665 100755 --- a/.github/scripts/feature-ideation/match-discussions.sh +++ b/.github/scripts/feature-ideation/match-discussions.sh @@ -34,7 +34,7 @@ set -euo pipefail # NB: matching logic is implemented entirely in the embedded Python block # below. Earlier drafts had standalone bash `normalize_title` / # `jaccard_similarity` helpers that were never called; removed per Copilot -# review on PR combsmith/.github#85. +# review on PR petry-projects/.github#85. match_discussions_main() { local signals_path="$1" @@ -43,7 +43,7 @@ match_discussions_main() { # Validate threshold is a parseable float in [0, 1] BEFORE handing it to # Python, so a typo doesn't surface as an opaque traceback. Caught by - # Copilot review on PR combsmith/.github#85. + # Copilot review on PR petry-projects/.github#85. if ! printf '%s' "$threshold" | grep -Eq '^[0-9]+(\.[0-9]+)?$'; then printf '[match-discussions] MATCH_THRESHOLD must be a non-negative number, got: %s\n' "$threshold" >&2 return 64 @@ -132,7 +132,7 @@ disc_norm = [ # Instead we enumerate all (proposal, discussion) pairs, sort by similarity # descending (ties broken by original proposal index for stability), then # assign greedily. This guarantees globally higher-value matches are honoured -# first. Caught by CodeRabbit review on PR combsmith/.github#85. +# first. Caught by CodeRabbit review on PR petry-projects/.github#85. # Collect valid proposals with their original index (for tie-breaking + new_candidates). proposals_indexed: list[tuple[int, dict]] = [] diff --git a/.github/scripts/feature-ideation/validate-signals.py b/.github/scripts/feature-ideation/validate-signals.py index 8fd062583..1536204e1 100755 --- a/.github/scripts/feature-ideation/validate-signals.py +++ b/.github/scripts/feature-ideation/validate-signals.py @@ -33,7 +33,7 @@ # default FormatChecker also does NOT include `date-time` — that requires the # optional `rfc3339-validator` dependency. Avoid pulling in extra deps by # registering the small inline validator below on a module-level checker. -# Caught by Copilot review on PR combsmith/.github#85. +# Caught by Copilot review on PR petry-projects/.github#85. FORMAT_CHECKER = FormatChecker() @@ -95,14 +95,14 @@ def main(argv: list[str]) -> int: signals = json.loads(signals_path.read_text(encoding="utf-8")) except OSError as exc: # File read errors (permissions, I/O) must also exit 2. Caught by - # CodeRabbit review on PR combsmith/.github#85. + # CodeRabbit review on PR petry-projects/.github#85. sys.stderr.write(f"[validate-signals] cannot read {signals_path}: {exc}\n") return 2 except json.JSONDecodeError as exc: # Per the docstring contract, exit 2 means usage / file error and # exit 1 means schema validation error. A malformed signals file # is a file/data error, not a schema violation. Caught by - # CodeRabbit review on PR combsmith/.github#85. + # CodeRabbit review on PR petry-projects/.github#85. sys.stderr.write(f"[validate-signals] invalid JSON in {signals_path}: {exc}\n") return 2 diff --git a/.github/scripts/pr-auto-review/sweep-dispatch.sh b/.github/scripts/pr-auto-review/sweep-dispatch.sh index 7fbdf6c94..ad9878996 100644 --- a/.github/scripts/pr-auto-review/sweep-dispatch.sh +++ b/.github/scripts/pr-auto-review/sweep-dispatch.sh @@ -27,10 +27,10 @@ # # Env: # GH_TOKEN classic PAT with repo scope — API reads + dispatch (required) -# SEARCH_OWNER org to scan for open PRs (default: combsmith) +# SEARCH_OWNER org to scan for open PRs (default: petry-projects) # SWEEP_LABEL PR label to sweep (default: standards-sync) # MAX_PER_RUN max PRs to dispatch per run (default: 8) -# DISPATCH_REPO repository_dispatch target repo (default: combsmith/.github-private) +# DISPATCH_REPO repository_dispatch target repo (default: petry-projects/.github-private) # DRY_RUN "1" → log intended dispatches only # DISPATCH_RETRIES attempts per dispatch before giving up (default: 3) # DISPATCH_RETRY_SLEEP seconds between dispatch retries (default: 5) @@ -42,10 +42,10 @@ _dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" # shellcheck source=.github/scripts/pr-auto-review/lib/sweep.sh . "${_dir}/lib/sweep.sh" -SEARCH_OWNER="${SEARCH_OWNER:-combsmith}" +SEARCH_OWNER="${SEARCH_OWNER:-petry-projects}" SWEEP_LABEL="${SWEEP_LABEL:-standards-sync}" MAX_PER_RUN="${MAX_PER_RUN:-8}" -DISPATCH_REPO="${DISPATCH_REPO:-combsmith/.github-private}" +DISPATCH_REPO="${DISPATCH_REPO:-petry-projects/.github-private}" DRY_RUN="${DRY_RUN:-0}" DISPATCH_RETRIES="${DISPATCH_RETRIES:-3}" DISPATCH_RETRY_SLEEP="${DISPATCH_RETRY_SLEEP:-5}" diff --git a/.github/workflows/add-to-project-reconcile.yml b/.github/workflows/add-to-project-reconcile.yml index 2c7616bb4..e6b33e836 100644 --- a/.github/workflows/add-to-project-reconcile.yml +++ b/.github/workflows/add-to-project-reconcile.yml @@ -1,4 +1,4 @@ -# Backlog reconcile for the Initiatives project (combsmith/.github#518). +# Backlog reconcile for the Initiatives project (petry-projects/.github#518). # # The event-driven add-to-project automation misses qualifying items created by # the default GITHUB_TOKEN (GitHub doesn't fire workflows from default-token @@ -8,13 +8,13 @@ # using the same gate + helpers as the event path — so missed items land # within one cycle. # -# Runs centrally in combsmith/.github (the scripts live here); mints the +# Runs centrally in petry-projects/.github (the scripts live here); mints the # petry-projects-planner App token for issues/PRs read + project write. # # Two phases run in order each cycle: # 1. reconcile — ensure every qualifying issue/PR/Idea is ON the board. # 2. classify — set the Initiative (+ Theme) field on board items that -# don't have one yet (combsmith/.github#415). Classify runs AFTER +# don't have one yet (petry-projects/.github#415). Classify runs AFTER # reconcile so items added this cycle are categorized in the same run. name: Add-to-Project Reconcile @@ -71,7 +71,7 @@ jobs: env: GH_TOKEN: ${{ steps.app-token.outputs.token }} PROJECT_ID: PVT_kwDOD2inqs4BZq3- - PROJECT_URL: https://github.com/orgs/combsmith/projects/1 + PROJECT_URL: https://github.com/orgs/petry-projects/projects/1 REQUIRED_LABEL: dev-lead EXCLUDED_LABELS: compliance-audit,health-check,fleet-tracker,daily-report RECON_REPOS: ${{ inputs.repos }} @@ -83,7 +83,7 @@ jobs: env: GH_TOKEN: ${{ steps.app-token.outputs.token }} PROJECT_ID: PVT_kwDOD2inqs4BZq3- - PROJECT_URL: https://github.com/orgs/combsmith/projects/1 + PROJECT_URL: https://github.com/orgs/petry-projects/projects/1 # Same dry-run gating as reconcile: manual runs default to dry-run, # scheduled runs are live. DRY_RUN: ${{ (github.event_name == 'workflow_dispatch' && inputs.dry_run) && '1' || '0' }} diff --git a/.github/workflows/add-to-project-reusable.yml b/.github/workflows/add-to-project-reusable.yml index 216f3fa2b..0dbd56acc 100644 --- a/.github/workflows/add-to-project-reusable.yml +++ b/.github/workflows/add-to-project-reusable.yml @@ -1,7 +1,7 @@ # Reusable auto-add-to-Initiatives-project workflow — single source of truth # for the org. Repo-level add-to-project.yml stubs call this so the # noise-gate / reconcile logic isn't duplicated per repo. -# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md # # What it does (driven by the caller's triggering event): # - issues → reconcile the issue with the project. Issues are UN-GATED: @@ -20,10 +20,10 @@ # App. Callers pass the App credentials with `secrets: inherit`: # INITIATIVES_APP_ID, INITIATIVES_APP_PRIVATE_KEY. # -# The scripts live in combsmith/.github; this workflow checks them out +# The scripts live in petry-projects/.github; this workflow checks them out # at `agent_ref` so logic AND code run at the one pinned channel version # (per the org reusable-workflow versioning standard). The reusable's own -# self-host caller (combsmith/.github) passes its commit SHA so it +# self-host caller (petry-projects/.github) passes its commit SHA so it # dogfoods the exact version under test (Ring 0). # # Security note (fork PRs): pull_request_target runs with the App secret in @@ -31,10 +31,10 @@ # (head.repo.fork == false) or PRs whose author is OWNER/MEMBER/COLLABORATOR. # A maintainer-labeled PR from an *external fork by an untrusted author* is # still skipped here (the gate can't safely evaluate the labeler in an `if:`); -# add such PRs from the Projects UI. Tracking: combsmith/.github#415 §4. +# add such PRs from the Projects UI. Tracking: petry-projects/.github#415 §4. # -# Tracking: combsmith/.github#387 (pilot), #415 (multi-repo rollout) -# Discussion: combsmith/.github#386 +# Tracking: petry-projects/.github#387 (pilot), #415 (multi-repo rollout) +# Discussion: petry-projects/.github#386 name: Auto-add to Initiatives project (Reusable) on: @@ -60,7 +60,7 @@ on: type: string default: "compliance-audit,health-check,fleet-tracker,daily-report" agent_ref: - description: "Ref of combsmith/.github to check out the scripts from (pin to add-to-project/stable; self-host passes its SHA)" + description: "Ref of petry-projects/.github to check out the scripts from (pin to add-to-project/stable; self-host passes its SHA)" required: false type: string default: "add-to-project/stable" @@ -92,7 +92,7 @@ jobs: - name: Checkout add-to-project scripts uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: combsmith/.github + repository: petry-projects/.github ref: ${{ inputs.agent_ref }} path: .add-to-project-src fetch-depth: 1 diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index c5eaa2478..a9a606f88 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: combsmith/.github/standards/workflows/add-to-project.yml -# Standard: combsmith/.github/standards/ci-standards.md -# Reusable: combsmith/.github/.github/workflows/add-to-project-reusable.yml +# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/add-to-project.yml +# Standard: petry-projects/.github/standards/ci-standards.md +# Reusable: petry-projects/.github/.github/workflows/add-to-project-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All noise-gate / reconcile logic lives @@ -19,11 +19,11 @@ # ───────────────────────────────────────────────────────────────────────────── # # Tracks all issues (un-gated) and dev-lead-labeled PRs from -# combsmith/.github on the org-level Initiatives project -# (https://github.com/orgs/combsmith/projects/1). Ideas live in +# petry-projects/.github on the org-level Initiatives project +# (https://github.com/orgs/petry-projects/projects/1). Ideas live in # Discussions and are not tracked here (see standards/initiatives-project.md). # -# Tracking: combsmith/.github#387, #415 +# Tracking: petry-projects/.github#387, #415 name: Auto-add to Initiatives project on: @@ -50,7 +50,7 @@ jobs: uses: ./.github/workflows/add-to-project-reusable.yml # local ref — always current (self-host) with: project_id: PVT_kwDOD2inqs4BZq3- - project_url: https://github.com/orgs/combsmith/projects/1 + project_url: https://github.com/orgs/petry-projects/projects/1 agent_ref: ${{ github.sha }} # Pass only the secrets the reusable declares (least privilege; avoids # `secrets: inherit` handing the reusable every org secret). diff --git a/.github/workflows/agent-shield-reusable.yml b/.github/workflows/agent-shield-reusable.yml index a8ed224cc..5843a115d 100644 --- a/.github/workflows/agent-shield-reusable.yml +++ b/.github/workflows/agent-shield-reusable.yml @@ -1,7 +1,7 @@ # Reusable AgentShield workflow — single source of truth for the org. # Repo-level agent-shield.yml files call this to avoid duplicating # the security scan and structural checks. -# Standard: https://github.com/combsmith/.github/blob/main/standards/agent-standards.md +# Standard: https://github.com/petry-projects/.github/blob/main/standards/agent-standards.md # # Two-layer approach: # 1. ecc-agentshield CLI — deep security scan (102 rules across secrets, @@ -37,7 +37,7 @@ on: description: "String AGENTS.md must reference (regex, basic grep -E)" required: false type: string - default: 'combsmith/\.github' + default: 'petry-projects/\.github' permissions: contents: read diff --git a/.github/workflows/agent-shield.yml b/.github/workflows/agent-shield.yml index b9f578e7d..4ef04d1b4 100644 --- a/.github/workflows/agent-shield.yml +++ b/.github/workflows/agent-shield.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: combsmith/.github/standards/workflows/agent-shield.yml -# Standard: combsmith/.github/standards/agent-standards.md -# Reusable: combsmith/.github/.github/workflows/agent-shield-reusable.yml +# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/agent-shield.yml +# Standard: petry-projects/.github/standards/agent-standards.md +# Reusable: petry-projects/.github/.github/workflows/agent-shield-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. The AgentShield CLI scan and the diff --git a/.github/workflows/apply-repo-settings-reusable.yml b/.github/workflows/apply-repo-settings-reusable.yml index d1b9d4c98..fb23e9895 100644 --- a/.github/workflows/apply-repo-settings-reusable.yml +++ b/.github/workflows/apply-repo-settings-reusable.yml @@ -1,8 +1,8 @@ # Reusable repo-settings + branch-policy self-heal — single source of truth for the org. # Repo-level apply-repo-settings.yml stubs call this so the compliance self-heal runs -# from ONE script/workflow pair instead of per-repo forks (combsmith/.github#984). -# Standard: https://github.com/combsmith/.github/blob/main/standards/github-settings.md -# https://github.com/combsmith/.github/blob/main/standards/ruleset-remediation-runbook.md +# from ONE script/workflow pair instead of per-repo forks (petry-projects/.github#984). +# Standard: https://github.com/petry-projects/.github/blob/main/standards/github-settings.md +# https://github.com/petry-projects/.github/blob/main/standards/ruleset-remediation-runbook.md # # Applies, to the CALLING repo: # - merge settings, security_and_analysis, CodeQL default setup, labels, and @@ -29,7 +29,7 @@ on: default: false checkout_ref: description: >- - Ref of combsmith/.github to check out for the scripts, so the + Ref of petry-projects/.github to check out for the scripts, so the logic runs at the same version as this reusable. Callers pin their ring's channel tag (mirrors dev-lead's agent_ref). Empty = default branch. type: string @@ -72,10 +72,10 @@ jobs: fi echo "GH_PAT_DON_PETRY present — proceeding." - - name: Checkout combsmith/.github (scripts at the pinned channel) + - name: Checkout petry-projects/.github (scripts at the pinned channel) uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: combsmith/.github + repository: petry-projects/.github ref: ${{ inputs.checkout_ref }} persist-credentials: false diff --git a/.github/workflows/apply-repo-settings-tests.yml b/.github/workflows/apply-repo-settings-tests.yml index c28a9461c..1629a08c4 100644 --- a/.github/workflows/apply-repo-settings-tests.yml +++ b/.github/workflows/apply-repo-settings-tests.yml @@ -1,6 +1,6 @@ # Tests for the standard repo-settings applier (scripts/apply-repo-settings.sh). # Gates: shellcheck (applier) + bats (the persona :hands-off opt-out family, -# derived from the persona manifests — combsmith/.github#756). +# derived from the persona manifests — petry-projects/.github#756). name: Apply Repo Settings Tests on: diff --git a/.github/workflows/auto-rebase-reusable.yml b/.github/workflows/auto-rebase-reusable.yml index 227928049..d938579fd 100644 --- a/.github/workflows/auto-rebase-reusable.yml +++ b/.github/workflows/auto-rebase-reusable.yml @@ -1,7 +1,7 @@ # Reusable auto-rebase workflow — single source of truth for the org. # Repo-level auto-rebase.yml files call this to avoid duplicating # the branch-update logic. -# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md # # Problem: when branch protection requires branches to be up-to-date # (strict status checks), merging any PR makes other open PRs fall behind. @@ -63,7 +63,7 @@ on: type: string tooling_ref: description: | - Ref of combsmith/.github to source the auto-rebase scripts from. + Ref of petry-projects/.github to source the auto-rebase scripts from. Leave empty (the default) to source them from THIS reusable's own commit (`github.job_workflow_sha`) — that guarantees the predicate in lib/eligibility.sh always matches the version of this workflow the @@ -94,7 +94,7 @@ jobs: - name: Checkout auto-rebase tooling uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: combsmith/.github + repository: petry-projects/.github # Source the scripts from this reusable's own commit so the predicate # always matches the pinned workflow version. `job_workflow_sha` is the # commit SHA of THIS reusable file for the run; `tooling_ref` overrides diff --git a/.github/workflows/auto-rebase.yml b/.github/workflows/auto-rebase.yml index 4c49918a9..7df223694 100644 --- a/.github/workflows/auto-rebase.yml +++ b/.github/workflows/auto-rebase.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: combsmith/.github/standards/workflows/auto-rebase.yml -# Standard: combsmith/.github/standards/ci-standards.md -# Reusable: combsmith/.github/.github/workflows/auto-rebase-reusable.yml +# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/auto-rebase.yml +# Standard: petry-projects/.github/standards/ci-standards.md +# Reusable: petry-projects/.github/.github/workflows/auto-rebase-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All branch-update logic lives in the diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68fa9be52..fbd18ec98 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ # CI pipeline for the .github standards repository. # Lints markdown, YAML, GitHub Actions, shell scripts, and runs AgentShield. -# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md name: CI on: diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 659ec23a1..20b99935b 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -1,6 +1,6 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: combsmith/.github/standards/workflows/copilot-setup-steps.yml -# Standard: combsmith/.github/standards/ci-standards.md#11-copilot-cloud-agent-setup +# 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. @@ -41,7 +41,7 @@ # • the trigger events # • the verify-environment step # For changes to the org-wide pattern, open a PR against this file in -# combsmith/.github and propagate to the fleet. +# petry-projects/.github and propagate to the fleet. # ───────────────────────────────────────────────────────────────────────────── name: "Copilot Setup Steps" @@ -110,7 +110,7 @@ jobs: # missing so the problem is caught here rather than mid-agent-session. - name: Verify environment run: | - echo "=== combsmith Copilot cloud agent environment ===" + echo "=== petry-projects Copilot cloud agent environment ===" echo "Repository : ${GITHUB_REPOSITORY}" echo "Ref : ${GITHUB_REF}" echo "Runner : ${RUNNER_OS} / ${RUNNER_ARCH}" diff --git a/.github/workflows/dependabot-automerge-reusable.yml b/.github/workflows/dependabot-automerge-reusable.yml index 0101e7fa0..3756fbcd4 100644 --- a/.github/workflows/dependabot-automerge-reusable.yml +++ b/.github/workflows/dependabot-automerge-reusable.yml @@ -1,7 +1,7 @@ # Reusable Dependabot auto-merge workflow — single source of truth for the org. # Repo-level dependabot-automerge.yml files call this to avoid duplicating # eligibility logic and the GitHub App token dance. -# Standard: https://github.com/combsmith/.github/blob/main/standards/dependabot-policy.md +# Standard: https://github.com/petry-projects/.github/blob/main/standards/dependabot-policy.md # # Auto-approves and enables auto-merge for Dependabot PRs that are: # - GitHub Actions updates (any version bump, including major) diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml index c27120e89..ebbd82d24 100644 --- a/.github/workflows/dependabot-automerge.yml +++ b/.github/workflows/dependabot-automerge.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: combsmith/.github/standards/workflows/dependabot-automerge.yml -# Standard: combsmith/.github/standards/dependabot-policy.md -# Reusable: combsmith/.github/.github/workflows/dependabot-automerge-reusable.yml +# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dependabot-automerge.yml +# Standard: petry-projects/.github/standards/dependabot-policy.md +# Reusable: petry-projects/.github/.github/workflows/dependabot-automerge-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All eligibility logic and the GitHub diff --git a/.github/workflows/dependabot-rebase-reusable.yml b/.github/workflows/dependabot-rebase-reusable.yml index e3e378756..c3f891835 100644 --- a/.github/workflows/dependabot-rebase-reusable.yml +++ b/.github/workflows/dependabot-rebase-reusable.yml @@ -1,7 +1,7 @@ # Reusable Dependabot update-and-merge workflow — single source of truth for the org. # Repo-level dependabot-rebase.yml files call this to avoid duplicating # the rebase/merge serialization logic. -# Standard: https://github.com/combsmith/.github/blob/main/standards/dependabot-policy.md +# Standard: https://github.com/petry-projects/.github/blob/main/standards/dependabot-policy.md # # Problem: when branch protection requires branches to be up-to-date # (strict status checks), merging one Dependabot PR makes the others fall diff --git a/.github/workflows/dependabot-rebase.yml b/.github/workflows/dependabot-rebase.yml index 1e4c2f962..62acb4c9d 100644 --- a/.github/workflows/dependabot-rebase.yml +++ b/.github/workflows/dependabot-rebase.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: combsmith/.github/standards/workflows/dependabot-rebase.yml -# Standard: combsmith/.github/standards/dependabot-policy.md -# Reusable: combsmith/.github/.github/workflows/dependabot-rebase-reusable.yml +# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dependabot-rebase.yml +# Standard: petry-projects/.github/standards/dependabot-policy.md +# Reusable: petry-projects/.github/.github/workflows/dependabot-rebase-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All rebase/merge serialization logic @@ -25,7 +25,7 @@ # To adopt: copy standards/workflows/dependabot-rebase.yml (NOT this file) to # .github/workflows/dependabot-rebase.yml in your repo. This file uses a # local ref (`./.github/workflows/dependabot-rebase-reusable.yml`) that is -# only valid in the combsmith/.github source-of-truth repo. +# only valid in the petry-projects/.github source-of-truth repo. # Required org/repo secrets (inherited): # APP_ID — GitHub App ID with contents:write and pull-requests:write # APP_PRIVATE_KEY — GitHub App private key diff --git a/.github/workflows/dependency-audit-reusable.yml b/.github/workflows/dependency-audit-reusable.yml index 339dceece..c728ccc19 100644 --- a/.github/workflows/dependency-audit-reusable.yml +++ b/.github/workflows/dependency-audit-reusable.yml @@ -1,7 +1,7 @@ # Reusable dependency vulnerability audit — single source of truth for the org. # Repo-level dependency-audit.yml files call this to avoid duplicating the # multi-ecosystem detection and audit logic. -# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md#5-dependency-audit-dependency-auditym +# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md#5-dependency-audit-dependency-auditym # # Auto-detects ecosystems present in the repository and runs the appropriate # audit tool. Fails the build if any dependency has a known security advisory. diff --git a/.github/workflows/dependency-audit.yml b/.github/workflows/dependency-audit.yml index 981d37b96..1a51f613e 100644 --- a/.github/workflows/dependency-audit.yml +++ b/.github/workflows/dependency-audit.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: combsmith/.github/standards/workflows/dependency-audit.yml -# Standard: combsmith/.github/standards/ci-standards.md#7-dependency-audit-dependency-audityml -# Reusable: combsmith/.github/.github/workflows/dependency-audit-reusable.yml +# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dependency-audit.yml +# Standard: petry-projects/.github/standards/ci-standards.md#7-dependency-audit-dependency-audityml +# Reusable: petry-projects/.github/.github/workflows/dependency-audit-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All ecosystem-detection and audit logic diff --git a/.github/workflows/dev-lead.yml b/.github/workflows/dev-lead.yml index 2c656fe83..d9ab5b0c3 100644 --- a/.github/workflows/dev-lead.yml +++ b/.github/workflows/dev-lead.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── # Dev-Lead Agent — thin caller stub -# Standard: combsmith/.github/standards/ci-standards.md#5-dev-lead-agent -# Reusable: combsmith/.github-private/.github/workflows/dev-lead-reusable.yml +# Standard: petry-projects/.github/standards/ci-standards.md#5-dev-lead-agent +# Reusable: petry-projects/.github-private/.github/workflows/dev-lead-reusable.yml # # ADOPTING THIS WORKFLOW: # 1. Copy this file verbatim to .github/workflows/dev-lead.yml in your repo. @@ -39,11 +39,11 @@ permissions: {} # Concurrency is centralised in the reusable workflow (dev-lead-reusable.yml) with # per-issue / per-PR lanes, so issue pickups are never cancelled by PR follow-up -# traffic and the grouping can't drift per-repo. See combsmith/.github#402. +# traffic and the grouping can't drift per-repo. See petry-projects/.github#402. jobs: dev-lead: - uses: combsmith/.github-private/.github/workflows/dev-lead-reusable.yml@dev-lead/v139-ring0 # NOSONAR(githubactions:S7637) first-party channel ref + uses: petry-projects/.github-private/.github/workflows/dev-lead-reusable.yml@dev-lead/v139-ring0 # NOSONAR(githubactions:S7637) first-party channel ref with: agent_ref: dev-lead/v139-ring0 secrets: inherit # NOSONAR(githubactions:S7635) first-party trusted reusable diff --git a/.github/workflows/dismiss-stale-bot-reviews.yml b/.github/workflows/dismiss-stale-bot-reviews.yml index 70eef9a8c..8672b10bd 100644 --- a/.github/workflows/dismiss-stale-bot-reviews.yml +++ b/.github/workflows/dismiss-stale-bot-reviews.yml @@ -1,8 +1,8 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: combsmith/.github/standards/workflows/dismiss-stale-bot-reviews.yml -# Standard: combsmith/.github/standards/ci-standards.md -# Decision core: combsmith/.github/scripts/lib/dismiss-stale-bot-reviews.sh -# combsmith/.github/scripts/dismiss-stale-bot-reviews.sh +# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dismiss-stale-bot-reviews.yml +# Standard: petry-projects/.github/standards/ci-standards.md +# Decision core: petry-projects/.github/scripts/lib/dismiss-stale-bot-reviews.sh +# petry-projects/.github/scripts/dismiss-stale-bot-reviews.sh # # AGENTS — READ BEFORE EDITING: # • This file is a SELF-CONTAINED verbatim stub (the initiative-driver class), @@ -12,8 +12,8 @@ # forever (#617 blocker 3). This workflow dismisses such reviews once a NEWER # commit has been pushed. # • All dismiss/keep decision logic lives in the decision core above, which is -# unit-tested by bats in combsmith/.github. This stub fetches that core -# from combsmith/.github@v1 at runtime and runs it — the same runtime +# unit-tested by bats in petry-projects/.github. This stub fetches that core +# from petry-projects/.github@v1 at runtime and runs it — the same runtime # tooling-checkout pattern initiative-driver uses for the rate-limit gate. # • You MUST NOT change: the trigger event types (synchronize + submitted), the # fork guard, or the job-level `permissions:` block (pull-requests: write is @@ -22,7 +22,7 @@ # allow-list, set the DSBR_BOT_ALLOWLIST repo/org variable (comma-separated # logins) — it REPLACES the default list. Do not fork the decision logic here. # • If you need different behaviour, open a PR against the decision core in -# combsmith/.github — the change propagates everywhere on next run. +# petry-projects/.github — the change propagates everywhere on next run. # ───────────────────────────────────────────────────────────────────────────── # # Dismiss stale bot reviews — self-contained org-standard workflow. @@ -59,16 +59,16 @@ jobs: pull-requests: write # dismissPullRequestReview via GITHUB_TOKEN contents: read # checkout steps: - - name: Checkout decision-core tooling from combsmith/.github - # The decision core lives in combsmith/.github; a consumer repo does + - name: Checkout decision-core tooling from petry-projects/.github + # The decision core lives in petry-projects/.github; a consumer repo does # not carry it, so fetch it read-only at the pinned v1 tag into a scratch - # path. combsmith/.github is public, so GITHUB_TOKEN suffices. + # path. petry-projects/.github is public, so GITHUB_TOKEN suffices. # continue-on-error: a tooling-checkout outage must never fail the PR — the # run step then finds no script and no-ops (fail-closed: nothing dismissed). continue-on-error: true uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: combsmith/.github + repository: petry-projects/.github ref: v1 path: .dsbr-tooling fetch-depth: 1 diff --git a/.github/workflows/duplicate-decl-gate.yml b/.github/workflows/duplicate-decl-gate.yml index 7f06fa35e..29a015a1d 100644 --- a/.github/workflows/duplicate-decl-gate.yml +++ b/.github/workflows/duplicate-decl-gate.yml @@ -1,7 +1,7 @@ name: duplicate-decl-gate # Required CI gate against the #1485 corruption class, ported from -# combsmith/.github-private (#1520) into this repo (#1025). Fails any PR (or +# petry-projects/.github-private (#1520) into this repo (#1025). Fails any PR (or # main push) whose tree contains a top-level declaration declared more than once # — a duplicate top-level function in a shell file, a duplicate top-level # (H1/H2) heading in a markdown file, or a duplicate object key / unparseable @@ -17,7 +17,7 @@ name: duplicate-decl-gate # Maintainer action after this lands: the `duplicate-decl-gate` required status # check is codified in standards/rulesets/duplicate-decl-gate.json — apply it to # the reusable-hosting meta-repos: -# GH_TOKEN= bash scripts/apply-rulesets.sh --repo combsmith/.github duplicate-decl-gate +# GH_TOKEN= bash scripts/apply-rulesets.sh --repo petry-projects/.github duplicate-decl-gate on: pull_request: diff --git a/.github/workflows/feature-ideation-reusable.yml b/.github/workflows/feature-ideation-reusable.yml index e9a4f57f1..5249091ec 100644 --- a/.github/workflows/feature-ideation-reusable.yml +++ b/.github/workflows/feature-ideation-reusable.yml @@ -26,7 +26,7 @@ # - The two critical gotchas (github_token override, the `model` input) # are baked in here so callers cannot accidentally regress them. # -# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md#8-feature-ideation-feature-ideationyml--bmad-method-repos +# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md#8-feature-ideation-feature-ideationyml--bmad-method-repos name: Feature Ideation (Reusable) on: @@ -91,7 +91,7 @@ on: type: boolean tooling_ref: description: | - Ref of combsmith/.github to source the feature-ideation scripts from. + Ref of petry-projects/.github to source the feature-ideation scripts from. Defaults to `v1` to align with the @v1 pin convention used by caller stubs (see standards/ci-standards.md tier model). When the v1 tag is moved forward to a new release, callers automatically pick up the matching @@ -107,7 +107,7 @@ on: description: | Path (relative to repo root) of the repo-local reputable source list. Defaults to .github/feature-ideation-sources.md. Copy - standards/feature-ideation-sources.md from combsmith/.github as + standards/feature-ideation-sources.md from petry-projects/.github as a starting point and customise it for your project. If the file is absent Mary falls back to open web search automatically. required: false @@ -145,7 +145,7 @@ jobs: - name: Checkout feature-ideation tooling uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: combsmith/.github + repository: petry-projects/.github ref: ${{ inputs.tooling_ref }} path: .feature-ideation-tooling fetch-depth: 1 @@ -197,7 +197,7 @@ jobs: - name: Checkout feature-ideation tooling uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: combsmith/.github + repository: petry-projects/.github ref: ${{ inputs.tooling_ref }} path: .feature-ideation-tooling fetch-depth: 1 diff --git a/.github/workflows/feature-ideation.yml b/.github/workflows/feature-ideation.yml index 9853e1dfa..302be2dbd 100644 --- a/.github/workflows/feature-ideation.yml +++ b/.github/workflows/feature-ideation.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: combsmith/.github/standards/workflows/feature-ideation.yml -# Standard: combsmith/.github/standards/ci-standards.md#8-feature-ideation-feature-ideationyml--bmad-method-repos -# Reusable: combsmith/.github/.github/workflows/feature-ideation-reusable.yml +# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/feature-ideation.yml +# Standard: petry-projects/.github/standards/ci-standards.md#8-feature-ideation-feature-ideationyml--bmad-method-repos +# Reusable: petry-projects/.github/.github/workflows/feature-ideation-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. The 5-phase ideation pipeline, the @@ -19,7 +19,7 @@ # Feature Ideation workflow stub — for BMAD Method-enabled repos. # # This is a thin caller for the org-wide reusable workflow at -# combsmith/.github/.github/workflows/feature-ideation-reusable.yml +# petry-projects/.github/.github/workflows/feature-ideation-reusable.yml # All ideation logic, the multi-skill pipeline, the Opus 4.6 model # selection, and the github_token override live in the reusable workflow. # @@ -29,7 +29,7 @@ # of your project, its target users, and the competitive landscape Mary # should research. This is the only required customisation. # 3. (Optional) Copy standards/feature-ideation-sources.md from -# combsmith/.github to .github/feature-ideation-sources.md in your +# petry-projects/.github to .github/feature-ideation-sources.md in your # repo and trim/extend it for your project. Mary uses YOUR copy — not the # central template — so each repo controls its own source list. # Pass `sources_file: path/to/your-list.md` to the reusable workflow if @@ -38,7 +38,7 @@ # 5. Ensure GitHub Discussions is enabled with an "Ideas" category. # 6. Confirm the org-level secret CLAUDE_CODE_OAUTH_TOKEN is accessible. # -# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md#8-feature-ideation-feature-ideationyml--bmad-method-repos +# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md#8-feature-ideation-feature-ideationyml--bmad-method-repos name: Feature Research & Ideation (BMAD Analyst) on: @@ -182,7 +182,7 @@ jobs: discussions: write id-token: write actions: read - uses: combsmith/.github/.github/workflows/feature-ideation-reusable.yml@feature-ideation/v1-ring0 # NOSONAR(githubactions:S7637) first-party channel ref + uses: petry-projects/.github/.github/workflows/feature-ideation-reusable.yml@feature-ideation/v1-ring0 # NOSONAR(githubactions:S7637) first-party channel ref with: # All values below come from `needs.prep.outputs.*` (resolved in the `prep` # job) — NOT the `inputs` context — so this reusable `with:` compiles on the @@ -191,8 +191,8 @@ jobs: # `discussion: created`; empty on schedule/dispatch → normal scan. target_discussion: ${{ needs.prep.outputs.target_discussion }} project_context: | - combsmith/.github is the org-level standards and tooling repository - for the combsmith GitHub organisation. It owns the canonical CI/CD + petry-projects/.github is the org-level standards and tooling repository + for the petry-projects GitHub organisation. It owns the canonical CI/CD standards (ci-standards.md), all reusable GitHub Actions workflows (claude-code, feature-ideation, agent-shield, dependabot), the BMAD Method agentic development framework, and org-wide security and diff --git a/.github/workflows/idea-enhancer-reusable.yml b/.github/workflows/idea-enhancer-reusable.yml index 6ca7c0ac9..e7a40c7de 100644 --- a/.github/workflows/idea-enhancer-reusable.yml +++ b/.github/workflows/idea-enhancer-reusable.yml @@ -1,10 +1,10 @@ # Reusable Idea Enhancer — fleet dispatch workflow. # Single source of truth for the org: the dispatch logic lives here. Repo-level # idea-enhancer.yml files are thin caller stubs. -# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md # # When a human opens a new Ideas Discussion (or on a weekly safety-net sweep), it -# re-dispatches the CENTRAL idea-enhancer in combsmith/.github-private with +# re-dispatches the CENTRAL idea-enhancer in petry-projects/.github-private with # the CALLER repo as `target_repo`. The analyst enriches THIS repo's open, # human-authored, not-yet-enhanced Ideas Discussions (one comment each: sharpened # problem/goal, repo + market context, impact/effort, suggested acceptance @@ -27,7 +27,7 @@ on: central_repo: description: "owner/repo hosting the central idea-enhancer.yml workflow." required: false - default: "combsmith/.github-private" + default: "petry-projects/.github-private" type: string secrets: GH_PAT_DON_PETRY: diff --git a/.github/workflows/idea-triage-reusable.yml b/.github/workflows/idea-triage-reusable.yml index 896511a52..785154b8b 100644 --- a/.github/workflows/idea-triage-reusable.yml +++ b/.github/workflows/idea-triage-reusable.yml @@ -1,10 +1,10 @@ # Reusable Idea Triage — fleet dispatch workflow. # Single source of truth for the org: the dispatch logic lives here. Repo-level # idea-triage.yml files are thin caller stubs. -# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md # # Weekly (and on demand) it re-dispatches the CENTRAL idea-triage workflow in -# combsmith/.github-private with the CALLER repo as `target_repo`, so the +# petry-projects/.github-private with the CALLER repo as `target_repo`, so the # BMAD analyst scores THIS repo's Ideas backlog and refreshes THIS repo's "Idea # Promotion Queue" tracking issue. The triage tooling and vendored personas stay # vendored once, centrally — fleet repos only ship this thin trigger. @@ -24,7 +24,7 @@ on: central_repo: description: "owner/repo hosting the central idea-triage.yml workflow." required: false - default: "combsmith/.github-private" + default: "petry-projects/.github-private" type: string secrets: GH_PAT_DON_PETRY: diff --git a/.github/workflows/initiative-driver.yml b/.github/workflows/initiative-driver.yml index 3b7b158d3..f8a7098ae 100644 --- a/.github/workflows/initiative-driver.yml +++ b/.github/workflows/initiative-driver.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: combsmith/.github/standards/workflows/initiative-driver.yml -# Standard: combsmith/.github/standards/ci-standards.md -# Central driver: combsmith/.github-private/.github/workflows/initiative-driver.yml +# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/initiative-driver.yml +# Standard: petry-projects/.github/standards/ci-standards.md +# Central driver: petry-projects/.github-private/.github/workflows/initiative-driver.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All dependency-aware release logic (the @@ -12,23 +12,23 @@ # is pure-bash (no claude-code-action), so this stub dispatches the central # workflow_dispatch DIRECTLY with `gh workflow run`. No LLM runs here. # • You MUST NOT change: the dispatch target -# (-R combsmith/.github-private -f target_repo=), +# (-R petry-projects/.github-private -f target_repo=), # the `initiative:auto` label filter, or the PAT guard. # • If you need different release behaviour, open a PR against the central -# driver in combsmith/.github-private — never by editing callers. +# driver in petry-projects/.github-private — never by editing callers. # ───────────────────────────────────────────────────────────────────────────── # # Initiative Driver — per-repo dispatcher, thin caller for the central driver. # # On this repo's issues:[closed, labeled] (plus a safety-net off-peak schedule), # this stub dispatches the CENTRAL initiative-driver in -# combsmith/.github-private with target_repo=. The central +# petry-projects/.github-private with target_repo=. The central # driver then sweeps this repo's `initiative:auto` epics and releases their ready # sub-issues to dev-lead — so the central driver does not have to watch every # enrolled repo's events. # # Rate-limit gate (#640): before dispatching, this stub asks the source-side -# agent-rate-limit gate (combsmith/.github/scripts/agent-rate-limit-gate.sh) +# agent-rate-limit gate (petry-projects/.github/scripts/agent-rate-limit-gate.sh) # whether `initiative-driver` may dispatch right now. initiative-driver is the # canary that ENFORCES: the gate derives concurrency / cooldown / daily-budget / # consecutive-failure counters from this stub's own run history (no state @@ -38,7 +38,7 @@ # cancels a superseded run before any step (gate included) executes (#443/#402). # A `defer` simply skips the dispatch step — never a cancel, never a job failure. # -# Gate tooling is fetched at a pinned commit SHA of combsmith/.github (not +# Gate tooling is fetched at a pinned commit SHA of petry-projects/.github (not # a moving tag — the PAT is handed to that code). If the tooling is unavailable # or the gate errors, the gate step FAILS LOUDLY (::error:: annotation + step # summary, step marked failed) but the dispatch still runs (fail-open — an @@ -49,12 +49,12 @@ # 2. Ensure the `initiative:auto` label exists on the repo. # 3. Confirm the org-level secret GH_PAT_DON_PETRY (or the legacy fallback # GH_PAT_WORKFLOWS) is accessible **and its owner has write access to -# combsmith/.github-private** (to dispatch the central workflow) **and +# petry-projects/.github-private** (to dispatch the central workflow) **and # to this repo** (the central driver applies the `dev-lead` label # cross-repo with that PAT; a label applied with GITHUB_TOKEN would not # trigger dev-lead). # -# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md name: Initiative Driver — Dispatch Central on: @@ -100,7 +100,7 @@ jobs: - name: Checkout agent-rate-limit gate tooling # Phase-4 wiring (#640): the gate library + orchestrator live in - # combsmith/.github; an enrolled caller stub does not carry them, so + # petry-projects/.github; an enrolled caller stub does not carry them, so # fetch them read-only into a scratch path. Uses the same PAT as the # dispatch — the workflow's GITHUB_TOKEN cannot read another repo — so the # stub's `permissions:` block is unchanged. @@ -108,14 +108,14 @@ jobs: # the gate step then finds no script, reports an ::error:: (fail loudly), # emits no decision, and the dispatch step's `!= 'defer'` guard falls # through to dispatching (fail-open). - # ref: pinned to an immutable commit SHA of combsmith/.github (#1232) + # ref: pinned to an immutable commit SHA of petry-projects/.github (#1232) # — a moving tag silently lagged the gate script (v1 predates it) and # would hand the PAT to whatever the tag next points at. Bump it in a # reviewed PR (see standards/agent-rate-limits.md §3.1). continue-on-error: true uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: combsmith/.github + repository: petry-projects/.github ref: cd0b16751454d2eb3486ec04477d7ee9cc96c425 # main @ 2026-10-02 (#1232) path: .arl-gate-tooling fetch-depth: 1 @@ -178,5 +178,5 @@ jobs: TARGET_REPO: ${{ github.repository }} run: | gh workflow run initiative-driver.yml \ - -R combsmith/.github-private \ + -R petry-projects/.github-private \ -f target_repo="${TARGET_REPO}" diff --git a/.github/workflows/initiative-planner-reusable.yml b/.github/workflows/initiative-planner-reusable.yml index 109c6d454..43ffa9134 100644 --- a/.github/workflows/initiative-planner-reusable.yml +++ b/.github/workflows/initiative-planner-reusable.yml @@ -1,11 +1,11 @@ # Reusable Initiative Planner — Approval Trigger workflow. # Single source of truth for the org: all idea→initiative dispatch logic lives # here. Repo-level initiative-planner.yml files are thin caller stubs. -# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md # # Fires when a maintainer adds the `idea:approved` label to an Ideas Discussion # in a fleet repo. It does NOT plan inline — the BMAD Scrum Master (Bob) and the -# vendored BMAD frameworks live centrally in combsmith/.github-private, and +# vendored BMAD frameworks live centrally in petry-projects/.github-private, and # claude-code-action aborts on `discussion` event contexts ("Unsupported event # type: discussion"). So this reusable resolves the discussion number and # re-dispatches the CENTRAL initiative-planner via workflow_dispatch, passing the @@ -17,7 +17,7 @@ # GitHub does not start new workflow runs from a workflow_dispatch fired with # the default GITHUB_TOKEN (loop prevention). The dispatch MUST use a PAT with # workflow scope (GH_PAT_WORKFLOWS), the same constraint documented in -# combsmith/.github-private scripts/initiative-planner/redispatch.sh. +# petry-projects/.github-private scripts/initiative-planner/redispatch.sh. # # Requires: # GH_PAT_WORKFLOWS — org secret, classic PAT (repo + workflow scope) used to @@ -30,7 +30,7 @@ on: planner_repo: description: "owner/repo hosting the central initiative-planner.yml workflow." required: false - default: "combsmith/.github-private" + default: "petry-projects/.github-private" type: string secrets: GH_PAT_DON_PETRY: diff --git a/.github/workflows/initiative-planner.yml b/.github/workflows/initiative-planner.yml index 16b44bf65..39a788cd4 100644 --- a/.github/workflows/initiative-planner.yml +++ b/.github/workflows/initiative-planner.yml @@ -1,7 +1,7 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: combsmith/.github/standards/workflows/initiative-planner.yml -# Standard: combsmith/.github/standards/ci-standards.md -# Reusable: combsmith/.github/.github/workflows/initiative-planner-reusable.yml +# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/initiative-planner.yml +# Standard: petry-projects/.github/standards/ci-standards.md +# Reusable: petry-projects/.github/.github/workflows/initiative-planner-reusable.yml # # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All idea→initiative dispatch logic (the @@ -21,7 +21,7 @@ # # When a maintainer adds `idea:approved` to an Ideas Discussion in this repo, # the reusable re-dispatches the CENTRAL initiative-planner (BMAD Scrum Master -# "Bob") in combsmith/.github-private with this repo as the target. Bob +# "Bob") in petry-projects/.github-private with this repo as the target. Bob # reads this repo's Discussion and materializes an inert epic + sub-issue DAG # here (labelled `initiative`, NOT `initiative:auto`). A maintainer then adds # `initiative:auto` to the epic to hand it to initiative-driver. The frameworks @@ -33,7 +33,7 @@ # 3. Ensure the `idea:approved` label exists on the repo. # 4. Confirm the org-level secret GH_PAT_WORKFLOWS is accessible. # -# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md +# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md name: Initiative Planner — Approval Trigger on: @@ -44,7 +44,7 @@ permissions: {} jobs: initiative-planner: - # Self-host: combsmith/.github HOSTS the reusable, so this in-repo copy + # Self-host: petry-projects/.github HOSTS the reusable, so this in-repo copy # uses a LOCAL ref (always current) — not the `@initiative-planner/v1-stable` # remote channel that CONSUMER repos pin (see standards/workflows/initiative-planner.yml). # Mirrors add-to-project.yml / pr-review-mention.yml; local refs also avoid the diff --git a/.github/workflows/migration-tooling-tests.yml b/.github/workflows/migration-tooling-tests.yml index 66f026ab9..f31b2ba42 100644 --- a/.github/workflows/migration-tooling-tests.yml +++ b/.github/workflows/migration-tooling-tests.yml @@ -11,7 +11,7 @@ # bare-tier retirement path # # Standard: the migration helper is DRY_RUN-aware and mutates only through the gh -# Git-refs API (never a direct push). See combsmith/.github#698. +# Git-refs API (never a direct push). See petry-projects/.github#698. name: Migration Tooling Tests diff --git a/.github/workflows/org-scorecard.yml b/.github/workflows/org-scorecard.yml index 6a1740cbd..87d92592a 100644 --- a/.github/workflows/org-scorecard.yml +++ b/.github/workflows/org-scorecard.yml @@ -1,6 +1,6 @@ # OpenSSF Scorecard security posture review for all public repos. # Creates/updates/closes GitHub Issues for findings across the org. -# Standard: https://github.com/combsmith/.github/blob/main/standards/ci-standards.md#openssf-scorecard-org-scorecardyml +# Standard: https://github.com/petry-projects/.github/blob/main/standards/ci-standards.md#openssf-scorecard-org-scorecardyml name: Org Scorecard Review # readme-report: Weekly OpenSSF Scorecard security-posture review across public repos; findings tracked as issues. @@ -34,7 +34,7 @@ jobs: run: | set -euo pipefail - ORG="combsmith" + ORG="petry-projects" SKIP_CHECKS="CII-Best-Practices,Contributors,Fuzzing,Maintained,Packaging,Signed-Releases" RESULTS_DIR=$(mktemp -d) SUMMARY_FILE="$RESULTS_DIR/summary.md" diff --git a/.github/workflows/persona-mention-reusable.yml b/.github/workflows/persona-mention-reusable.yml index 1737993d7..177a8d76b 100644 --- a/.github/workflows/persona-mention-reusable.yml +++ b/.github/workflows/persona-mention-reusable.yml @@ -1,8 +1,8 @@ # Reusable Persona Mention Router. -# SOURCE OF TRUTH: combsmith/.github/.github/workflows/persona-mention-reusable.yml -# Standard: https://github.com/combsmith/.github/blob/main/standards/persona-standards.md (§4.1) +# SOURCE OF TRUTH: petry-projects/.github/.github/workflows/persona-mention-reusable.yml +# Standard: https://github.com/petry-projects/.github/blob/main/standards/persona-standards.md (§4.1) # -# Routes `@combsmith/` mentions to the addressed persona. ONE router +# Routes `@petry-projects/` mentions to the addressed persona. ONE router # for every persona — personas do NOT each ship a mention workflow (§4.1); that # per-agent drift is exactly what the manifest exists to prevent. # @@ -20,10 +20,10 @@ # # How a mention resolves, and why there is no index: # `validate-personas.py` enforces address.handle's slug == id == the persona's -# directory name, so '@combsmith/qa-lead' resolves to +# directory name, so '@petry-projects/qa-lead' resolves to # personas/qa-lead/persona.yml in .github-private by convention. The manifest # IS the index-of-record (§1.1). A 404 means "not a persona" — which is also -# how a real, non-persona team like @combsmith/org-leads falls through +# how a real, non-persona team like @petry-projects/org-leads falls through # harmlessly. # # The manifest, not this file, decides: @@ -52,7 +52,7 @@ on: inputs: tooling_ref: description: | - Ref of combsmith/.github to source scripts/lib/persona-mention.sh + Ref of petry-projects/.github to source scripts/lib/persona-mention.sh from. Leave empty (the default) to source it from THIS reusable's own commit (`github.job_workflow_sha`), which guarantees the routing logic always matches the version of this workflow the caller pinned, with no @@ -64,7 +64,7 @@ on: type: string persona_ref: description: | - Ref of combsmith/.github-private to read persona manifests at. + Ref of petry-projects/.github-private to read persona manifests at. Defaults to main — a persona's live contract is what is merged, not what a branch proposes. Override only for end-to-end testing. required: false @@ -113,7 +113,7 @@ jobs: # it in its own manifest (enforced below), never loosen it — so this gate is # always at least as strict as the union of what the personas allow. if: | - contains(github.event.comment.body, '@combsmith/') && + contains(github.event.comment.body, '@petry-projects/') && github.event.comment.user.login != 'donpetry-bot' && github.event.comment.user.login != 'github-actions[bot]' && !contains(github.event.comment.body, ' escalation is absent (retired)" { # AC4 retires the redundant stuck-comment escalation as dead code. The primary - # retirement lives in combsmith/.github-private#711; this guard ensures the + # retirement lives in petry-projects/.github-private#711; this guard ensures the # weaker sentinel is never (re)introduced into this repo's auto-rebase reusable. run grep -F 'auto-rebase-stuck' "$REUSABLE" [ "$status" -eq 1 ] diff --git a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats index ed49d4dea..29d1af2f7 100644 --- a/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats +++ b/test/workflows/dismiss-stale-bot-reviews/orchestrator.bats @@ -49,7 +49,7 @@ STUB teardown() { rm -rf "${TT_TMP:-/nonexistent}"; } @test "dismisses ONLY the stale allow-listed bot review; leaves head/human/approved" { - run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github --pr 1094 --apply + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --apply [ "$status" -eq 0 ] # Assert the script's summary output before the log-inspecting `run grep` calls # below overwrite bats's $output. @@ -69,7 +69,7 @@ teardown() { rm -rf "${TT_TMP:-/nonexistent}"; } } @test "dry-run examines but dismisses nothing (no mutation)" { - run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github --pr 1094 --dry-run + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --dry-run [ "$status" -eq 0 ] # Assert the dry-run output before the `run grep` below overwrites $output. echo "$output" | grep -q '\[dry-run\] would dismiss review PRR_stale' @@ -107,7 +107,7 @@ cat "\$DSBR_RESPONSE" STUB chmod +x "${TT_TMP}/bin/gh" - run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github --pr 1094 + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 [ "$status" -eq 0 ] # The read query pins the opinionated connection and never the plain one. grep -q 'latestOpinionatedReviews' "$qlog" @@ -161,7 +161,7 @@ cat "$DSBR_PAGE1" STUB chmod +x "${TT_TMP}/bin/gh" - run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github --pr 1094 --apply + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --apply [ "$status" -eq 0 ] # Assert the paginated summary before the `run grep` below overwrites $output. echo "$output" | grep -q 'examined 2 effective review(s), dismissed 1 stale bot review' @@ -193,7 +193,7 @@ printf '%s' '{"data":{"repository":{"pullRequest":{"headRefOid":"deadbeef"}}}}' STUB chmod +x "${TT_TMP}/bin/gh" - run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github --pr 1094 + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 [ "$status" -eq 0 ] echo "$output" | grep -q 'PR head moved from 8e5bc8db to deadbeef' # nothing was dismissed @@ -216,7 +216,7 @@ cat "$DSBR_RESPONSE" STUB chmod +x "${TT_TMP}/bin/gh" - run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github --pr 1094 --apply + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github --pr 1094 --apply [ "$status" -eq 0 ] echo "$output" | grep -q 'returned a GraphQL errors envelope' # the phantom dismissal is not counted @@ -224,7 +224,7 @@ STUB } @test "requires --owner, --name and --pr" { - run env GH_TOKEN=x bash "$ORCH" --owner combsmith --name .github + run env GH_TOKEN=x bash "$ORCH" --owner petry-projects --name .github [ "$status" -ne 0 ] echo "$output" | grep -q 'required' } diff --git a/test/workflows/feature-ideation/collect-signals.bats b/test/workflows/feature-ideation/collect-signals.bats index e25e270f7..94f9a12b6 100644 --- a/test/workflows/feature-ideation/collect-signals.bats +++ b/test/workflows/feature-ideation/collect-signals.bats @@ -10,7 +10,7 @@ load 'helpers/setup' setup() { tt_make_tmpdir tt_install_gh_stub - export REPO="combsmith/talkterm" + export REPO="petry-projects/talkterm" export GH_TOKEN="fake-token-for-tests" export SIGNALS_OUTPUT="${TT_TMP}/signals.json" } @@ -164,7 +164,7 @@ build_happy_script() { # --------------------------------------------------------------------------- @test "collect-signals: open-issue truncation is detected BEFORE bot filtering" { - # Caught by Copilot review on PR combsmith/.github#85: previously the + # Caught by Copilot review on PR petry-projects/.github#85: previously the # truncation check ran AFTER filter_bots_apply, so a result set composed # entirely of bots could drop below ISSUE_LIMIT and mask real truncation. # Build a fixture with ISSUE_LIMIT=3 raw items, all bot-authored. Bot diff --git a/test/workflows/feature-ideation/date-utils.bats b/test/workflows/feature-ideation/date-utils.bats index fd9e3abc5..a26749ff3 100644 --- a/test/workflows/feature-ideation/date-utils.bats +++ b/test/workflows/feature-ideation/date-utils.bats @@ -17,7 +17,7 @@ setup() { @test "date_days_ago: 0 returns today" { # Use the helper function rather than the raw system `date` call so the test # validates behaviour consistently on both GNU and BSD systems. - # Caught by CodeRabbit review on PR combsmith/.github#85. + # Caught by CodeRabbit review on PR petry-projects/.github#85. today=$(date_today) run date_days_ago 0 [ "$status" -eq 0 ] diff --git a/test/workflows/feature-ideation/discussion-mutations.bats b/test/workflows/feature-ideation/discussion-mutations.bats index 8b36e7fab..671e9b3ae 100644 --- a/test/workflows/feature-ideation/discussion-mutations.bats +++ b/test/workflows/feature-ideation/discussion-mutations.bats @@ -102,7 +102,7 @@ teardown() { } # --------------------------------------------------------------------------- -# Regression test for Copilot review on PR combsmith/.github#85: +# Regression test for Copilot review on PR petry-projects/.github#85: # add_label_to_discussion previously sent labelIds via -f as the literal # string `["L_1"]` which the GraphQL API rejects (labelIds is [ID!]!). # The fix routes through gh_safe_graphql_input with a properly built JSON diff --git a/test/workflows/feature-ideation/fixtures/expected/INVALID-missing-field.signals.json b/test/workflows/feature-ideation/fixtures/expected/INVALID-missing-field.signals.json index 03f07c772..897f5a28f 100644 --- a/test/workflows/feature-ideation/fixtures/expected/INVALID-missing-field.signals.json +++ b/test/workflows/feature-ideation/fixtures/expected/INVALID-missing-field.signals.json @@ -1,6 +1,6 @@ { "schema_version": "1.0.0", "scan_date": "2026-04-07T07:00:00Z", - "repo": "combsmith/talkterm", + "repo": "petry-projects/talkterm", "open_issues": { "count": 0, "items": [] } } diff --git a/test/workflows/feature-ideation/fixtures/expected/empty-repo.signals.json b/test/workflows/feature-ideation/fixtures/expected/empty-repo.signals.json index 37b6b4e4d..4101afb67 100644 --- a/test/workflows/feature-ideation/fixtures/expected/empty-repo.signals.json +++ b/test/workflows/feature-ideation/fixtures/expected/empty-repo.signals.json @@ -1,7 +1,7 @@ { "schema_version": "1.0.0", "scan_date": "2026-04-07T07:00:00Z", - "repo": "combsmith/talkterm", + "repo": "petry-projects/talkterm", "open_issues": { "count": 0, "items": [] }, "closed_issues_30d": { "count": 0, "items": [] }, "ideas_discussions": { "count": 0, "items": [] }, diff --git a/test/workflows/feature-ideation/fixtures/expected/populated.signals.json b/test/workflows/feature-ideation/fixtures/expected/populated.signals.json index f9e78bd2d..4c929219e 100644 --- a/test/workflows/feature-ideation/fixtures/expected/populated.signals.json +++ b/test/workflows/feature-ideation/fixtures/expected/populated.signals.json @@ -1,7 +1,7 @@ { "schema_version": "1.0.0", "scan_date": "2026-04-07T07:00:00Z", - "repo": "combsmith/talkterm", + "repo": "petry-projects/talkterm", "open_issues": { "count": 2, "items": [ diff --git a/test/workflows/feature-ideation/fixtures/expected/truncated.signals.json b/test/workflows/feature-ideation/fixtures/expected/truncated.signals.json index 58e664089..845db66f9 100644 --- a/test/workflows/feature-ideation/fixtures/expected/truncated.signals.json +++ b/test/workflows/feature-ideation/fixtures/expected/truncated.signals.json @@ -1,7 +1,7 @@ { "schema_version": "1.0.0", "scan_date": "2026-04-07T07:00:00Z", - "repo": "combsmith/talkterm", + "repo": "petry-projects/talkterm", "open_issues": { "count": 0, "items": [] }, "closed_issues_30d": { "count": 0, "items": [] }, "ideas_discussions": { "count": 0, "items": [] }, diff --git a/test/workflows/feature-ideation/gh-safe.bats b/test/workflows/feature-ideation/gh-safe.bats index 242e017a5..046446d7c 100644 --- a/test/workflows/feature-ideation/gh-safe.bats +++ b/test/workflows/feature-ideation/gh-safe.bats @@ -70,7 +70,7 @@ teardown() { # --------------------------------------------------------------------------- @test "rest: EXITS NON-ZERO on auth failure (gh exit 4) and reports the failure category" { - # CodeRabbit on PR combsmith/.github#85: the previous assertion + # CodeRabbit on PR petry-projects/.github#85: the previous assertion # ended with `|| true`, so it always passed regardless of the message # content. Use --separate-stderr to capture stderr and assert the # structured `[gh-safe][rest-failure]` prefix is emitted. @@ -169,7 +169,7 @@ teardown() { } # --------------------------------------------------------------------------- -# Regression tests for Copilot review feedback on PR combsmith/.github#85 +# Regression tests for Copilot review feedback on PR petry-projects/.github#85 # --------------------------------------------------------------------------- @test "graphql: invalid --jq filter EXITS NON-ZERO instead of returning []" { diff --git a/test/workflows/feature-ideation/lint-prompt.bats b/test/workflows/feature-ideation/lint-prompt.bats index 7371e4cad..1ba14d1a4 100644 --- a/test/workflows/feature-ideation/lint-prompt.bats +++ b/test/workflows/feature-ideation/lint-prompt.bats @@ -161,7 +161,7 @@ YML # --------------------------------------------------------------------------- # Exit-code precedence: file errors (2) must not be downgraded by later lint -# findings (1). Caught by CodeRabbit review on PR combsmith/.github#85. +# findings (1). Caught by CodeRabbit review on PR petry-projects/.github#85. # --------------------------------------------------------------------------- @test "lint-prompt: missing file before lint-failing file still exits 2" { @@ -199,7 +199,7 @@ YML @test "lint-prompt: GitHub Actions expressions with nested braces do not false-positive" { # ${{ format('${FOO}', github.ref) }} should be stripped entirely so ${FOO} # inside the expression is not flagged as a bare shell expansion. - # Caught by CodeRabbit review on PR combsmith/.github#85. + # Caught by CodeRabbit review on PR petry-projects/.github#85. write_yml "${TT_TMP}/nested-expr.yml" <<'YML' jobs: analyze: diff --git a/test/workflows/feature-ideation/match-discussions.bats b/test/workflows/feature-ideation/match-discussions.bats index 3e6bcbc4a..b92bce07a 100644 --- a/test/workflows/feature-ideation/match-discussions.bats +++ b/test/workflows/feature-ideation/match-discussions.bats @@ -21,7 +21,7 @@ teardown() { # Computes the discussions count from the array length so the fixture # always satisfies the producer/consumer contract (even though the # matcher only reads .items, validating contracts in test fixtures -# is good hygiene). CodeRabbit on PR combsmith/.github#85. +# is good hygiene). CodeRabbit on PR petry-projects/.github#85. build_signals() { local discussions="$1" local count @@ -30,7 +30,7 @@ build_signals() { { "schema_version": "1.0.0", "scan_date": "2026-04-07T00:00:00Z", - "repo": "combsmith/talkterm", + "repo": "petry-projects/talkterm", "open_issues": { "count": 0, "items": [] }, "closed_issues_30d": { "count": 0, "items": [] }, "ideas_discussions": { "count": ${count}, "items": ${discussions} }, @@ -168,7 +168,7 @@ build_proposals() { } @test "match: rejects non-numeric MATCH_THRESHOLD with usage error" { - # Caught by Copilot review on PR combsmith/.github#85: previously + # Caught by Copilot review on PR petry-projects/.github#85: previously # a typo in MATCH_THRESHOLD produced an opaque Python traceback. build_signals '[]' build_proposals '[{"title":"x"}]' @@ -193,7 +193,7 @@ build_proposals() { } @test "match: malformed JSON in signals file exits non-zero" { - # Caught by CodeRabbit review on PR combsmith/.github#85. + # Caught by CodeRabbit review on PR petry-projects/.github#85. printf 'not valid json' >"${TT_TMP}/signals.json" build_proposals '[{"title":"x"}]' run bash "$MATCH" "${TT_TMP}/signals.json" "${TT_TMP}/proposals.json" @@ -201,7 +201,7 @@ build_proposals() { } @test "match: malformed JSON in proposals file exits non-zero" { - # Caught by CodeRabbit review on PR combsmith/.github#85. + # Caught by CodeRabbit review on PR petry-projects/.github#85. build_signals '[]' printf 'not valid json' >"${TT_TMP}/proposals.json" run bash "$MATCH" "${TT_TMP}/signals.json" "${TT_TMP}/proposals.json" diff --git a/test/workflows/feature-ideation/signals-schema.bats b/test/workflows/feature-ideation/signals-schema.bats index 54c7a3f85..6c19d8fb6 100644 --- a/test/workflows/feature-ideation/signals-schema.bats +++ b/test/workflows/feature-ideation/signals-schema.bats @@ -53,7 +53,7 @@ FIX="${TT_FIXTURES_DIR}/expected" } @test "schema: invalid date-time scan_date FAILS validation (format checker enforced)" { - # Caught by Copilot review on PR combsmith/.github#85: + # Caught by Copilot review on PR petry-projects/.github#85: # Draft202012Validator does NOT enforce `format` keywords by default. # The validator must instantiate FormatChecker explicitly. bad_file="${BATS_TEST_TMPDIR}/bad-scan-date.json" @@ -70,7 +70,7 @@ FIX="${TT_FIXTURES_DIR}/expected" } @test "schema: RFC-3339 lowercase t/z date-time scan_date passes" { - # codeant-ai on PR combsmith/.github#1194: RFC-3339 §5.6 permits a + # codeant-ai on PR petry-projects/.github#1194: RFC-3339 §5.6 permits a # lowercase "t" separator and lowercase "z" zone designator; the checker # must accept them, not just their uppercase forms. good_file="${BATS_TEST_TMPDIR}/lowercase-scan-date.json" @@ -89,7 +89,7 @@ FIX="${TT_FIXTURES_DIR}/expected" } @test "schema: SCHEMA_VERSION constant matches schema file version comment" { - # CodeRabbit on PR combsmith/.github#85: enforce that the + # CodeRabbit on PR petry-projects/.github#85: enforce that the # SCHEMA_VERSION constant in collect-signals.sh stays in lockstep with # the version annotation in signals.schema.json. Bumping one without # the other is a compatibility break. diff --git a/test/workflows/feature-ideation/stubs/gh b/test/workflows/feature-ideation/stubs/gh index 7a62098ee..27584df25 100755 --- a/test/workflows/feature-ideation/stubs/gh +++ b/test/workflows/feature-ideation/stubs/gh @@ -23,7 +23,7 @@ set -euo pipefail if [ -n "${GH_STUB_LOG:-}" ]; then # Use %q so each arg is shell-quoted; tests can re-parse argv losslessly. - # Caught by Copilot review on PR combsmith/.github#85: previously + # Caught by Copilot review on PR petry-projects/.github#85: previously # used $* which joined with spaces and lost argument boundaries. # shellcheck disable=SC2059 printf '%q ' "$@" >>"$GH_STUB_LOG" diff --git a/test/workflows/initiative-driver/gate-tooling.bats b/test/workflows/initiative-driver/gate-tooling.bats index cc10796d0..ce6249e75 100644 --- a/test/workflows/initiative-driver/gate-tooling.bats +++ b/test/workflows/initiative-driver/gate-tooling.bats @@ -21,10 +21,10 @@ GATE_STEP='Agent rate-limit admission gate (enforcing)' [ "$output" = 'cd0b16751454d2eb3486ec04477d7ee9cc96c425' ] } -@test "stub: gate tooling checkout still targets combsmith/.github" { +@test "stub: gate tooling checkout still targets petry-projects/.github" { run yq -r ".jobs.dispatch.steps[] | select(.name == \"${CHECKOUT_STEP}\") | .with.repository" "$STUB" [ "$status" -eq 0 ] - [ "$output" = 'combsmith/.github' ] + [ "$output" = 'petry-projects/.github' ] } @test "stub: gate step detects a missing gate script and reports an ::error::" { diff --git a/test/workflows/pr-auto-review/sweep-dispatch.bats b/test/workflows/pr-auto-review/sweep-dispatch.bats index 29a612eb7..3cb055f05 100644 --- a/test/workflows/pr-auto-review/sweep-dispatch.bats +++ b/test/workflows/pr-auto-review/sweep-dispatch.bats @@ -82,19 +82,19 @@ STUB setup() { write_gh_stub export GH_TOKEN="t" - export SEARCH_OWNER="combsmith" + export SEARCH_OWNER="petry-projects" export SWEEP_LABEL="standards-sync" export MAX_PER_RUN="8" export DRY_RUN="0" - export DISPATCH_REPO="combsmith/.github-private" + export DISPATCH_REPO="petry-projects/.github-private" # Keep retries bounded and instant so the suite stays fast + deterministic. export DISPATCH_RETRIES="2" export DISPATCH_RETRY_SLEEP="0" export STUB_COUNTER="${BATS_TEST_TMPDIR}/dispatch-count" # Two ready, non-draft PRs. export STUB_PR_LIST='[ - {"url":"https://github.com/combsmith/repo-a/pull/1","isDraft":false}, - {"url":"https://github.com/combsmith/repo-c/pull/3","isDraft":false} + {"url":"https://github.com/petry-projects/repo-a/pull/1","isDraft":false}, + {"url":"https://github.com/petry-projects/repo-c/pull/3","isDraft":false} ]' } @@ -105,38 +105,38 @@ run_sweep() { run bash "${TT_SCRIPTS_DIR}/sweep-dispatch.sh"; } @test "sweep: both ready PRs dispatch and the run succeeds" { run_sweep [ "$status" -eq 0 ] - echo "$output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-a/pull/1' - echo "$output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-c/pull/3' + echo "$output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-a/pull/1' + echo "$output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-c/pull/3' echo "$output" | grep -q 'dispatched 2 of 2' } # ── fault isolation: a transient dispatch failure must not abort the sweep ───── @test "sweep: a transient dispatch failure on one PR does not abort the run" { - export STUB_DISPATCH_FAIL_URL="https://github.com/combsmith/repo-a/pull/1" + export STUB_DISPATCH_FAIL_URL="https://github.com/petry-projects/repo-a/pull/1" run_sweep # The whole run must still succeed — a transient dispatch error is retried # next cycle, not a workflow failure. [ "$status" -eq 0 ] # repo-a persistently fails → warning, not an abort. - echo "$output" | grep -q 'failed to dispatch https://github.com/combsmith/repo-a/pull/1' + echo "$output" | grep -q 'failed to dispatch https://github.com/petry-projects/repo-a/pull/1' # repo-c is still reached and dispatched (loop was not aborted). - echo "$output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-c/pull/3' + echo "$output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-c/pull/3' echo "$output" | grep -q 'dispatched 1 of 2' } # ── fault isolation: a transient fact-fetch failure skips only that PR ───────── @test "sweep: a transient 'gh pr view' failure skips that PR and continues" { - export STUB_VIEW_FAIL_URL="https://github.com/combsmith/repo-a/pull/1" + export STUB_VIEW_FAIL_URL="https://github.com/petry-projects/repo-a/pull/1" run_sweep [ "$status" -eq 0 ] local sweep_output="$output" # repo-c still dispatches. - echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-c/pull/3' + echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-c/pull/3' echo "$sweep_output" | grep -q 'dispatched 1 of 2' # repo-a could not be evaluated → skipped, never dispatched. - run grep -q 'dispatched auto-review for https://github.com/combsmith/repo-a/pull/1' <<< "$sweep_output" + run grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-a/pull/1' <<< "$sweep_output" [ "$status" -eq 1 ] } @@ -145,11 +145,11 @@ run_sweep() { run bash "${TT_SCRIPTS_DIR}/sweep-dispatch.sh"; } @test "sweep: a dispatch that fails once is retried and then succeeds" { export STUB_DISPATCH_FAIL_ONCE="1" # Only one PR so the single retry budget is spent on it deterministically. - export STUB_PR_LIST='[{"url":"https://github.com/combsmith/repo-a/pull/1","isDraft":false}]' + export STUB_PR_LIST='[{"url":"https://github.com/petry-projects/repo-a/pull/1","isDraft":false}]' run_sweep [ "$status" -eq 0 ] local sweep_output="$output" - echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-a/pull/1' + echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-a/pull/1' echo "$sweep_output" | grep -q 'dispatched 1 of 1' # No persistent-failure warning — the retry recovered it. run grep -q 'failed to dispatch' <<< "$sweep_output" @@ -168,10 +168,10 @@ run_sweep() { run bash "${TT_SCRIPTS_DIR}/sweep-dispatch.sh"; } [ "$status" -eq 0 ] local sweep_output="$output" # repo-c is still reached and dispatched — null data on repo-a must not abort. - echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-c/pull/3' + echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-c/pull/3' echo "$sweep_output" | grep -q 'dispatched 1 of 2' # repo-a had null PR data → warning + skip, never dispatched. - run grep -q 'dispatched auto-review for https://github.com/combsmith/repo-a/pull/1' <<< "$sweep_output" + run grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-a/pull/1' <<< "$sweep_output" [ "$status" -eq 1 ] } @@ -186,10 +186,10 @@ run_sweep() { run bash "${TT_SCRIPTS_DIR}/sweep-dispatch.sh"; } [ "$status" -eq 0 ] local sweep_output="$output" # repo-c is still reached and dispatched — errors on repo-a must not abort. - echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-c/pull/3' + echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-c/pull/3' echo "$sweep_output" | grep -q 'dispatched 1 of 2' # repo-a had GraphQL errors → warning + skip, never dispatched. - run grep -q 'dispatched auto-review for https://github.com/combsmith/repo-a/pull/1' <<< "$sweep_output" + run grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-a/pull/1' <<< "$sweep_output" [ "$status" -eq 1 ] } @@ -204,9 +204,9 @@ run_sweep() { run bash "${TT_SCRIPTS_DIR}/sweep-dispatch.sh"; } [ "$status" -eq 0 ] local sweep_output="$output" # repo-c is still reached and dispatched — null threads on repo-a must not abort. - echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/combsmith/repo-c/pull/3' + echo "$sweep_output" | grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-c/pull/3' echo "$sweep_output" | grep -q 'dispatched 1 of 2' # repo-a had null reviewThreads → warning + skip, never dispatched. - run grep -q 'dispatched auto-review for https://github.com/combsmith/repo-a/pull/1' <<< "$sweep_output" + run grep -q 'dispatched auto-review for https://github.com/petry-projects/repo-a/pull/1' <<< "$sweep_output" [ "$status" -eq 1 ] } diff --git a/test/workflows/pr-auto-review/sweep.bats b/test/workflows/pr-auto-review/sweep.bats index 194295666..d14c51da8 100644 --- a/test/workflows/pr-auto-review/sweep.bats +++ b/test/workflows/pr-auto-review/sweep.bats @@ -24,9 +24,9 @@ setup() { # Three open PRs, the middle one a draft. LIST='[ - {"url":"https://github.com/combsmith/repo-a/pull/1","isDraft":false}, - {"url":"https://github.com/combsmith/repo-b/pull/2","isDraft":true}, - {"url":"https://github.com/combsmith/repo-c/pull/3","isDraft":false} + {"url":"https://github.com/petry-projects/repo-a/pull/1","isDraft":false}, + {"url":"https://github.com/petry-projects/repo-b/pull/2","isDraft":true}, + {"url":"https://github.com/petry-projects/repo-c/pull/3","isDraft":false} ]' # ── draft exclusion ────────────────────────────────────────────────────────── @@ -34,8 +34,8 @@ LIST='[ @test "candidates: drafts are excluded, non-drafts kept in input order" { run pr_auto_review_sweep_candidates 10 <<<"$LIST" [ "$status" -eq 0 ] - [ "${lines[0]}" = "https://github.com/combsmith/repo-a/pull/1" ] - [ "${lines[1]}" = "https://github.com/combsmith/repo-c/pull/3" ] + [ "${lines[0]}" = "https://github.com/petry-projects/repo-a/pull/1" ] + [ "${lines[1]}" = "https://github.com/petry-projects/repo-c/pull/3" ] [ "${#lines[@]}" -eq 2 ] } @@ -45,7 +45,7 @@ LIST='[ run pr_auto_review_sweep_candidates 1 <<<"$LIST" [ "$status" -eq 0 ] [ "${#lines[@]}" -eq 1 ] - [ "${lines[0]}" = "https://github.com/combsmith/repo-a/pull/1" ] + [ "${lines[0]}" = "https://github.com/petry-projects/repo-a/pull/1" ] } @test "candidates: MAX larger than the candidate count returns all non-drafts" { @@ -91,14 +91,14 @@ LIST='[ } @test "candidates: an object missing isDraft is treated as non-draft" { - run pr_auto_review_sweep_candidates 10 <<<'[{"url":"https://github.com/combsmith/repo-a/pull/7"}]' + run pr_auto_review_sweep_candidates 10 <<<'[{"url":"https://github.com/petry-projects/repo-a/pull/7"}]' [ "$status" -eq 0 ] [ "${#lines[@]}" -eq 1 ] - [ "${lines[0]}" = "https://github.com/combsmith/repo-a/pull/7" ] + [ "${lines[0]}" = "https://github.com/petry-projects/repo-a/pull/7" ] } @test "candidates: all drafts → nothing" { - run pr_auto_review_sweep_candidates 10 <<<'[{"url":"https://github.com/combsmith/repo-a/pull/1","isDraft":true}]' + run pr_auto_review_sweep_candidates 10 <<<'[{"url":"https://github.com/petry-projects/repo-a/pull/1","isDraft":true}]' [ "$status" -eq 0 ] [ "${#lines[@]}" -eq 0 ] } diff --git a/test/workflows/pr-review-mention/ack.bats b/test/workflows/pr-review-mention/ack.bats index 0f4a37b74..f9a07cacf 100644 --- a/test/workflows/pr-review-mention/ack.bats +++ b/test/workflows/pr-review-mention/ack.bats @@ -33,7 +33,7 @@ teardown() { # honoured; the rest get harmless defaults. run_ack() { GH_TOKEN="x" \ - PR_URL="https://github.com/combsmith/.github/pull/1" \ + PR_URL="https://github.com/petry-projects/.github/pull/1" \ BOT_LOGIN="donpetry-bot" \ EVENT_NAME="${EVENT_NAME:-issue_comment}" \ SENDER_LOGIN="${SENDER_LOGIN:-someone}" \ diff --git a/tests/canary_rollout.bats b/tests/canary_rollout.bats index e65bed823..76c2a09b8 100644 --- a/tests/canary_rollout.bats +++ b/tests/canary_rollout.bats @@ -360,7 +360,7 @@ DG_KNOBS='{"min_baseline_sample":10,"margin_permille":100}' # ── _reusable_differs: cross-repo host-aware blob compare (#613) ─────────────── # When an agent's host != THIS_REPO (e.g. dev-lead hosted in .github-private while the # engine runs from .github), the reusable blob is NOT in the local checkout — the compare -# must go through `gh api` on the host. agent-shield (host = combsmith/.github) is the +# must go through `gh api` on the host. agent-shield (host = petry-projects/.github) is the # cross-repo agent here, with THIS_REPO forced to .github-private via GITHUB_REPOSITORY. @test "_reusable_differs: cross-repo agent resolves host blobs via gh api — differ → 1" { STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")"; export PATH="$STUB_BIN:$PATH" @@ -370,7 +370,7 @@ DG_KNOBS='{"min_baseline_sample":10,"margin_permille":100}' echo ' *"ref=PRIOR"*) echo "bbbbbbbbbb" ;;' echo ' *) echo "" ;;' echo 'esac'; } > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" - run env GITHUB_REPOSITORY="combsmith/.github-private" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="petry-projects/.github-private" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && _reusable_differs agent-shield CAND PRIOR" [ "$status" -eq 0 ]; [ "$output" = "1" ] } @@ -378,7 +378,7 @@ DG_KNOBS='{"min_baseline_sample":10,"margin_permille":100}' @test "_reusable_differs: cross-repo agent — identical host blob → 0" { STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")"; export PATH="$STUB_BIN:$PATH" printf '#!/usr/bin/env bash\necho "samesamesame"\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" - run env GITHUB_REPOSITORY="combsmith/.github-private" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="petry-projects/.github-private" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && _reusable_differs agent-shield CAND PRIOR" [ "$status" -eq 0 ]; [ "$output" = "0" ] } @@ -386,7 +386,7 @@ DG_KNOBS='{"min_baseline_sample":10,"margin_permille":100}' @test "_reusable_differs: cross-repo agent — unresolvable blob fails CLOSED → 1" { STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")"; export PATH="$STUB_BIN:$PATH" printf '#!/usr/bin/env bash\necho ""\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" - run env GITHUB_REPOSITORY="combsmith/.github-private" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="petry-projects/.github-private" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && _reusable_differs agent-shield CAND PRIOR" [ "$status" -eq 0 ]; [ "$output" = "1" ] } @@ -931,7 +931,7 @@ _pv_rings() { # ── canary-rings.json SoT shape (rings + gate knobs) ────────────────────────── @test "canary-rings.json: pr-auto-review onboarded to canary; unmanaged block emptied" { - run jq -e '.agents["pr-auto-review"].host == "combsmith/.github"' "$RINGS" + run jq -e '.agents["pr-auto-review"].host == "petry-projects/.github"' "$RINGS" [ "$status" -eq 0 ] run jq -e '.agents["pr-auto-review"].run_workflow == "PR Auto-Review — Ready Check"' "$RINGS" [ "$status" -eq 0 ] @@ -943,7 +943,7 @@ _pv_rings() { } @test "canary-rings.json: add-to-project onboarded to full ring model (#651)" { - run jq -e '.agents["add-to-project"].host == "combsmith/.github"' "$RINGS" + run jq -e '.agents["add-to-project"].host == "petry-projects/.github"' "$RINGS" [ "$status" -eq 0 ] run bash -c "jq -r '.agents[\"add-to-project\"].rings | sort_by(.order) | map(.channel) | join(\",\")' '$RINGS'" [ "$output" = "next,ring0,ring1,stable" ] @@ -955,7 +955,7 @@ _pv_rings() { } @test "canary-rings.json: feature-ideation onboarded (cross-repo host, standard rings, #614)" { - run jq -e '.agents["feature-ideation"].host == "combsmith/.github"' "$RINGS" + run jq -e '.agents["feature-ideation"].host == "petry-projects/.github"' "$RINGS" [ "$status" -eq 0 ] run jq -e '.agents["feature-ideation"].reusable == ".github/workflows/feature-ideation-reusable.yml"' "$RINGS" [ "$status" -eq 0 ] @@ -968,7 +968,7 @@ _pv_rings() { } @test "canary-rings.json: ci-failure-analyst onboarded (this-repo host, standard rings, #1159)" { - run jq -e '.agents["ci-failure-analyst"].host == "combsmith/.github-private"' "$RINGS" + run jq -e '.agents["ci-failure-analyst"].host == "petry-projects/.github-private"' "$RINGS" [ "$status" -eq 0 ] run jq -e '.agents["ci-failure-analyst"].reusable == ".github/workflows/ci-failure-analyst-reusable.yml"' "$RINGS" [ "$status" -eq 0 ] @@ -985,9 +985,9 @@ _pv_rings() { @test "canary-rings.json: pr-review onboarded (cross-repo host, standard rings, grandfathered filename, #1106)" { # AC4: cross-repo agent — its reusable lives in .github-private, so releases/tags host there. - run jq -e '.agents["pr-review"].host == "combsmith/.github-private"' "$RINGS" + run jq -e '.agents["pr-review"].host == "petry-projects/.github-private"' "$RINGS" [ "$status" -eq 0 ] - # AC4: the reusable is the grandfathered non-`-reusable.yml` engine (combsmith/.github-private#1127) — + # AC4: the reusable is the grandfathered non-`-reusable.yml` engine (petry-projects/.github-private#1127) — # exactly why the *-reusable.yml drift scan never caught the gap this issue closes. run jq -e '.agents["pr-review"].reusable == ".github/workflows/pr-review.yml"' "$RINGS" [ "$status" -eq 0 ] @@ -1002,7 +1002,7 @@ _pv_rings() { [ "$status" -eq 0 ] run jq -e '.agents["pr-review"].rings[] | select(.channel=="stable") | (.members | index("*")) != null' "$RINGS" [ "$status" -eq 0 ] - run jq -e '.agents["pr-review"].rings[] | select(.channel=="ring1") | (.members|index("combsmith/TalkTerm")) and (.members|index("combsmith/bmad-bgreat-suite"))' "$RINGS" + run jq -e '.agents["pr-review"].rings[] | select(.channel=="ring1") | (.members|index("petry-projects/TalkTerm")) and (.members|index("petry-projects/bmad-bgreat-suite"))' "$RINGS" [ "$status" -eq 0 ] # standard #548 gate + organic-traffic model (no synthetic-canary fields) run jq -e '.agents["pr-review"].gate.transitions["ring1->stable"].sample_min == 1' "$RINGS" @@ -1012,11 +1012,11 @@ _pv_rings() { } @test "canary-rings.json: valid JSON + dev-lead host + ordered rings" { - run jq -e '.agents["dev-lead"].host == "combsmith/.github-private"' "$RINGS" + run jq -e '.agents["dev-lead"].host == "petry-projects/.github-private"' "$RINGS" [ "$status" -eq 0 ] run bash -c "jq -r '.agents[\"dev-lead\"].rings | sort_by(.order) | map(.channel) | join(\",\")' '$RINGS'" [ "$output" = "next,ring0,ring1,stable" ] - run jq -e '.agents["dev-lead"].rings[] | select(.channel=="ring1") | (.members | index("combsmith/TalkTerm")) and (.members | index("combsmith/bmad-bgreat-suite"))' "$RINGS" + run jq -e '.agents["dev-lead"].rings[] | select(.channel=="ring1") | (.members | index("petry-projects/TalkTerm")) and (.members | index("petry-projects/bmad-bgreat-suite"))' "$RINGS" [ "$status" -eq 0 ] } @@ -1027,12 +1027,12 @@ _pv_rings() { # TalkTerm/bmad traffic (organic or human-triggered) arrives. local a for a in initiative-planner idea-triage idea-enhancer; do - run jq -e --arg a "$a" '.agents[$a].host == "combsmith/.github"' "$RINGS" + run jq -e --arg a "$a" '.agents[$a].host == "petry-projects/.github"' "$RINGS" [ "$status" -eq 0 ] run bash -c "jq -r --arg a '$a' '.agents[\$a].rings | sort_by(.order) | map(.channel) | join(\",\")' '$RINGS'" [ "$output" = "next,ring0,ring1,stable" ] # ring1 = the real consumers that gate ring1->stable - run jq -e --arg a "$a" '.agents[$a].rings[] | select(.channel=="ring1") | (.members|index("combsmith/TalkTerm")) and (.members|index("combsmith/bmad-bgreat-suite"))' "$RINGS" + run jq -e --arg a "$a" '.agents[$a].rings[] | select(.channel=="ring1") | (.members|index("petry-projects/TalkTerm")) and (.members|index("petry-projects/bmad-bgreat-suite"))' "$RINGS" [ "$status" -eq 0 ] # standard #548 gate: inner rings waive, ring1->stable needs >=1 real run run jq -e --arg a "$a" '.agents[$a].gate.transitions["next->ring0"].waive_sample_if_no_caller == true and .agents[$a].gate.transitions["ring0->ring1"].waive_sample == true and .agents[$a].gate.transitions["ring1->stable"].sample_min == 1' "$RINGS" @@ -1078,12 +1078,12 @@ _pv_rings() { # ── orchestrator: resolve_members (host-relative tokens) ────────────────────── @test "orchestrator: resolve_members expands \$host / \$org_infra / * " { run bash -c "source '$ORCH' && CANARY_RINGS='$RINGS' resolve_members dev-lead next" - [ "$status" -eq 0 ]; [ "$output" = "combsmith/.github-private" ] + [ "$status" -eq 0 ]; [ "$output" = "petry-projects/.github-private" ] run bash -c "source '$ORCH' && CANARY_RINGS='$RINGS' resolve_members dev-lead ring0" - [ "$status" -eq 0 ]; [ "$output" = "combsmith/.github" ] + [ "$status" -eq 0 ]; [ "$output" = "petry-projects/.github" ] run bash -c "source '$ORCH' && CANARY_RINGS='$RINGS' resolve_members dev-lead ring1" - [[ "$output" == *"combsmith/TalkTerm"* ]] - [[ "$output" == *"combsmith/bmad-bgreat-suite"* ]] + [[ "$output" == *"petry-projects/TalkTerm"* ]] + [[ "$output" == *"petry-projects/bmad-bgreat-suite"* ]] } # ── orchestrator: evaluate / promote (read-only + dry-run) with stubs ───────── @@ -1347,7 +1347,7 @@ GITEOF # `gh run view --log` prints the resolved "Uses: …@refs/tags/ ()" line, with # = $1 (the release the run actually executed); "none" prints a log with no Uses: line. _executed_sha_stub() { - local executed="$1" conclusion="${2:-failure}" fail_sub="${3:-repo combsmith/TalkTerm --workflow}" cut_iso run_iso + local executed="$1" conclusion="${2:-failure}" fail_sub="${3:-repo petry-projects/TalkTerm --workflow}" cut_iso run_iso STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")"; export PATH="$STUB_BIN:$PATH" cut_iso="$(date -u -d "-3 days" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -v"-3d" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null)" run_iso="$(date -u -d "-2 days" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -v"-2d" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null)" @@ -1370,7 +1370,7 @@ case "\$*" in *"run view"*"--log"*) # Mirrors real \`gh run view --log\` output: " ". ts="2026-09-25T00:00:00.1234567Z" - U="Uses: combsmith/.github-private/.github/workflows/dev-lead-reusable.yml@refs/tags/dev-lead/v2-ring1" + U="Uses: petry-projects/.github-private/.github/workflows/dev-lead-reusable.yml@refs/tags/dev-lead/v2-ring1" if [ "$executed" = logfail ]; then exit 1 elif [ "$executed" = none ]; then printf 'build\tUNKNOWN STEP\t%s nothing relevant\n' "\$ts" elif [ "$executed" = collision ]; then printf 'build\tUNKNOWN STEP\t%s Uses: someone/else/.github/workflows/dev-lead-reusable.yml@refs/tags/x (bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)\n' "\$ts" @@ -1447,7 +1447,7 @@ GITEOF # The source tier's sample still counts runs from before the candidate reached it, so dropping only # their failures would let a candidate with no executions there reach PROMOTE. The host (.github-private) # is the source tier of next->ring0 and its failing run's log names the OLD sha: it must still count. - _executed_sha_stub bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb failure "repo combsmith/.github-private --workflow" + _executed_sha_stub bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb failure "repo petry-projects/.github-private --workflow" run env CANARY_RINGS="$RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"BLOCKED"* ]] @@ -1501,7 +1501,7 @@ GITEOF } # ── orchestrator: cross-repo agents resolve tags on `host`, not the local checkout ─ -# (#1049) A cross-repo agent (host = combsmith/.github) keeps its / +# (#1049) A cross-repo agent (host = petry-projects/.github) keeps its / # and /vX.Y.Z tags on the HOST repo, not this checkout. `evaluate` must resolve them # there via `gh api` (dereferencing annotated tags) — reading the LOCAL refs makes every # ring resolve empty → "all rings equal → fully rolled out", which would falsely SKIP a @@ -1589,7 +1589,7 @@ GITEOF } # ── orchestrator: cross-repo promote MOVES the channel tag on the HOST via gh api (#1054) ─ -# A cross-repo agent (host = combsmith/.github) keeps its channel tags on the host, so +# A cross-repo agent (host = petry-projects/.github) keeps its channel tags on the host, so # the promote move must go through `gh api PATCH .../git/refs/tags/...`, NOT local `git tag -f` # (which fails "nonexistent object" for a host commit absent from this checkout — #1054). @test "orchestrator: cross-repo promote --dry-run shows the host gh-api move, not a local git tag (#1054)" { @@ -1597,7 +1597,7 @@ GITEOF run env CANARY_RINGS="$RINGS" bash "$ORCH" promote auto-rebase --dry-run [ "$status" -eq 0 ] [[ "$output" == *"DRY-RUN"* ]] - [[ "$output" == *"gh api PATCH repos/combsmith/.github/git/refs/tags/auto-rebase/stable"* ]] + [[ "$output" == *"gh api PATCH repos/petry-projects/.github/git/refs/tags/auto-rebase/stable"* ]] [[ "$output" != *"git tag -f"* ]] } @@ -1649,17 +1649,17 @@ GITEOF [ "$status" -eq 0 ] [[ "$output" == *"promoted auto-rebase/stable"* ]] # The move went through gh api PATCH on the HOST, never local git tag/push. - grep -q "PATCH repos/combsmith/.github/git/refs/tags/auto-rebase/stable" "$MOVE_LOG" + grep -q "PATCH repos/petry-projects/.github/git/refs/tags/auto-rebase/stable" "$MOVE_LOG" ! grep -q "^LOCAL:" "$MOVE_LOG" # The move is exposed for the workflow's GitHub Deployment step (#502). grep -q "promoted_agent=auto-rebase" "$out" grep -q "promoted_ring=stable" "$out" # promoted_host is the OWNING repo (the cross-repo host), so the deployment is created # where the moved commit exists — not GITHUB_REPOSITORY, which would 422 "No ref found" (#1059). - grep -q "promoted_host=combsmith/.github" "$out" + grep -q "promoted_host=petry-projects/.github" "$out" # The promotions log gets one TSV line per move (agent, ring, sha, owning-repo) so a # promote-all run can record a deployment for EVERY promotion, not just the last. - grep -qP "^auto-rebase\tstable\t[0-9a-f]+\tcombsmith/\.github$" "$plog" + grep -qP "^auto-rebase\tstable\t[0-9a-f]+\tpetry-projects/\.github$" "$plog" } @test "orchestrator: cross-repo promote --dry-run shows the host move but touches neither git nor the API (#1054)" { @@ -1668,7 +1668,7 @@ GITEOF [ "$status" -eq 0 ] [[ "$output" == *"DRY-RUN"* ]] [[ "$output" == *"auto-rebase/stable"* ]] - [[ "$output" == *"combsmith/.github"* ]] + [[ "$output" == *"petry-projects/.github"* ]] [ ! -f "$MOVE_LOG" ] } @@ -1683,7 +1683,7 @@ GITEOF [ "$status" -eq 1 ] # the failed write surfaces as a non-zero run [[ "$output" == *"::error::failed to move"* ]] # One failure-log line: agent, ring, candidate sha, owning host, and a reason (5 columns). - grep -qP "^auto-rebase\tstable\t[0-9a-f]+\tcombsmith/\.github\t.+" "$flog" + grep -qP "^auto-rebase\tstable\t[0-9a-f]+\tpetry-projects/\.github\t.+" "$flog" } @test "orchestrator: a gate-BLOCKED promotion writes NOTHING to the failure log (#1023)" { @@ -1734,7 +1734,7 @@ GHEOF @test "_gh_move_tag: surfaces the API rejection and does NOT fall back to POST on a non-404 PATCH failure (#743)" { _move_tag_stub reject - run bash -c "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + run bash -c "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -ne 0 ] [[ "$output" == *"::error::"* ]] [[ "$output" == *"blocked by ruleset release-channel-tags"* ]] @@ -1744,7 +1744,7 @@ GHEOF @test "_gh_move_tag: a successful PATCH moves the tag and never falls back to POST (#743)" { _move_tag_stub ok - run bash -c "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + run bash -c "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -eq 0 ] grep -q '^PATCH$' "$CALL_LOG" ! grep -q '^POST$' "$CALL_LOG" @@ -1753,7 +1753,7 @@ GHEOF @test "_gh_move_tag: falls back to POST (create) when the ref is genuinely absent (404) (#743)" { _move_tag_stub absent ok - run bash -c "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + run bash -c "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -eq 0 ] grep -q '^PATCH$' "$CALL_LOG" grep -q '^POST$' "$CALL_LOG" @@ -1761,7 +1761,7 @@ GHEOF @test "_gh_move_tag: surfaces the create error when the 404 POST fallback also fails (#743)" { _move_tag_stub absent reject - run bash -c "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + run bash -c "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -ne 0 ] [[ "$output" == *"::error::"* ]] [[ "$output" == *"Validation Failed"* ]] @@ -1791,7 +1791,7 @@ GHEOF @test "_gh_move_tag: routes the PATCH through CANARY_WRITE_TOKEN when set (#745)" { _token_capture_stub run env GH_TOKEN=owner-wide CANARY_WRITE_TOKEN=repo-scoped bash -c \ - "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -eq 0 ] grep -q 'PATCH.*repo-scoped' "$TOKEN_LOG" ! grep -q 'PATCH.*owner-wide' "$TOKEN_LOG" @@ -1800,7 +1800,7 @@ GHEOF @test "_gh_move_tag: falls back to the ambient GH_TOKEN when CANARY_WRITE_TOKEN is unset (#745)" { _token_capture_stub run env -u CANARY_WRITE_TOKEN GH_TOKEN=owner-wide bash -c \ - "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -eq 0 ] grep -q 'PATCH.*owner-wide' "$TOKEN_LOG" } @@ -1808,7 +1808,7 @@ GHEOF @test "_gh_create_annotated_tag: routes the object create + ref publish through CANARY_WRITE_TOKEN when set (#745)" { _token_capture_stub run env GH_TOKEN=owner-wide CANARY_WRITE_TOKEN=repo-scoped bash -c \ - "source '$ORCH' && _gh_create_annotated_tag combsmith/.github agent-shield/v2.0.0 12b0075a9c48000000000000000000000000000 'agent-shield release v2.0.0'" + "source '$ORCH' && _gh_create_annotated_tag petry-projects/.github agent-shield/v2.0.0 12b0075a9c48000000000000000000000000000 'agent-shield release v2.0.0'" [ "$status" -eq 0 ] # both the git/tags object create and the git/refs publish must carry the write token [ "$(grep -c 'repo-scoped' "$TOKEN_LOG")" -ge 2 ] @@ -1846,7 +1846,7 @@ case "\$*" in printf 'HTTP/2.0 403 Forbidden\r\n' printf 'X-Accepted-GitHub-Permissions: contents=write; contents=read\r\n' printf '\r\n' - echo '{"full_name":"combsmith/.github"}' + echo '{"full_name":"petry-projects/.github"}' exit 0 ;; *"installation/repositories"*) echo "DIAG_INSTALL" >> "$CALL_LOG" @@ -1861,7 +1861,7 @@ GHEOF @test "_gh_move_tag: on a 403 dumps the effective-permission diagnostic then surfaces the error (#749)" { _diag_403_stub selected run env GH_TOKEN=owner-wide CANARY_WRITE_TOKEN=repo-scoped bash -c \ - "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -ne 0 ] [[ "$output" == *"effective-permission diagnostic"* ]] [[ "$output" == *"X-Accepted-GitHub-Permissions: contents=write"* ]] @@ -1876,7 +1876,7 @@ GHEOF @test "_gh_move_tag: the 403 diagnostic introspects through CANARY_WRITE_TOKEN (#749)" { _diag_403_stub selected run env GH_TOKEN=owner-wide CANARY_WRITE_TOKEN=repo-scoped bash -c \ - "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" grep -q 'installation/repositories.*repo-scoped' "$TOKEN_LOG" ! grep -q 'installation/repositories.*owner-wide' "$TOKEN_LOG" } @@ -1884,14 +1884,14 @@ GHEOF @test "_gh_move_tag: the 403 diagnostic reports the higher total_count for an owner-wide installation token (#749)" { _diag_403_stub all run env GH_TOKEN=owner-wide CANARY_WRITE_TOKEN=repo-scoped bash -c \ - "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [[ "$output" == *"total_count=50"* ]] [[ "$output" != *"total_count=2"* ]] } @test "_gh_move_tag: a non-403 (422 ruleset) failure does NOT trigger the 403 diagnostic (#749)" { _move_tag_stub reject - run bash -c "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + run bash -c "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -ne 0 ] [[ "$output" != *"effective-permission diagnostic"* ]] [[ "$output" == *"::error::"* ]] @@ -1914,7 +1914,7 @@ esac GHEOF chmod +x "$STUB_BIN/gh" run env GH_TOKEN=tok bash -c \ - "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -ne 0 ] [[ "$output" == *"effective-permission diagnostic"* ]] # Must not print a jq error about parse failure @@ -1939,7 +1939,7 @@ esac GHEOF chmod +x "$STUB_BIN/gh" run env GH_TOKEN=tok bash -c \ - "source '$ORCH' && _gh_move_tag combsmith/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" + "source '$ORCH' && _gh_move_tag petry-projects/.github agent-shield/v2-ring0 12b0075a9c48000000000000000000000000000" [ "$status" -ne 0 ] [[ "$output" == *"effective-permission diagnostic"* ]] [[ "$output" != *"parse error"* ]] @@ -1990,7 +1990,7 @@ case "\$*" in *"run list"*) $run_list_case ;; *"run view"*) echo '{"jobs":[{"steps":[{"name":"Some step","conclusion":"failure"}]}]}' ;; "issue list"*) echo '$blocker_list' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/777" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/777" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -2009,7 +2009,7 @@ GHEOF # Pin GITHUB_STEP_SUMMARY to a temp file — under CI the runner sets it, so the table lands # in the summary, not stdout; asserting the file keeps the test env-independent. local summ="$BATS_TEST_TMPDIR/summary.md"; : > "$summ" - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues --dry-run + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues --dry-run [ "$status" -eq 0 ] [[ "$output" == *"would OPEN blocker issue for dev-lead"* ]] grep -q "Canary Rollout — fleet status" "$summ" # table still renders under --dry-run @@ -2019,7 +2019,7 @@ GHEOF @test "orchestrator: sync-issues opens ONE blocker issue (with evidence) + writes the fleet summary — no dashboard issue" { _sync_stub failure '[]' local summ="$BATS_TEST_TMPDIR/summary.md"; : > "$summ" - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"opened blocker issue #777 for dev-lead"* ]] [[ "$output" == *"wrote fleet-status table to the job summary"* ]] @@ -2044,7 +2044,7 @@ GHEOF _sync_stub failure '[]' sed 's#"issue create"\*).*#"issue create"*) echo "gh: HTTP 403 (Issues:write?)" >\&2; exit 1 ;;#' "$STUB_BIN/gh" > "$STUB_BIN/gh.tmp" && mv "$STUB_BIN/gh.tmp" "$STUB_BIN/gh" && chmod +x "$STUB_BIN/gh" local summ="$BATS_TEST_TMPDIR/summary_fail.md"; : > "$summ" - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"could not open blocker issue for dev-lead (Issues:write on the App?)"* ]] [[ "$output" == *"wrote fleet-status table to the job summary"* ]] @@ -2055,7 +2055,7 @@ GHEOF @test "orchestrator: sync-issues auto-closes a cleared agent's open blocker issue" { # dev-lead now clean (success → not BLOCKED) but an OPEN blocker issue #501 exists → close it. _sync_stub success '[{"number":501,"state":"OPEN","body":""}]' - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"closed cleared blocker issue #501 for dev-lead"* ]] grep -q "CLOSE|.*501" "$ISSUE_LOG" @@ -2067,7 +2067,7 @@ GHEOF _sync_stub success '[]' local summ="$BATS_TEST_TMPDIR/summary_sep.md" printf 'prior step output (no trailing newline)' > "$summ" - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] # The header must appear at the start of a line — not concatenated onto the prior content. grep -q '^# Canary Rollout' "$summ" @@ -2086,7 +2086,7 @@ _promo_fail_sync_stub() { #!/usr/bin/env bash case "\$*" in "issue list"*) echo '$issue_list' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github/issues/900" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github/issues/900" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -2099,8 +2099,8 @@ GHEOF @test "orchestrator: sync-promotion-failures opens a tracking issue on the FIRST failure — not yet escalated (#1023)" { _promo_fail_sync_stub '[]' - local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" - run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures + local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" + run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"opened promotion-failure issue #900 for dev-lead (count=1)"* ]] grep -q -- "--label canary-promotion-failure" "$ISSUE_LOG" @@ -2112,8 +2112,8 @@ GHEOF # An existing tracking issue already at count=1; another failure this run → count=2 = threshold. local existing='[{"number":901,"state":"OPEN","body":"\n"}]' _promo_fail_sync_stub "$existing" - local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" - run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTION_FAILURE_ESCALATE_AFTER=2 CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures + local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" + run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTION_FAILURE_ESCALATE_AFTER=2 CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"updated promotion-failure issue #901 for dev-lead (count=2)"* ]] grep -q -- "issue edit 901 .*--add-label dev-lead --add-label needs-human" "$ISSUE_LOG" @@ -2123,9 +2123,9 @@ GHEOF local existing='[{"number":903,"state":"OPEN","body":"\n"}]' _promo_fail_sync_stub "$existing" local flog="$BATS_TEST_TMPDIR/pf.tsv" slog="$BATS_TEST_TMPDIR/ok.tsv" - printf 'dev-lead\tstable\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" - printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\n' > "$slog" - run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTION_FAILURE_ESCALATE_AFTER=2 CANARY_PROMOTIONS_FAILED_LOG="$flog" CANARY_PROMOTIONS_LOG="$slog" bash "$ORCH" sync-promotion-failures + printf 'dev-lead\tstable\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" + printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\n' > "$slog" + run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTION_FAILURE_ESCALATE_AFTER=2 CANARY_PROMOTIONS_FAILED_LOG="$flog" CANARY_PROMOTIONS_LOG="$slog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"updated promotion-failure issue #903 for dev-lead (count=2)"* ]] ! grep -q "^CLOSE|" "$ISSUE_LOG" @@ -2135,9 +2135,9 @@ GHEOF # dev-lead succeeded this run (in the SUCCESS log) but an OPEN failure issue exists → close it. local existing='[{"number":902,"state":"OPEN","body":"\n"}]' _promo_fail_sync_stub "$existing" - local slog="$BATS_TEST_TMPDIR/ok.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\n' > "$slog" + local slog="$BATS_TEST_TMPDIR/ok.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\n' > "$slog" local flog="$BATS_TEST_TMPDIR/pf.tsv"; : > "$flog" - run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTIONS_LOG="$slog" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures + run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTIONS_LOG="$slog" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"closed recovered promotion-failure issue #902 for dev-lead"* ]] grep -q "CLOSE|.*902" "$ISSUE_LOG" @@ -2147,9 +2147,9 @@ GHEOF # dev-lead failed initially (in FAILED log) but succeeded later (in SUCCESS log); success takes precedence. local existing='[{"number":903,"state":"OPEN","body":"\n"}]' _promo_fail_sync_stub "$existing" - local slog="$BATS_TEST_TMPDIR/ok.tsv"; printf 'dev-lead\tring0\tdddddddddddddddd\tcombsmith/.github-private\n' > "$slog" - local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" - run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTIONS_LOG="$slog" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures + local slog="$BATS_TEST_TMPDIR/ok.tsv"; printf 'dev-lead\tring0\tdddddddddddddddd\tpetry-projects/.github-private\n' > "$slog" + local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" + run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTIONS_LOG="$slog" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"closed recovered promotion-failure issue #903 for dev-lead"* ]] grep -q "CLOSE|.*903" "$ISSUE_LOG" @@ -2160,9 +2160,9 @@ GHEOF # FAILED (its tracking issue stays/gets opened), not "recovered". local existing='[{"number":905,"state":"OPEN","body":"\n"}]' _promo_fail_sync_stub "$existing" - local slog="$BATS_TEST_TMPDIR/ok.tsv"; printf 'dev-lead\tring0\tdddddddddddddddd\tcombsmith/.github-private\n' > "$slog" - local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring1\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" - run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTIONS_LOG="$slog" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures + local slog="$BATS_TEST_TMPDIR/ok.tsv"; printf 'dev-lead\tring0\tdddddddddddddddd\tpetry-projects/.github-private\n' > "$slog" + local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring1\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" + run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTIONS_LOG="$slog" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"updated promotion-failure issue #905 for dev-lead (count=2)"* ]] [[ "$output" != *"closed recovered"* ]] @@ -2175,8 +2175,8 @@ GHEOF # the first new failure after recovery should start at count=1 (not count=6). local existing='[{"number":904,"state":"CLOSED","body":"\n"}]' _promo_fail_sync_stub "$existing" - local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" - run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTION_FAILURE_ESCALATE_AFTER=2 CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures + local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" + run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTION_FAILURE_ESCALATE_AFTER=2 CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"(count=1)"* ]] ! grep -q -- "--add-label needs-human" "$ISSUE_LOG" @@ -2184,8 +2184,8 @@ GHEOF @test "orchestrator: sync-promotion-failures --dry-run plans but writes nothing to GitHub (#1023)" { _promo_fail_sync_stub '[]' - local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tcombsmith/.github-private\ttag write rejected\n' > "$flog" - run env ISSUE_REPO="combsmith/.github" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures --dry-run + local flog="$BATS_TEST_TMPDIR/pf.tsv"; printf 'dev-lead\tring0\tccccccccccccccccc\tpetry-projects/.github-private\ttag write rejected\n' > "$flog" + run env ISSUE_REPO="petry-projects/.github" CANARY_PROMOTIONS_FAILED_LOG="$flog" bash "$ORCH" sync-promotion-failures --dry-run [ "$status" -eq 0 ] [[ "$output" == *"would OPEN promotion-failure issue for dev-lead"* ]] [ ! -s "$ISSUE_LOG" ] @@ -2193,7 +2193,7 @@ GHEOF @test "orchestrator: sync-promotion-failures is a clean no-op when no promotion was attempted (#1023)" { _promo_fail_sync_stub '[]' - run env ISSUE_REPO="combsmith/.github" bash "$ORCH" sync-promotion-failures + run env ISSUE_REPO="petry-projects/.github" bash "$ORCH" sync-promotion-failures [ "$status" -eq 0 ] [[ "$output" == *"no promotion attempts recorded this run"* ]] [ ! -s "$ISSUE_LOG" ] @@ -2263,7 +2263,7 @@ GITEOF } @test "orchestrator: autocut is a no-op when CANARY_AUTO_CUT is not 'true' (kill-switch off)" { - _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" run env CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] @@ -2272,18 +2272,18 @@ GITEOF } @test "orchestrator: autocut cuts a patch-bumped version + moves next when the reusable blob differs on main" { - _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # Highest existing tag is v2.1.0 → patch bump → v2.1.1, annotated tag cut from main HEAD on the # HOST repo (.github-private for dev-lead), then `next` force-moved onto the same commit — all gh-api. - grep -q "repos/combsmith/.github-private/git/tags .*tag=dev-lead/v2.1.1 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "repos/petry-projects/.github-private/git/tags .*tag=dev-lead/v2.1.1 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" } @test "orchestrator: autocut is idempotent — identical blob on main and next is a clean no-op" { - _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ sameBLOB sameBLOB aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] @@ -2292,7 +2292,7 @@ GITEOF } @test "orchestrator: autocut --dry-run prints the intended cut without writing any tag" { - _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut --dry-run [ "$status" -eq 0 ] @@ -2302,25 +2302,25 @@ GITEOF } @test "orchestrator: autocut honors the registry autocut.bump override (minor)" { - _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" minor run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # minor bump of v2.1.0 → v2.2.0 - grep -q "repos/combsmith/.github-private/git/tags .*tag=dev-lead/v2.2.0 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "repos/petry-projects/.github-private/git/tags .*tag=dev-lead/v2.2.0 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" } @test "orchestrator: autocut is cross-repo aware — cuts v2.1.1 for auto-rebase on the host repo (#1069)" { - # auto-rebase is hosted in combsmith/.github; its next candidate + release tags live there, + # auto-rebase is hosted in petry-projects/.github; its next candidate + release tags live there, # so the next commit is resolved via gh api (not local git) and BOTH the tag create and the # next move are written to that host — not GITHUB_REPOSITORY. - _autocut_stub auto-rebase combsmith/.github .github/workflows/auto-rebase-reusable.yml \ + _autocut_stub auto-rebase petry-projects/.github .github/workflows/auto-rebase-reusable.yml \ ece45480ece45480ece45480ece45480ece45480 2763750027637500276375002763750027637500 \ ece45480ece45480ece45480ece45480ece45480 2763750027637500276375002763750027637500 "2.1.0" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] - grep -q "repos/combsmith/.github/git/tags .*tag=auto-rebase/v2.1.1 .*object=ece45480ece45480ece45480ece45480ece45480" "$GH_LOG" - grep -q "PATCH repos/combsmith/.github/git/refs/tags/auto-rebase/next .*sha=ece45480ece45480ece45480ece45480ece45480" "$GH_LOG" + grep -q "repos/petry-projects/.github/git/tags .*tag=auto-rebase/v2.1.1 .*object=ece45480ece45480ece45480ece45480ece45480" "$GH_LOG" + grep -q "PATCH repos/petry-projects/.github/git/refs/tags/auto-rebase/next .*sha=ece45480ece45480ece45480ece45480ece45480" "$GH_LOG" } @test "orchestrator: autocut — existing release tag matching mainsha skips create and still moves next (idempotent retry)" { @@ -2328,7 +2328,7 @@ GITEOF # mainsha), but `next` was not yet moved. The idempotency branch must skip POST git/tags # and proceed straight to the PATCH for next without calling _gh_create_annotated_tag. local mainsha="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT "$mainsha" cccccccccccccccccccccccccccccccccccccccc "2.1.0" "" "$mainsha" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] @@ -2346,7 +2346,7 @@ GITEOF # invariant. The engine must warn and skip rather than advance next to an untagged commit. local mainsha="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" local stale_sha="dddddddddddddddddddddddddddddddddddddddd" - _autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT "$mainsha" cccccccccccccccccccccccccccccccccccccccc "2.1.0" "" "$stale_sha" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] @@ -2393,18 +2393,18 @@ GITEOF # The stub answers `gh api repos//contents/.github/workflows` with a per-host JSON # array (env HOSTPRIV_JSON / HOSTPUB_JSON); the orchestrator filters *-reusable.yml itself. _drift_stub() { - # $1 = JSON array for combsmith/.github-private ; $2 = JSON array for combsmith/.github + # $1 = JSON array for petry-projects/.github-private ; $2 = JSON array for petry-projects/.github local priv_json="$1" pub_json="${2:-[]}" STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")"; export PATH="$STUB_BIN:$PATH" # '.github' is a substring of '.github-private', so match the more specific repo FIRST. cat > "$STUB_BIN/gh" < "$DRIFT_RINGS" # host has dev-lead (registered) + foo (unmanaged) + bar (genuinely unregistered) _drift_stub '[ @@ -2461,9 +2461,9 @@ _drift_rings_one_agent() { [ "$status" -eq 0 ] # foo is reported as unmanaged, NOT flagged as unregistered drift [[ "$output" == *"unmanaged (intentional"* ]] - [[ "$output" != *"DRIFT[unregistered] combsmith/.github-private: .github/workflows/foo-reusable.yml"* ]] + [[ "$output" != *"DRIFT[unregistered] petry-projects/.github-private: .github/workflows/foo-reusable.yml"* ]] # bar (neither registered nor unmanaged) IS still flagged, and it's the ONLY one - [[ "$output" == *"DRIFT[unregistered] combsmith/.github-private: .github/workflows/bar-reusable.yml"* ]] + [[ "$output" == *"DRIFT[unregistered] petry-projects/.github-private: .github/workflows/bar-reusable.yml"* ]] [[ "$output" == *"1 unregistered"* ]] } @@ -2491,7 +2491,7 @@ _drift_rings_one_agent() { @test "orchestrator: drift does NOT false-flag a present grandfathered-named reusable (pr-review.yml, #1166)" { DRIFT_RINGS="$BATS_TEST_TMPDIR/drift-grandfathered.json" jq '{version, description, org_infra_repos, member_tokens, - agents: {"pr-review": (.agents["dev-lead"] + {host: "combsmith/.github-private", + agents: {"pr-review": (.agents["dev-lead"] + {host: "petry-projects/.github-private", reusable: ".github/workflows/pr-review.yml"})}}' \ "$RINGS" > "$DRIFT_RINGS" # The host listing includes pr-review.yml (present, but not `-reusable.yml`). @@ -2503,7 +2503,7 @@ _drift_rings_one_agent() { [ "$status" -eq 0 ] # pr-review.yml is registered AND present → neither missing-file nor unregistered. [[ "$output" != *"DRIFT[missing-file]"* ]] - [[ "$output" != *"DRIFT[unregistered] combsmith/.github-private: .github/workflows/pr-review.yml"* ]] + [[ "$output" != *"DRIFT[unregistered] petry-projects/.github-private: .github/workflows/pr-review.yml"* ]] [[ "$output" == *"0 unregistered, 0 missing-file"* ]] } @@ -2513,7 +2513,7 @@ _drift_rings_one_agent() { @test "orchestrator: drift still reports a registered grandfathered reusable that is truly gone (#1166)" { DRIFT_RINGS="$BATS_TEST_TMPDIR/drift-grandfathered-gone.json" jq '{version, description, org_infra_repos, member_tokens, - agents: {"pr-review": (.agents["dev-lead"] + {host: "combsmith/.github-private", + agents: {"pr-review": (.agents["dev-lead"] + {host: "petry-projects/.github-private", reusable: ".github/workflows/pr-review.yml"})}}' \ "$RINGS" > "$DRIFT_RINGS" # Host listing does NOT contain pr-review.yml — the file is genuinely gone. @@ -2531,7 +2531,7 @@ _drift_rings_one_agent() { @test "orchestrator: drift still flags a registered non-YAML path even when present on the host" { DRIFT_RINGS="$BATS_TEST_TMPDIR/drift-nonyaml.json" jq '{version, description, org_infra_repos, member_tokens, - agents: {"pr-review": (.agents["dev-lead"] + {host: "combsmith/.github-private", + agents: {"pr-review": (.agents["dev-lead"] + {host: "petry-projects/.github-private", reusable: ".github/workflows/README.md"})}}' \ "$RINGS" > "$DRIFT_RINGS" _drift_stub '[ @@ -2566,7 +2566,7 @@ _drift_rings_one_agent() { # A scaffold JSON object keyed by the derived agent name 'foo' the maintainer can fill in. [[ "$output" == *"\"foo\""* ]] [[ "$output" == *"\"reusable\": \".github/workflows/foo-reusable.yml\""* ]] - [[ "$output" == *"combsmith/.github-private"* ]] + [[ "$output" == *"petry-projects/.github-private"* ]] } @test "orchestrator: drift skips a host it cannot enumerate — no false missing-file avalanche" { @@ -2656,8 +2656,8 @@ GITEOF [[ "$output" == *"pr-review"* ]] # a registered agent (dev-lead) and the reserved `standards` namespace are NOT flagged; # a release tag (pr-review/v1.8.0) is not a channel tag and never drives this verdict. - [[ "$output" != *"registry-incomplete] combsmith/.github-private: 'dev-lead'"* ]] - [[ "$output" != *"registry-incomplete] combsmith/.github-private: 'standards'"* ]] + [[ "$output" != *"registry-incomplete] petry-projects/.github-private: 'dev-lead'"* ]] + [[ "$output" != *"registry-incomplete] petry-projects/.github-private: 'standards'"* ]] # exactly one completeness finding (pr-review), counted once across both repos. [[ "$output" == *"registry-completeness summary: 1"* ]] } @@ -2673,7 +2673,7 @@ GITEOF #!/usr/bin/env bash case "$*" in *".github-private/git/matching-refs/tags"*) echo '[]' ;; - *"combsmith/.github/git/matching-refs/tags"*) + *"petry-projects/.github/git/matching-refs/tags"*) # Unregistered-agent tags ONLY on the public .github repo: a sweep that skips it would pass vacuously cat <<'JSON' [{"ref":"refs/tags/unregistered-agent/v1-next"},{"ref":"refs/tags/unregistered-agent/v1-stable"},{"ref":"refs/tags/dev-lead/v1-next"}] @@ -2756,8 +2756,8 @@ GITEOF [ "$status" -eq 0 ] [[ "$output" == *"DRIFT[registry-incomplete]"*"'bare-agent'"* ]] # registered (dev-lead), reserved (standards) and release-only tags are not flagged - [[ "$output" != *"registry-incomplete] combsmith/.github-private: 'dev-lead'"* ]] - [[ "$output" != *"registry-incomplete] combsmith/.github-private: 'standards'"* ]] + [[ "$output" != *"registry-incomplete] petry-projects/.github-private: 'dev-lead'"* ]] + [[ "$output" != *"registry-incomplete] petry-projects/.github-private: 'standards'"* ]] [[ "$output" != *"release-only"* ]] [[ "$output" == *"registry-completeness summary: 1"* ]] } @@ -3276,7 +3276,7 @@ case "\$*" in + [range(0;\$bt)|{databaseId:(1001+.),conclusion:(if . < \$bf then "failure" else "success" end),createdAt:\$bb,workflowName:"Dev-Lead Agent"}] ) | map(select(\$s=="" or .createdAt >= \$s))' ;; "issue list"*) echo '[]' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/777" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/777" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -3291,7 +3291,7 @@ GHEOF @test "orchestrator: sync-issues files a PRE_EXISTING blocker (no needs-human) for an auto-downgraded SUSPECT (#668 inc6)" { _downgrade_sync_stub 1 10 1 10 - run env CANARY_RINGS="$DG_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$DG_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"opened blocker issue #777 for dev-lead"* ]] # Body carries the auto-downgrade note + the candidate-vs-baseline rate comparison. @@ -3333,7 +3333,7 @@ case "\$*" in + [range(0;\$bt)|{databaseId:(1001+.),conclusion:(if . < \$bf then "failure" else "success" end),createdAt:\$bb,workflowName:"Dev-Lead Agent"}] ) | map(select(\$s=="" or .createdAt >= \$s))' ;; "issue list"*) echo '[{"number":501,"state":"OPEN","body":""}]' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/777" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/777" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -3350,7 +3350,7 @@ GHEOF # Existing open blocker #501 (was SUSPECT, has needs-human). Now auto-downgraded → PRE_EXISTING. # The update path must explicitly REMOVE needs-human so stale routing is cleared. _downgrade_sync_update_stub 1 10 1 10 - run env CANARY_RINGS="$DG_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$DG_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"updated blocker issue #501 for dev-lead"* ]] # PRE_EXISTING → must NOT add needs-human @@ -3475,7 +3475,7 @@ GHEOF # The blocker body must surface the workload-timeout discriminating question prominently # so a human confirm is a fast check, and keep the SUSPECT label + needs-human routing. run env CANARY_RINGS="$RINGS" bash -c \ - "source '$ORCH' && _blocker_body dev-lead 'next->ring0' cccccccccccc 1 0 SUSPECT combsmith/.github-private '_(evidence)_'" + "source '$ORCH' && _blocker_body dev-lead 'next->ring0' cccccccccccc 1 0 SUSPECT petry-projects/.github-private '_(evidence)_'" [ "$status" -eq 0 ] [[ "$output" == *"SUSPECT"* ]] [[ "$output" == *"needs-human"* ]] @@ -3485,7 +3485,7 @@ GHEOF @test "_blocker_body: PRE_EXISTING triage still renders the genuine pre-existing banner" { # Regression guard: a real PRE_EXISTING triage must keep its banner + fix-forward note. run env CANARY_RINGS="$RINGS" bash -c \ - "source '$ORCH' && _blocker_body dev-lead 'next->ring0' cccccccccccc 1 0 PRE_EXISTING combsmith/.github-private '_(evidence)_'" + "source '$ORCH' && _blocker_body dev-lead 'next->ring0' cccccccccccc 1 0 PRE_EXISTING petry-projects/.github-private '_(evidence)_'" [ "$status" -eq 0 ] [[ "$output" == *"PRE_EXISTING"* ]] [[ "$output" == *"byte-identical"* ]] @@ -3495,7 +3495,7 @@ GHEOF # Fail-closed path (_frontier_state, cut_z empty): state=BLOCKED, triage="-", cum_fail=0. # The body must not falsely assert an environmental/byte-identical failure — there is none. run env CANARY_RINGS="$RINGS" bash -c \ - "source '$ORCH' && _blocker_body ci-failure-analyst 'next->ring0' df3b7d462460 0 0 - combsmith/.github-private '_(no candidate cut date resolved — cannot list failing runs)_'" + "source '$ORCH' && _blocker_body ci-failure-analyst 'next->ring0' df3b7d462460 0 0 - petry-projects/.github-private '_(no candidate cut date resolved — cannot list failing runs)_'" [ "$status" -eq 0 ] [[ "$output" != *"PRE_EXISTING"* ]] [[ "$output" != *"byte-identical"* ]] @@ -3550,7 +3550,7 @@ case "\$*" in *"run list"*) jq -nc --arg d "$run_iso" '[range(3)|{conclusion:"failure",createdAt:\$d,databaseId:88002,workflowName:"Dev-Lead Agent"}]' ;; *"run view"*) echo '{"jobs":[{"steps":[{"name":"Stage timeout (exit code 124)","conclusion":"failure"}]}]}' ;; "issue list"*) echo '$blocker_list' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/777" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/777" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -3590,7 +3590,7 @@ _sync_gap_stub() { # BLOCKED issue, triage REGRESSION (fail-closed), routed to dev-lead + needs-human. _sync_gap_stub '[]' local summ="$BATS_TEST_TMPDIR/summary_gap.md"; : > "$summ" - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" \ + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" \ CANARY_GH_RETRY_SLEEP=0 CANARY_GH_RETRIES=2 GITHUB_STEP_SUMMARY="$summ" \ bash "$ORCH" sync-issues [ "$status" -eq 0 ] @@ -3610,7 +3610,7 @@ _sync_gap_stub() { # An OPEN blocker exists for dev-lead. A fetch outage must NOT be read as 'cleared' and close # it — it must be UPDATED (kept open) and re-annotated with the gap. _sync_gap_stub '[{"number":501,"state":"OPEN","body":""}]' - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" \ + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" \ CANARY_GH_RETRY_SLEEP=0 CANARY_GH_RETRIES=2 bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"updated blocker issue #501 for dev-lead"* ]] @@ -3648,7 +3648,7 @@ _sync_gap_stub() { @test "orchestrator: sync-issues ends NON-ZERO when an agent's state is totally undeterminable (fail-closed, not a green no-op) (#820)" { # Force a total inability for the single registered agent and assert the step fails closed. _sync_gap_stub '[]' - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" \ + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" \ CANARY_GH_RETRY_SLEEP=0 CANARY_GH_RETRIES=2 bash -c " source '$ORCH' _frontier_state_resilient() { return 1; } @@ -3661,7 +3661,7 @@ _sync_gap_stub() { @test "orchestrator: sync-issues CREATE path applies needs-human for SUSPECT triage" { # No existing issue → create path; SUSPECT (differs=1 + suspect step) must add needs-human. _sync_suspect_stub '[]' - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"opened blocker issue #777 for dev-lead"* ]] grep -q -- "--add-label needs-human" "$ISSUE_LOG" @@ -3671,7 +3671,7 @@ _sync_gap_stub() { # Existing open blocker #501 → update path; SUSPECT triage must still add needs-human. # The create path was fixed in 4cd379b; this test pins the update-path parity contract. _sync_suspect_stub '[{"number":501,"state":"OPEN","body":""}]' - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"updated blocker issue #501 for dev-lead"* ]] grep -q -- "--add-label needs-human" "$ISSUE_LOG" @@ -3774,7 +3774,7 @@ GITEOF @test "_confirm_body: renders the compare diff link + the promote --confirm instruction" { run env CANARY_RINGS="$RINGS" bash -c \ - "source '$ORCH' && _confirm_body dev-lead 'ring1->stable' cccccccccccc bbbbbbbbbbbb combsmith/.github-private 5 1" + "source '$ORCH' && _confirm_body dev-lead 'ring1->stable' cccccccccccc bbbbbbbbbbbb petry-projects/.github-private 5 1" [ "$status" -eq 0 ] [[ "$output" == *"canary-confirm:dev-lead"* ]] # idempotency marker [[ "$output" == *"compare/bbbbbbbbbbbb...cccccccccccc"* ]] # stable -> candidate diff @@ -3784,7 +3784,7 @@ GITEOF @test "_confirm_body: gracefully handles empty prior (no prior stable release)" { run env CANARY_RINGS="$RINGS" bash -c \ - "source '$ORCH' && _confirm_body dev-lead 'ring1->stable' cccccccccccc '' combsmith/.github-private 5 1" + "source '$ORCH' && _confirm_body dev-lead 'ring1->stable' cccccccccccc '' petry-projects/.github-private 5 1" [ "$status" -eq 0 ] [[ "$output" == *"canary-confirm:dev-lead"* ]] [[ "$output" == *"(no prior stable release)"* ]] # fallback diff link @@ -3821,7 +3821,7 @@ case "\$*" in *"run list"*) jq -nc --arg d "$run_iso" '[range(20)|{conclusion:"success",createdAt:\$d,databaseId:88004,workflowName:"Dev-Lead Agent"}]' ;; *"run view"*) echo '{"jobs":[{"steps":[]}]}' ;; "issue list"*) echo '$issue_list' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/777" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/777" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -3837,7 +3837,7 @@ GHEOF @test "orchestrator: sync-issues opens a canary-confirm issue for an AWAITING_CONFIRMATION agent" { _confirm_sync_stub '[]' local summ="$BATS_TEST_TMPDIR/summary-confirm.md"; : > "$summ" - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"opened confirm issue #777 for dev-lead"* ]] # A SEPARATE issue keyed by the canary-confirm label + marker (not the blocker issue). @@ -3851,7 +3851,7 @@ GHEOF # dev-lead is at next->ring0 (PROMOTE, NOT require_confirmation) but an OPEN confirm issue # #502 lingers → it must be closed (the go/no-go no longer applies). _sync_stub success '[{"number":502,"state":"OPEN","body":""}]' - run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$SYNC_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"closed cleared confirm issue #502 for dev-lead"* ]] grep -q "CLOSE|.*502" "$ISSUE_LOG" @@ -3928,7 +3928,7 @@ case "\$*" in jq -nc --arg d "$run_iso" --arg c "\$__c" '[range(20)|{conclusion:\$c,createdAt:\$d,databaseId:88010,workflowName:"Dev-Lead Agent"}]' ;; *"run view"*) echo '{"jobs":[{"steps":[{"name":"Compile TypeScript","conclusion":"failure"}]}]}' ;; "issue list"*) echo '$issue_list' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/909" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/909" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -3945,7 +3945,7 @@ GHEOF # next=C1 cut 1h ago (next->ring0 SOAKING), ring0=ring1=C3 cut 30h ago, stable=prior. # ring1->stable must STILL be evaluated as AWAITING_CONFIRMATION even though `next` moved. _multicand_stub C1 C3 C3 PRIOR "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"ring1->stable"* ]] [[ "$output" == *"AWAITING_CONFIRMATION"* ]] @@ -3960,7 +3960,7 @@ GHEOF _multicand_stub C1 C3 C3 PRIOR "1 hours" "3 days" "30 hours" "" "" \ '[{"number":901,"state":"OPEN","body":""}]' local summ="$BATS_TEST_TMPDIR/mc-a.md"; : > "$summ" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] grep -q "EDIT|.*901" "$ISSUE_LOG" # the C3 confirm issue is refreshed, not closed run grep -q "CLOSE|.*901" "$ISSUE_LOG" # the hold survived the newer next cut @@ -3972,7 +3972,7 @@ GHEOF # next=C1 (soaking), ring0=ring1=C3 (AWAITING at ring1->stable). --confirm clears ONLY the # ring1->stable hold; the newer, still-soaking next candidate is untouched (AC4/AC7b). _multicand_stub C1 C3 C3 PRIOR "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --confirm --dry-run + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --confirm --dry-run [ "$status" -eq 0 ] # stable advances to ring1's candidate (C3 = eeee…), confirmed [[ "$output" == *"tags/dev-lead/stable sha=eeeeeeeeeeee"* ]] @@ -3984,7 +3984,7 @@ GHEOF @test "#1118: no tier skip — ring1 only ever advances to the commit currently on ring0" { # next=C1, ring0=C2, ring1=C3, stable=prior; every pair clean and old enough to PROMOTE. _multicand_stub C1 C2 C3 PRIOR "3 days" "40 hours" "30 hours" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --dry-run + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --dry-run [ "$status" -eq 0 ] # ring0 advances to next's commit (C1 = cccc…) [[ "$output" == *"tags/dev-lead/ring0 sha=cccccccccccc"* ]] @@ -3998,9 +3998,9 @@ GHEOF @test "#1118: a BLOCKED lower pair does not block an independently clean higher pair" { # next=C1 with a REGRESSION on the next tier (reusable differs + a failure there); # ring0=ring1=C3 independently clean → ring1->stable is AWAITING, unblocked by the lower pair. - _multicand_stub C1 C3 C3 PRIOR "3 days" "3 days" "30 hours" "combsmith/.github-private" C1 + _multicand_stub C1 C3 C3 PRIOR "3 days" "3 days" "30 hours" "petry-projects/.github-private" C1 local summ="$BATS_TEST_TMPDIR/mc-d.md"; : > "$summ" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] # lower pair blocked → its canary-blocker issue opens (REGRESSION at next->ring0) [[ "$output" == *"opened blocker issue"* ]] @@ -4013,8 +4013,8 @@ GHEOF @test "#1118: --override advances ONLY the lowest pending pair — never an AWAITING_CONFIRMATION pair for another candidate" { # next=C1 BLOCKED (REGRESSION), ring0=ring1=C3 AWAITING at ring1->stable. An operator --override of # the blocked newest candidate must not also push stable past the human go/no-go (#668 L3 stays). - _multicand_stub C1 C3 C3 PRIOR "3 days" "3 days" "30 hours" "combsmith/.github-private" C1 - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --override --dry-run + _multicand_stub C1 C3 C3 PRIOR "3 days" "3 days" "30 hours" "petry-projects/.github-private" C1 + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --override --dry-run [ "$status" -eq 0 ] [[ "$output" == *"tags/dev-lead/ring0 sha=cccccccccccc"* ]] # the overridden lowest pair advances [[ "$output" != *"tags/dev-lead/stable sha="* ]] # the higher pair keeps its own gate @@ -4024,7 +4024,7 @@ GHEOF @test "#1118: an UNRESOLVABLE source commit with a populated destination fails closed (BLOCKED), never a false COMPLETE" { # next has no resolvable tag but ring0 does: next->ring0 is pending and must hold BLOCKED. _multicand_stub NONE C3 C3 PRIOR "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"next->ring0"* ]] [[ "$output" == *"BLOCKED"* ]] @@ -4036,7 +4036,7 @@ GHEOF # every field, hiding BLOCKED), so sync-issues opens its blocker issue. _multicand_stub NONE C3 C3 PRIOR "1 hours" "3 days" "30 hours" local summ="$BATS_TEST_TMPDIR/mc-n.md"; : > "$summ" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"opened blocker issue"* ]] grep -q "BLOCKED" "$summ" @@ -4044,7 +4044,7 @@ GHEOF @test "#1118: promote --override never acts on an unresolvable candidate (no tag is moved to a sentinel)" { _multicand_stub NONE C3 C3 PRIOR "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --override --dry-run + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --override --dry-run [ "$status" -eq 0 ] [[ "$output" == *"unresolvable"* ]] [[ "$output" != *"tags/dev-lead/ring0 sha=-"* ]] @@ -4054,8 +4054,8 @@ GHEOF @test "#1118: a lower ring whose tag is UNRESOLVABLE stays in scope — its failures still block a higher pair (fail closed)" { # ring0 has no resolvable tag and its member (.github) is failing; ring1->stable must not shed # those failures just because ring0's commit is unknown rather than provably different. - _multicand_stub C1 NONE C3 PRIOR "3 days" "3 days" "30 hours" "repo combsmith/.github --workflow" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead + _multicand_stub C1 NONE C3 PRIOR "3 days" "3 days" "30 hours" "repo petry-projects/.github --workflow" + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"[ring1->stable]: BLOCKED"* ]] } @@ -4070,9 +4070,9 @@ GHEOF @test "#1225: _gh_tag_commit — an absent tag (404) is empty and NOT recorded as a lookup error" { STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")" # the tag ref 404s, but the host repo itself stays readable (so the 404 is a genuine absence) - printf '#!/usr/bin/env bash\ncase "$*" in *git/ref/tags/*) echo "gh: Not Found (HTTP 404)" >&2; exit 1 ;; *) echo combsmith/.github ;; esac\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" + printf '#!/usr/bin/env bash\ncase "$*" in *git/ref/tags/*) echo "gh: Not Found (HTTP 404)" >&2; exit 1 ;; *) echo petry-projects/.github ;; esac\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" local flag="$BATS_TEST_TMPDIR/tagfail"; : > "$flag" - run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit combsmith/.github dev-lead/next" + run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit petry-projects/.github dev-lead/next" [ "$status" -eq 0 ] [ -z "$output" ] [ ! -s "$flag" ] @@ -4082,7 +4082,7 @@ GHEOF STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")" printf '#!/usr/bin/env bash\necho "gh: Not Found (HTTP 404)" >&2; exit 1\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" local flag="$BATS_TEST_TMPDIR/tagfail"; : > "$flag" - run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit combsmith/.github dev-lead/next 2>/dev/null" + run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit petry-projects/.github dev-lead/next 2>/dev/null" [ "$status" -eq 0 ] grep -q "dev-lead/next" "$flag" } @@ -4091,7 +4091,7 @@ GHEOF STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")" printf '#!/usr/bin/env bash\necho "gh: repository not found (HTTP 500)" >&2; exit 1\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" local flag="$BATS_TEST_TMPDIR/tagfail"; : > "$flag" - run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit combsmith/.github dev-lead/next 2>/dev/null" + run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit petry-projects/.github dev-lead/next 2>/dev/null" [ "$status" -eq 0 ] grep -q "dev-lead/next" "$flag" } @@ -4099,7 +4099,7 @@ GHEOF @test "#1225: a lookup error whose flag write FAILS still reads as unknown in _ring_commits" { STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")" printf '#!/usr/bin/env bash\necho "gh: Server Error (HTTP 502)" >&2; exit 1\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" - run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="/nonexistent-dir/flag" bash -c "source '$ORCH'; _gh_tag_commit combsmith/.github dev-lead/next 2>/dev/null" + run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="/nonexistent-dir/flag" bash -c "source '$ORCH'; _gh_tag_commit petry-projects/.github dev-lead/next 2>/dev/null" [ "$status" -eq 0 ] [[ "$output" == *"!tag-lookup-error-unrecorded"* ]] } @@ -4108,7 +4108,7 @@ GHEOF STUB_BIN="$(mktemp -d "$BATS_TEST_TMPDIR/stub.XXXXXX")" printf '#!/usr/bin/env bash\necho "gh: Server Error (HTTP 502)" >&2; exit 1\n' > "$STUB_BIN/gh"; chmod +x "$STUB_BIN/gh" local flag="$BATS_TEST_TMPDIR/tagfail"; : > "$flag" - run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit combsmith/.github dev-lead/next 2>/dev/null" + run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit petry-projects/.github dev-lead/next 2>/dev/null" [ "$status" -eq 0 ] # never fails the caller (every other call site keeps working) [ -z "$output" ] grep -q "dev-lead/next" "$flag" @@ -4125,7 +4125,7 @@ esac GHEOF chmod +x "$STUB_BIN/gh" local flag="$BATS_TEST_TMPDIR/tagfail"; : > "$flag" - run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit combsmith/.github dev-lead/ring0 2>/dev/null" + run env PATH="$STUB_BIN:$PATH" _CANARY_TAG_FAIL_FLAG="$flag" bash -c "source '$ORCH'; _gh_tag_commit petry-projects/.github dev-lead/ring0 2>/dev/null" [ "$status" -eq 0 ] [ -z "$output" ] grep -q "dev-lead/ring0" "$flag" @@ -4133,7 +4133,7 @@ GHEOF @test "#1225: a TOTAL tag-lookup outage holds BLOCKED and NEVER reports fully rolled out" { _multicand_stub ERR ERR ERR ERR "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"[next->ring0]: BLOCKED"* ]] [[ "$output" == *"[ring0->ring1]: BLOCKED"* ]] @@ -4144,7 +4144,7 @@ GHEOF @test "#1225: a TOTAL tag-lookup outage — promote moves nothing and does not report nothing-to-promote" { _multicand_stub ERR ERR ERR ERR "3 days" "3 days" "30 hours" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --dry-run + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --dry-run [ "$status" -eq 0 ] [[ "$output" == *"BLOCKED"* ]] [[ "$output" != *"fully rolled out"* ]] @@ -4154,7 +4154,7 @@ GHEOF @test "#1225: a TOTAL tag-lookup outage — promote --override still moves nothing" { _multicand_stub ERR ERR ERR ERR "3 days" "3 days" "30 hours" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --override --dry-run + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --override --dry-run [[ "$output" == *"a ring tag lookup errored; not promoting"* ]] [[ "$output" != *"advancing dev-lead"* ]] [[ "$output" != *"tags/dev-lead/"*" sha="* ]] @@ -4164,7 +4164,7 @@ GHEOF _multicand_stub ERR ERR ERR ERR "1 hours" "3 days" "30 hours" "" "" \ '[{"number":905,"state":"OPEN","body":""},{"number":906,"state":"OPEN","body":""}]' local summ="$BATS_TEST_TMPDIR/tg-a.md"; : > "$summ" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 1 ] [[ "$output" == *"tag lookup"* ]] grep -q "EDIT|.*905" "$ISSUE_LOG" # the open blocker is refreshed (held), never closed @@ -4177,7 +4177,7 @@ GHEOF @test "#1225: every tag genuinely ABSENT (404) keeps the legacy COMPLETE (#1118 AC6)" { _multicand_stub NONE NONE NONE NONE "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"fully rolled out"* ]] [[ "$output" != *"BLOCKED"* ]] @@ -4186,7 +4186,7 @@ GHEOF @test "#1225: sync-issues on an all-ABSENT (unseeded/legacy) agent is a clean COMPLETE, exit 0" { _multicand_stub NONE NONE NONE NONE "1 hours" "3 days" "30 hours" local summ="$BATS_TEST_TMPDIR/tg-b.md"; : > "$summ" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 0 ] grep -qF '| `dev-lead` | COMPLETE |' "$summ" run grep -q "CREATE|" "$ISSUE_LOG" # no blocker opened for an agent with no tags yet @@ -4197,7 +4197,7 @@ GHEOF # next errors; ring0=ring1=C3 (cut 30h) and stable=prior → ring1->stable is independently # AWAITING_CONFIRMATION exactly as in the all-resolved case; only next->ring0 is held. _multicand_stub ERR C3 C3 PRIOR "1 hours" "3 days" "30 hours" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" evaluate dev-lead [ "$status" -eq 0 ] [[ "$output" == *"[next->ring0]: BLOCKED"* ]] [[ "$output" == *"[ring1->stable]: AWAITING_CONFIRMATION"* ]] @@ -4207,7 +4207,7 @@ GHEOF @test "#1225: an ERRORED destination lookup holds that pair — never PROMOTEs onto an unknown ring" { # stable errors; next=C1 clean and old enough to PROMOTE into ring0, which must still advance. _multicand_stub C1 C3 C3 ERR "3 days" "3 days" "30 hours" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --dry-run + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" bash "$ORCH" promote dev-lead --dry-run [ "$status" -eq 0 ] [[ "$output" == *"tags/dev-lead/ring0 sha=cccccccccccc"* ]] [[ "$output" != *"tags/dev-lead/stable sha="* ]] @@ -4217,7 +4217,7 @@ GHEOF @test "#1225: sync-issues opens a tag-lookup blocker for a single errored pair and still exits non-zero" { _multicand_stub ERR C3 C3 PRIOR "1 hours" "3 days" "30 hours" local summ="$BATS_TEST_TMPDIR/tg-c.md"; : > "$summ" - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="combsmith/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$MC_RINGS" ISSUE_REPO="petry-projects/.github-private" GITHUB_STEP_SUMMARY="$summ" bash "$ORCH" sync-issues [ "$status" -eq 1 ] [[ "$output" == *"opened blocker issue"* ]] grep -q "CREATE|.*tag lookup failed" "$ISSUE_LOG" @@ -4227,8 +4227,8 @@ GHEOF # The confirm issue's idempotency marker is keyed on the ring1 CANDIDATE (#1118 AC3), so a # recut ring1 candidate does not silently transfer a human's pending go/no-go to a new commit. @test "#1118: _confirm_body keys the canary-confirm marker on agent AND candidate" { - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$RINGS" bash -c \ - "source '$ORCH' && _confirm_body dev-lead 'ring1->stable' cafe1234cafe bbbbbbbbbbbb combsmith/.github-private 5 1" + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$RINGS" bash -c \ + "source '$ORCH' && _confirm_body dev-lead 'ring1->stable' cafe1234cafe bbbbbbbbbbbb petry-projects/.github-private 5 1" [ "$status" -eq 0 ] [[ "$output" == *""* ]] } @@ -4362,17 +4362,17 @@ _corr_cut() { date -u -d '-3 days' +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -v @test "_correctness_verdict: a gross candidate decision-mix shift → SHIFT" { _correctness_stub skip-checks-pending 20 dispatched 22 - run env CANARY_RINGS="$CORR_RINGS" bash -c "source '$ORCH' && _correctness_verdict dev-lead $_CORR_CAND '$(_corr_cut)' combsmith/.github-private" + run env CANARY_RINGS="$CORR_RINGS" bash -c "source '$ORCH' && _correctness_verdict dev-lead $_CORR_CAND '$(_corr_cut)' petry-projects/.github-private" [ "$status" -eq 0 ]; [ "$output" = "SHIFT" ] } @test "_correctness_verdict: candidate mix matches the baseline → OK (no effect)" { _correctness_stub dispatched 20 dispatched 22 - run env CANARY_RINGS="$CORR_RINGS" bash -c "source '$ORCH' && _correctness_verdict dev-lead $_CORR_CAND '$(_corr_cut)' combsmith/.github-private" + run env CANARY_RINGS="$CORR_RINGS" bash -c "source '$ORCH' && _correctness_verdict dev-lead $_CORR_CAND '$(_corr_cut)' petry-projects/.github-private" [ "$status" -eq 0 ]; [ "$output" = "OK" ] } @test "_correctness_verdict: candidate sample below the minimum → INSUFFICIENT (no-op)" { _correctness_stub dispatched 5 dispatched 22 - run env CANARY_RINGS="$CORR_RINGS" bash -c "source '$ORCH' && _correctness_verdict dev-lead $_CORR_CAND '$(_corr_cut)' combsmith/.github-private" + run env CANARY_RINGS="$CORR_RINGS" bash -c "source '$ORCH' && _correctness_verdict dev-lead $_CORR_CAND '$(_corr_cut)' petry-projects/.github-private" [ "$status" -eq 0 ]; [ "$output" = "INSUFFICIENT" ] } @@ -4442,7 +4442,7 @@ case "\$*" in + [range(1001;1001+\$bn)|{databaseId:.,conclusion:"success",createdAt:\$bb,workflowName:"Dev-Lead Agent"}] ) | map(select(\$s=="" or .createdAt >= \$s))' ;; "issue list"*) echo '$blocker_list' ;; - "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/combsmith/.github-private/issues/777" ;; + "issue create"*) echo "CREATE|\$*" >> "$ISSUE_LOG"; echo "https://github.com/petry-projects/.github-private/issues/777" ;; "issue edit"*) echo "EDIT|\$*" >> "$ISSUE_LOG" ;; "issue close"*) echo "CLOSE|\$*" >> "$ISSUE_LOG" ;; "issue reopen"*) echo "REOPEN|\$*" >> "$ISSUE_LOG" ;; @@ -4458,7 +4458,7 @@ GHEOF @test "orchestrator: sync-issues renders the decision-mix table in the blocker for a correctness SHIFT (#668 L2)" { _correctness_sync_stub skip-checks-pending 20 dispatched 22 '[]' - run env CANARY_RINGS="$CORR_RINGS" ISSUE_REPO="combsmith/.github-private" bash "$ORCH" sync-issues + run env CANARY_RINGS="$CORR_RINGS" ISSUE_REPO="petry-projects/.github-private" bash "$ORCH" sync-issues [ "$status" -eq 0 ] [[ "$output" == *"opened blocker issue #777 for dev-lead"* ]] # The blocker body (passed to `gh issue create --body`) carries the correctness note + mix table. @@ -4552,7 +4552,7 @@ case "\$*" in esac GHEOF chmod +x "$STUB_BIN/gh" - run bash -c "source '$ORCH' && _gh_candidate_cut_date combsmith/.github-private dev-lead $_X" + run bash -c "source '$ORCH' && _gh_candidate_cut_date petry-projects/.github-private dev-lead $_X" [ "$status" -eq 0 ] [ "$output" = "$_CUT" ] } @@ -4568,7 +4568,7 @@ case "\$*" in esac GHEOF chmod +x "$STUB_BIN/gh" - run bash -c "source '$ORCH' && _gh_candidate_cut_date combsmith/.github-private dev-lead $_X" + run bash -c "source '$ORCH' && _gh_candidate_cut_date petry-projects/.github-private dev-lead $_X" [ "$status" -eq 0 ] [ -z "$output" ] } @@ -4593,7 +4593,7 @@ case "\$*" in esac GHEOF chmod +x "$STUB_BIN/gh" - run bash -c "source '$ORCH' && _gh_candidate_cut_date combsmith/.github-private dev-lead $_X" + run bash -c "source '$ORCH' && _gh_candidate_cut_date petry-projects/.github-private dev-lead $_X" [ "$status" -eq 0 ] [ "$output" = "$_CUT" ] } @@ -4612,7 +4612,7 @@ esac GHEOF chmod +x "$STUB_BIN/gh" # GITHUB_REPOSITORY=.github forces THIS_REPO=.github, so dev-lead (host .github-private) is cross-repo. - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && candidate_cut_date dev-lead $_X" [ "$status" -eq 0 ] [ "$output" = "$_CUT" ] @@ -4637,7 +4637,7 @@ esac GITEOF chmod +x "$STUB_BIN/git" # auto-rebase host = .github == THIS_REPO → the local for-each-ref path. - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && candidate_cut_date auto-rebase $_X" [ "$status" -eq 0 ] [ "$output" = "$_CUT" ] @@ -4754,7 +4754,7 @@ GITEOF run env CANARY_RINGS="$RINGS" GITHUB_OUTPUT="$out" bash "$ORCH" promote dev-lead [ "$status" -eq 0 ] [[ "$output" == *"promoted dev-lead/v2-ring0"* ]] - grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/v2-ring0" "$MOVE_LOG" + grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/v2-ring0" "$MOVE_LOG" # A v2 promotion NEVER touches a v1-* tag. ! grep -q "v1-" "$MOVE_LOG" # promoted_ring stays the logical tier (ring0), not the major-scoped tag. @@ -4859,7 +4859,7 @@ GITEOF [ "$status" -eq 0 ] [[ "$output" == *"promoted dev-lead/ring0"* ]] [[ "$output" != *"v1-ring0"* ]] - grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/ring0 " "$MOVE_LOG" + grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/ring0 " "$MOVE_LOG" # a release major alone (no v-line seeded) must NOT sprout a v-scoped tag run grep -q "v1-" "$MOVE_LOG" [ "$status" -eq 1 ] @@ -4924,7 +4924,7 @@ GITEOF _channeldrift_stub # Force THIS_REPO=.github-private so persona-mention (host=.github) is cross-repo and resolves # its channel tags via gh api (the stub), not local git. - run env GITHUB_REPOSITORY="combsmith/.github-private" CANARY_RINGS="$CHANNELDRIFT_RINGS" bash "$ORCH" drift + run env GITHUB_REPOSITORY="petry-projects/.github-private" CANARY_RINGS="$CHANNELDRIFT_RINGS" bash "$ORCH" drift [ "$status" -eq 0 ] [[ "$output" == *"DRIFT[channel-tag]"* ]] [[ "$output" == *"persona-mention"* ]] @@ -4982,37 +4982,37 @@ GITEOF } @test "orchestrator: autocut of a MAJOR bump seeds a fresh v-next line, not the old next (#657 F4)" { - _f4_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _f4_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" major run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # major bump v2.1.0 → v3.0.0; the immutable release cut as usual, next seeded on the FRESH v3 line. grep -q "git/tags .*tag=dev-lead/v3.0.0 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" # The fresh major line does NOT move the old bare next (that would break the running fleet). ! grep -q "git/refs/tags/dev-lead/next " "$GH_LOG" } @test "orchestrator: autocut of a patch bump advances the current major's v2-next when that line exists (#657 F4)" { - _f4_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _f4_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" patch \ cccccccccccccccccccccccccccccccccccccccc run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # patch bump v2.1.0 → v2.1.1; the v2 line exists → next advances ON the major line, not bare next. grep -q "git/tags .*tag=dev-lead/v2.1.1 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/v2-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/v2-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" ! grep -q "git/refs/tags/dev-lead/next " "$GH_LOG" } @test "orchestrator: autocut of a patch bump falls back to bare next when no v-line exists yet (#657 F4)" { # Today's bare fleet: no v2-next tag → resolution falls back to bare next → byte-identical move. - _f4_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _f4_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ blobMAIN blobNEXT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" patch run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] grep -q "git/tags .*tag=dev-lead/v2.1.1 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" ! grep -q "git/refs/tags/dev-lead/v2-next" "$GH_LOG" } @@ -5107,14 +5107,14 @@ YML @test "orchestrator: autocut detects a feat! commit → MAJOR + seeds a fresh v-next (#712)" { local commits='[{"sha":"newcommit0000000000000000000000000000","commit":{"message":"feat!: drop the legacy dry_run input\n\nRemoves a caller-facing knob."}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' # interface unchanged (same yaml both refs) — the major comes purely from the commit signal. - _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$(_iface_yaml)" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # major bump v2.1.0 → v3.0.0; next seeded on the FRESH v3 line, old bare next untouched. grep -q "git/tags .*tag=dev-lead/v3.0.0 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" ! grep -q "git/refs/tags/dev-lead/next " "$GH_LOG" } @@ -5139,13 +5139,13 @@ jobs: steps: [] YML )" - _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$new_yaml" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] grep -q "git/tags .*tag=dev-lead/v3.0.0 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" } @test "orchestrator: autocut detects a newly-required workflow_call input → MAJOR (interface break) (#712)" { @@ -5175,7 +5175,7 @@ jobs: steps: [] YML )" - _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$new_yaml" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5210,7 +5210,7 @@ jobs: steps: [] YML )" - _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$new_yaml" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5222,7 +5222,7 @@ YML @test "orchestrator: autocut detects a fix-only change → PATCH (#712)" { local commits='[{"sha":"newcommit0000000000000000000000000000","commit":{"message":"fix: correct a log message"}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' - _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$(_iface_yaml)" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5233,7 +5233,7 @@ YML @test "orchestrator: autocut fails SAFE to PATCH when the commit-signal fetch errors (#712)" { # commits?path returns a non-array error payload → signal fetch fails → never auto-major. local commits='{"message":"Not Found","status":"404"}' - _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$(_iface_yaml)" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5245,13 +5245,13 @@ YML @test "orchestrator: autocut knob override forces MAJOR over a patch-only diff (#712)" { # Signals say patch (fix commit, no interface change) but the registry knob forces major. local commits='[{"sha":"newcommit0000000000000000000000000000","commit":{"message":"fix: small tweak"}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' - _detect_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _detect_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "$commits" "$(_iface_yaml)" "$(_iface_yaml)" major run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] grep -q "git/tags .*tag=dev-lead/v3.0.0 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/combsmith/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/petry-projects/.github-private/git/refs/tags/dev-lead/v3-next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" } # ── autocut bump-signal scoping + pagination + fail-safe (#1023 defect 1) ─────── @@ -5329,7 +5329,7 @@ _filler_page() { jq -nc '[range(100)|{sha:("f\(.)"),commit:{message:"chore: fill # `feat!` that would force a major touched an unrelated file (docs/), so it never appears in # `commits?path=` and must not move the bump. Scoping ⇒ patch, not major. local re1='[{"sha":"newcommit0000000000000000000000000000","commit":{"message":"fix: correct a log line"}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' - _scoped_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _scoped_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "2026-08-01T00:00:00Z" "$re1" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5343,7 +5343,7 @@ _filler_page() { jq -nc '[range(100)|{sha:("f\(.)"),commit:{message:"chore: fill # path carries a `feat!`. Multi-path union ⇒ major (a change to a watched dependency counts). local re1='[{"sha":"newcommit0000000000000000000000000000","commit":{"message":"fix: reusable tidy"}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' local ex1='[{"sha":"libcommit00000000000000000000000000000","commit":{"message":"feat!: drop the legacy shared entrypoint"}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' - _scoped_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _scoped_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "2026-08-01T00:00:00Z" "$re1" "[]" "$ex1" '["scripts/lib/shared.sh"]' run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5356,7 +5356,7 @@ _filler_page() { jq -nc '[range(100)|{sha:("f\(.)"),commit:{message:"chore: fill # BREAKING CHANGE commit are on page 2. If pagination stopped at the cap the break would ship as # a patch — the dangerous direction. Enumerating past the cap ⇒ major. local re2='[{"sha":"breaker000000000000000000000000000000000","commit":{"message":"feat: extend the matrix\n\nBREAKING CHANGE: the matrix input is now required."}},{"sha":"cccccccccccccccccccccccccccccccccccccccc","commit":{"message":"chore: prior baseline"}}]' - _scoped_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _scoped_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "2026-08-01T00:00:00Z" "$(_filler_page)" "$re2" run env CANARY_AUTO_CUT=true CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5368,7 +5368,7 @@ _filler_page() { jq -nc '[range(100)|{sha:("f\(.)"),commit:{message:"chore: fill # Every page is a full 100-commit page and the boundary is never reached within the page cap → # the range cannot be enumerated. It must NOT silently downgrade to patch: fail safe to major # with a ::warning::. - _scoped_autocut_stub dev-lead combsmith/.github-private .github/workflows/dev-lead-reusable.yml \ + _scoped_autocut_stub dev-lead petry-projects/.github-private .github/workflows/dev-lead-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "2.1.0" \ "2026-08-01T00:00:00Z" "$(_filler_page)" "$(_filler_page)" run env CANARY_AUTO_CUT=true CANARY_MAX_COMMIT_PAGES=2 CANARY_RINGS="$AUTOCUT_RINGS" bash "$ORCH" autocut @@ -5530,20 +5530,20 @@ GITEOF @test "orchestrator: autocut cuts on a SCRIPT-ONLY change (reusable blob identical) (#1019)" { local compare='{"files":[{"filename":"scripts/lib/dev-lead-retrigger.sh"}],"commits":[{"commit":{"message":"fix: forced dispatches survive sweep concurrency"}}]}' - _scriptonly_stub persona-mention combsmith/.github .github/workflows/persona-mention-reusable.yml \ + _scriptonly_stub persona-mention petry-projects/.github .github/workflows/persona-mention-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "1.2.0" "$compare" run env CANARY_AUTO_CUT=true CANARY_RINGS="$SCRIPTONLY_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # fix-only script change → patch bump v1.2.0 → v1.2.1, cut on the host + next moved. - grep -q "repos/combsmith/.github/git/tags .*tag=persona-mention/v1.2.1 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" - grep -q "PATCH repos/combsmith/.github/git/refs/tags/persona-mention/next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "repos/petry-projects/.github/git/tags .*tag=persona-mention/v1.2.1 .*object=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" + grep -q "PATCH repos/petry-projects/.github/git/refs/tags/persona-mention/next .*sha=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "$GH_LOG" } @test "orchestrator: autocut does NOT cut when only a non-watched path changed (#1019)" { # reusable identical AND the only change is under docs/ (not scripts/prompts/personas/ or the # reusable) → nothing a consumer executes changed → no cut. local compare='{"files":[{"filename":"docs/notes.md"}],"commits":[{"commit":{"message":"docs: tidy"}}]}' - _scriptonly_stub persona-mention combsmith/.github .github/workflows/persona-mention-reusable.yml \ + _scriptonly_stub persona-mention petry-projects/.github .github/workflows/persona-mention-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "1.2.0" "$compare" run env CANARY_AUTO_CUT=true CANARY_RINGS="$SCRIPTONLY_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] @@ -5553,7 +5553,7 @@ GITEOF @test "orchestrator: autocut bump detection applies to a script-only feat → MINOR (#1019)" { local compare='{"files":[{"filename":"scripts/lib/dev-lead-retrigger.sh"}],"commits":[{"commit":{"message":"feat: add a --force retrigger mode"}}]}' - _scriptonly_stub persona-mention combsmith/.github .github/workflows/persona-mention-reusable.yml \ + _scriptonly_stub persona-mention petry-projects/.github .github/workflows/persona-mention-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "1.2.0" "$compare" run env CANARY_AUTO_CUT=true CANARY_RINGS="$SCRIPTONLY_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] @@ -5562,13 +5562,13 @@ GITEOF @test "orchestrator: autocut bump detection applies to a script-only feat! → MAJOR (#1019)" { local compare='{"files":[{"filename":"scripts/lib/dev-lead-retrigger.sh"}],"commits":[{"commit":{"message":"feat!: drop the legacy retrigger path"}}]}' - _scriptonly_stub persona-mention combsmith/.github .github/workflows/persona-mention-reusable.yml \ + _scriptonly_stub persona-mention petry-projects/.github .github/workflows/persona-mention-reusable.yml \ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa cccccccccccccccccccccccccccccccccccccccc "1.2.0" "$compare" run env CANARY_AUTO_CUT=true CANARY_RINGS="$SCRIPTONLY_RINGS" bash "$ORCH" autocut [ "$status" -eq 0 ] # major bump v1.2.0 → v2.0.0 seeded on a fresh v2-next line. grep -q "git/tags .*tag=persona-mention/v2.0.0 " "$GH_LOG" - grep -q "PATCH repos/combsmith/.github/git/refs/tags/persona-mention/v2-next " "$GH_LOG" + grep -q "PATCH repos/petry-projects/.github/git/refs/tags/persona-mention/v2-next " "$GH_LOG" } # ── _gh_move_tag: create the ref when the PATCH reports 422 "Reference does not exist" ── @@ -5577,7 +5577,7 @@ GITEOF # exist" (NOT 404). The mover must treat that as create-if-missing and POST the ref (#1019). @test "_gh_move_tag: creates the ref on a 422 'Reference does not exist' (#1019)" { _move_tag_stub noref ok - run bash -c "source '$ORCH' && _gh_move_tag combsmith/.github persona-mention/ring0 8837cee9db2988837cee9db2988837cee9db298" + run bash -c "source '$ORCH' && _gh_move_tag petry-projects/.github persona-mention/ring0 8837cee9db2988837cee9db2988837cee9db298" [ "$status" -eq 0 ] grep -q '^PATCH$' "$CALL_LOG" grep -q '^POST$' "$CALL_LOG" @@ -5693,7 +5693,7 @@ GHEOF # ci-failure-analyst): host-relative rings (next = the host) so `next`+`ring0` # span both org-infra repos whichever hosts the agent. @test "pr-review is registered with its .github-private host + engine reusable (#1166)" { - [ "$(jq -r '.agents["pr-review"].host' "$RINGS")" = "combsmith/.github-private" ] + [ "$(jq -r '.agents["pr-review"].host' "$RINGS")" = "petry-projects/.github-private" ] [ "$(jq -r '.agents["pr-review"].reusable' "$RINGS")" = ".github/workflows/pr-review.yml" ] # run_workflow must resolve the agent's runs for the gate's sample floor — non-empty. [ -n "$(jq -r '.agents["pr-review"].run_workflow // empty' "$RINGS")" ] @@ -5759,11 +5759,11 @@ GITEOF # persona-mention is cross-repo (host=.github); next resolves via gh api. next != main and a # scripts/ file differs between them → merged-but-unshipped. local compare='{"files":[{"filename":"scripts/lib/persona-mention.sh"}],"commits":[{"commit":{"message":"fix: x"}}]}' - _shipdrift_stub persona-mention combsmith/.github \ + _shipdrift_stub persona-mention petry-projects/.github \ cccccccccccccccccccccccccccccccccccccccc aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "$compare" # Force THIS_REPO=.github-private so persona-mention (host=.github) is cross-repo and resolves # its `next` channel tag via gh api (the stub), not local git (mirrors the #613 cross-repo tests). - run env GITHUB_REPOSITORY="combsmith/.github-private" CANARY_RINGS="$SHIPDRIFT_RINGS" bash "$ORCH" drift + run env GITHUB_REPOSITORY="petry-projects/.github-private" CANARY_RINGS="$SHIPDRIFT_RINGS" bash "$ORCH" drift [ "$status" -eq 0 ] [[ "$output" == *"DRIFT[unshipped]"* ]] [[ "$output" == *"persona-mention"* ]] @@ -5832,14 +5832,14 @@ GITEOF @test "_resolved_channel: release-major≠channel-major resolves to v1-ring0, never v14-ring0 nor bare ring0 (#1065)" { _divergent_major_stub # cross-repo (host=.github-private, THIS_REPO=.github) so channel tags resolve via gh api. - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && _resolved_channel_tag dev-lead ring0" [ "$status" -eq 0 ] [ "$output" = "dev-lead/v1-ring0" ] [ "$output" != "dev-lead/v14-ring0" ] [ "$output" != "dev-lead/ring0" ] # the resolved commit is the v1-ring0 tag's, never the bare ring0's (no fallback). - run env GITHUB_REPOSITORY="combsmith/.github" CANARY_RINGS="$RINGS" \ + run env GITHUB_REPOSITORY="petry-projects/.github" CANARY_RINGS="$RINGS" \ bash -c "source '$ORCH' && _resolved_channel dev-lead ring0 | cut -f2" [ "$output" = "d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1" ] [ "$output" != "b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0" ] @@ -6836,7 +6836,7 @@ _ingress_frontier() { } @test "_blocker_body: UNRESOLVED triage explains the blind member, not a cut-date indeterminate (#1224)" { - run bash -c "source '$ORCH' && _blocker_body dev-lead 'next->ring0' cand 0 0 UNRESOLVED combsmith/.github-private '- \`org/collapsed\` — ingress present'" + run bash -c "source '$ORCH' && _blocker_body dev-lead 'next->ring0' cand 0 0 UNRESOLVED petry-projects/.github-private '- \`org/collapsed\` — ingress present'" [ "$status" -eq 0 ] [[ "$output" == *"UNRESOLVED"* ]] [[ "$output" == *"ingress_job"* ]] @@ -6935,7 +6935,7 @@ _ingress_registry_lint() { @test "registry lint: every registered ingress_job is a job of the canonical agent-ingress.yml template (#1246 item 10)" { if [ ! -f "$INGRESS_TEMPLATE" ]; then - skip "canonical template not published yet ($INGRESS_TEMPLATE; combsmith/.github-private#1729 AC11(a)) — lint is dormant until it lands" + skip "canonical template not published yet ($INGRESS_TEMPLATE; petry-projects/.github-private#1729 AC11(a)) — lint is dormant until it lands" fi run _ingress_registry_lint "$RINGS" "$INGRESS_TEMPLATE" [ "$status" -eq 0 ] || { echo "ingress_job not declared by the canonical ingress:"; echo "$output"; return 1; } diff --git a/tests/persona_mention.bats b/tests/persona_mention.bats index 03d402392..9cc6c18d5 100644 --- a/tests/persona_mention.bats +++ b/tests/persona_mention.bats @@ -22,7 +22,7 @@ manifest() { id: qa-lead name: QA Lead address: - handle: combsmith/qa-lead + handle: petry-projects/qa-lead triggers: default_mode: advisory opt_out_label: qa-lead:hands-off @@ -40,18 +40,18 @@ MENTION_ON=' - surface: mention # --- slug extraction ------------------------------------------------------- @test "pm_extract_slugs finds a handle in prose" { - run pm_extract_slugs "hey @combsmith/qa-lead please look at this" + run pm_extract_slugs "hey @petry-projects/qa-lead please look at this" [ "$status" -eq 0 ] [ "$output" = "qa-lead" ] } @test "pm_extract_slugs collapses duplicates so one mention dispatches once" { - run pm_extract_slugs "@combsmith/qa-lead and again @combsmith/qa-lead" + run pm_extract_slugs "@petry-projects/qa-lead and again @petry-projects/qa-lead" [ "$output" = "qa-lead" ] } @test "pm_extract_slugs finds several distinct personas, order preserved" { - run pm_extract_slugs "@combsmith/qa-lead and @combsmith/dev-lead" + run pm_extract_slugs "@petry-projects/qa-lead and @petry-projects/dev-lead" [ "${lines[0]}" = "qa-lead" ] [ "${lines[1]}" = "dev-lead" ] [ "${#lines[@]}" -eq 2 ] @@ -101,29 +101,29 @@ MENTION_ON=' - surface: mention } @test "pm_should_route blocks a comment authored by an agent (axis 1)" { - run pm_should_route donpetry-bot OWNER "@combsmith/qa-lead please review" + run pm_should_route donpetry-bot OWNER "@petry-projects/qa-lead please review" [ "$status" -ne 0 ] } @test "pm_should_route blocks a comment carrying the agent marker (axis 2)" { - run pm_should_route don-petry OWNER ' @combsmith/dev-lead over to you' + run pm_should_route don-petry OWNER ' @petry-projects/dev-lead over to you' [ "$status" -ne 0 ] } @test "pm_should_route blocks the combinatorial cross-persona loop" { # The failure mode §4.1 warns about: qa-lead answering a thread and mentioning # dev-lead. Marked AND bot-authored — either axis alone must stop it. - run pm_should_route donpetry-bot OWNER ' @combsmith/dev-lead your turn' + run pm_should_route donpetry-bot OWNER ' @petry-projects/dev-lead your turn' [ "$status" -ne 0 ] } @test "pm_should_route allows a trusted human addressing a persona" { - run pm_should_route don-petry OWNER "@combsmith/qa-lead please review" + run pm_should_route don-petry OWNER "@petry-projects/qa-lead please review" [ "$status" -eq 0 ] } @test "pm_should_route blocks an untrusted commenter" { - run pm_should_route drive-by NONE "@combsmith/qa-lead please review" + run pm_should_route drive-by NONE "@petry-projects/qa-lead please review" [ "$status" -ne 0 ] } @@ -220,7 +220,7 @@ MENTION_ON=' - surface: mention @test "pm_manifest_url builds the raw manifest path by convention" { run pm_manifest_url qa-lead - [ "$output" = "https://raw.githubusercontent.com/combsmith/.github-private/main/personas/qa-lead/persona.yml" ] + [ "$output" = "https://raw.githubusercontent.com/petry-projects/.github-private/main/personas/qa-lead/persona.yml" ] } @test "pm_manifest_url honours PERSONA_REF for testing against a branch" { @@ -235,7 +235,7 @@ MENTION_ON=' - surface: mention @test "pm_extract_slugs ignores a handle inside a fenced code block" { run pm_extract_slugs 'Example: ``` -@combsmith/qa-lead review this +@petry-projects/qa-lead review this ``` done' [ -z "$output" ] @@ -244,21 +244,21 @@ done' @test "pm_extract_slugs ignores a handle inside a tilde fence" { run pm_extract_slugs 'Example: ~~~ -@combsmith/qa-lead review this +@petry-projects/qa-lead review this ~~~ done' [ -z "$output" ] } @test "pm_extract_slugs ignores a handle in inline code" { - run pm_extract_slugs 'The handle is `@combsmith/qa-lead` for QA.' + run pm_extract_slugs 'The handle is `@petry-projects/qa-lead` for QA.' [ -z "$output" ] } @test "pm_extract_slugs ignores a handle in a blockquote (quote-reply)" { # GitHub's one-click Quote reply prefixes '>'. Re-running an agent over quoted # text is not what the quoter meant, and no recursion axis catches it. - run pm_extract_slugs '> @combsmith/qa-lead please review + run pm_extract_slugs '> @petry-projects/qa-lead please review Agreed.' [ -z "$output" ] @@ -267,7 +267,7 @@ Agreed.' @test "pm_extract_slugs still fires on a real mention beside a quote" { run pm_extract_slugs '> some earlier comment -@combsmith/qa-lead thoughts?' +@petry-projects/qa-lead thoughts?' [ "$output" = "qa-lead" ] } @@ -276,14 +276,14 @@ Agreed.' ``` npm test ``` -@combsmith/qa-lead can you look?' +@petry-projects/qa-lead can you look?' [ "$output" = "qa-lead" ] } @test "pm_should_route ignores a comment whose only handle is in a code fence" { run pm_should_route don-petry OWNER 'docs: ``` -@combsmith/qa-lead +@petry-projects/qa-lead ```' [ "$status" -ne 0 ] } @@ -346,7 +346,7 @@ YAML @test "pm_interaction_url builds the raw contract path by convention" { run pm_interaction_url qa-lead - [ "$output" = "https://raw.githubusercontent.com/combsmith/.github-private/main/personas/qa-lead/interaction.yml" ] + [ "$output" = "https://raw.githubusercontent.com/petry-projects/.github-private/main/personas/qa-lead/interaction.yml" ] } @test "pm_interaction_url honours PERSONA_REF for testing against a branch" { diff --git a/tests/standards_release.bats b/tests/standards_release.bats index 65e78e355..5587c1243 100644 --- a/tests/standards_release.bats +++ b/tests/standards_release.bats @@ -212,7 +212,7 @@ EOF #!/usr/bin/env bash case "$*" in "rev-parse HEAD") echo "2222222222222222222222222222222222222222" ;; - "config --get remote.origin.url") echo "https://github.com/combsmith/.github.git" ;; + "config --get remote.origin.url") echo "https://github.com/petry-projects/.github.git" ;; *) : ;; esac EOF diff --git a/tests/test_agent_rate_limit.bats b/tests/test_agent_rate_limit.bats index 75eb18338..fad75469b 100644 --- a/tests/test_agent_rate_limit.bats +++ b/tests/test_agent_rate_limit.bats @@ -72,7 +72,7 @@ write_config() { } }, org_wide: {}, - exempt_actors: ["dependabot[bot]", "@combsmith/org-leads"], + exempt_actors: ["dependabot[bot]", "@petry-projects/org-leads"], exempt_labels: ["security"] }' >"$AGENT_RATE_LIMITS_CONFIG" } diff --git a/tests/test_agent_rate_limit_gate.bats b/tests/test_agent_rate_limit_gate.bats index 1ea168404..a9941dc75 100644 --- a/tests/test_agent_rate_limit_gate.bats +++ b/tests/test_agent_rate_limit_gate.bats @@ -74,7 +74,7 @@ STUB circuit_breaker: { consecutive_failure_threshold: $cb_threshold, backoff_minutes: $cb_backoff } } }, org_wide: {}, - exempt_actors: ["dependabot[bot]", "@combsmith/org-leads"], + exempt_actors: ["dependabot[bot]", "@petry-projects/org-leads"], exempt_labels: ["security"] }' >"$AGENT_RATE_LIMITS_CONFIG" } @@ -102,7 +102,7 @@ STUB weekly_scoped: { kind: "weekly_scoped", pause_worthy: false } } } }, - exempt_actors: ["dependabot[bot]", "@combsmith/org-leads"], + exempt_actors: ["dependabot[bot]", "@petry-projects/org-leads"], exempt_labels: ["security"] }' >"$AGENT_RATE_LIMITS_CONFIG" } @@ -129,7 +129,7 @@ STUB weekly_scoped: { kind: "weekly_scoped", pause_worthy: false } } } }, - exempt_actors: ["dependabot[bot]", "@combsmith/org-leads"], + exempt_actors: ["dependabot[bot]", "@petry-projects/org-leads"], exempt_labels: ["security"] }' >"$AGENT_RATE_LIMITS_CONFIG" } @@ -381,7 +381,7 @@ refute_mutated() { export GH_RUNS_JSON GH_RUNS_JSON="$(runs_json 'failure@2026-09-01T00:04:00Z' 'failure@2026-09-01T00:03:00Z' 'failure@2026-09-01T00:02:00Z')" export GH_ISSUE_BODY="tracking issue, no marker yet" - run bash -c "SOURCE_NOW=1788221100 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" + run bash -c "SOURCE_NOW=1788221100 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=defer"* ]] # Exactly one comment posting the breaker marker, and the label applied. @@ -398,7 +398,7 @@ refute_mutated() { # Body already carries the marker for initiative-driver → no second post. export GH_ISSUE_BODY GH_ISSUE_BODY="prior escalation $(bash -c "source '$(cd "$BATS_TEST_DIRNAME/.." && pwd)/scripts/lib/agent-rate-limit.sh'; arl_breaker_marker initiative-driver")" - run bash -c "SOURCE_NOW=1788221100 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" + run bash -c "SOURCE_NOW=1788221100 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=defer"* ]] run grep -c 'issue comment' "$GH_STUB_LOG" @@ -413,7 +413,7 @@ refute_mutated() { export GH_RUNS_JSON GH_RUNS_JSON="$(runs_json 'failure@2026-09-01T00:04:00Z' 'failure@2026-09-01T00:03:00Z' 'failure@2026-09-01T00:02:00Z')" export GH_ISSUE_BODY="no marker" - run bash -c "DRY_RUN=true SOURCE_NOW=1788221100 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" + run bash -c "DRY_RUN=true SOURCE_NOW=1788221100 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=allow"* ]] refute_mutated @@ -463,7 +463,7 @@ refute_mutated() { @test "enforce: an allow decision issues no mutating gh subcommand" { write_config "initiative-driver" 1 10 20 3 30 export GH_RUNS_JSON; GH_RUNS_JSON="[]" - run bash -c "SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" + run bash -c "SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=allow"* ]] refute_mutated @@ -616,7 +616,7 @@ refute_mutated() { write_telemetry "$(envelope_limits 95 40)" export GH_RUNS_JSON; GH_RUNS_JSON="[]" export GH_ISSUE_BODY="tracking issue, no token marker yet" - run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" + run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=defer"* ]] run grep -c 'issue comment' "$GH_STUB_LOG" @@ -631,7 +631,7 @@ refute_mutated() { export GH_RUNS_JSON; GH_RUNS_JSON="[]" export GH_ISSUE_BODY GH_ISSUE_BODY="prior escalation $(bash -c "source '$(cd "$BATS_TEST_DIRNAME/.." && pwd)/scripts/lib/agent-rate-limit.sh'; arl_token_breaker_marker session")" - run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" + run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=defer"* ]] run grep -c 'issue comment' "$GH_STUB_LOG" @@ -648,7 +648,7 @@ refute_mutated() { export GH_ISSUE_BODY="tracking issue, no token marker in body" export GH_ISSUE_COMMENTS_JSON GH_ISSUE_COMMENTS_JSON="$(jq -n --arg m "$(bash -c "source '$(cd "$BATS_TEST_DIRNAME/.." && pwd)/scripts/lib/agent-rate-limit.sh'; arl_token_breaker_marker session")" '[{body: ("prior escalation " + $m)}]')" - run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" + run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' initiative-driver --mode enforce --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=defer"* ]] run grep -c 'issue comment' "$GH_STUB_LOG" @@ -660,7 +660,7 @@ refute_mutated() { write_telemetry "$(envelope_limits 95 40)" export GH_RUNS_JSON; GH_RUNS_JSON="[]" export GH_ISSUE_BODY="tracking issue, no token marker yet" - run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' feature-ideation --mode log-only --actor donpetry-bot --tracking-repo combsmith/.github --tracking-issue 636" + run bash -c "AGENT_TOKEN_BUDGET_ENABLED=true SOURCE_NOW=1893456000 bash '$GATE' feature-ideation --mode log-only --actor donpetry-bot --tracking-repo petry-projects/.github --tracking-issue 636" [ "$status" -eq 0 ] [[ "$output" == *"decision=allow"* ]] refute_mutated diff --git a/tests/test_agent_rate_limit_ingress.bats b/tests/test_agent_rate_limit_ingress.bats index 0df028025..5f81b4531 100644 --- a/tests/test_agent_rate_limit_ingress.bats +++ b/tests/test_agent_rate_limit_ingress.bats @@ -243,9 +243,9 @@ seed_collapsed() { @test "concurrency: AGENT_RATE_LIMITS_ORG_REPOS tallies a mixed collapsed/non-collapsed fleet" { runs_fixture _local dev-lead '[{"status":"in_progress"},{"status":"in_progress"}]' # legacy: 2 - seed_collapsed combsmith/markets # collapsed: 2 - runs_fixture combsmith/other dev-lead '[{"status":"queued"},{"status":"completed"}]' # legacy: 1 - export AGENT_RATE_LIMITS_ORG_REPOS="combsmith/markets, combsmith/other" + seed_collapsed petry-projects/markets # collapsed: 2 + runs_fixture petry-projects/other dev-lead '[{"status":"queued"},{"status":"completed"}]' # legacy: 1 + export AGENT_RATE_LIMITS_ORG_REPOS="petry-projects/markets, petry-projects/other" run --separate-stderr bash -c 'source "$1"; arl_count_concurrent_runs dev-lead' _ "$LIB" [ "$status" -eq 0 ] [ "$output" = "5" ] @@ -253,16 +253,16 @@ seed_collapsed() { @test "concurrency: an unresolved OTHER org repo counts 0 with a warning (no org-wide wedge)" { runs_fixture _local dev-lead '[{"status":"in_progress"}]' - export AGENT_RATE_LIMITS_ORG_REPOS="combsmith/ghost" + export AGENT_RATE_LIMITS_ORG_REPOS="petry-projects/ghost" run --separate-stderr bash -c 'source "$1"; arl_count_concurrent_runs dev-lead' _ "$LIB" [ "$status" -eq 0 ] [ "$output" = "1" ] - [[ "$stderr" == *"combsmith/ghost"* ]] + [[ "$stderr" == *"petry-projects/ghost"* ]] } @test "concurrency: the gated (current) repo unresolved still fails closed even with healthy org repos" { - seed_collapsed combsmith/markets - export AGENT_RATE_LIMITS_ORG_REPOS="combsmith/markets" + seed_collapsed petry-projects/markets + export AGENT_RATE_LIMITS_ORG_REPOS="petry-projects/markets" run --separate-stderr bash -c 'source "$1"; arl_count_concurrent_runs dev-lead' _ "$LIB" [ "$status" -eq 3 ] [ "$output" = "unresolved" ] @@ -270,9 +270,9 @@ seed_collapsed() { @test "concurrency: a permission-caused bare 404 on a private org repo is transient, not permanently missing" { runs_fixture _local dev-lead '[{"status":"in_progress"}]' - : >"$GH_FIX/runs/combsmith_private__dev-lead.forbidden" - : >"$GH_FIX/runs/combsmith_private__agent-ingress.yml.forbidden" - export AGENT_RATE_LIMITS_ORG_REPOS="combsmith/private" + : >"$GH_FIX/runs/petry-projects_private__dev-lead.forbidden" + : >"$GH_FIX/runs/petry-projects_private__agent-ingress.yml.forbidden" + export AGENT_RATE_LIMITS_ORG_REPOS="petry-projects/private" run --separate-stderr bash -c 'source "$1"; arl_count_concurrent_runs dev-lead' _ "$LIB" [ "$status" -eq 0 ] [ "$output" = "1" ] @@ -317,8 +317,8 @@ seed_collapsed() { @test "concurrency: a transient repo in AGENT_RATE_LIMITS_ORG_REPOS degrades only that repo" { runs_fixture _local dev-lead '[{"status":"in_progress"}]' - transient_fixture combsmith/flaky dev-lead - export AGENT_RATE_LIMITS_ORG_REPOS="combsmith/flaky" + transient_fixture petry-projects/flaky dev-lead + export AGENT_RATE_LIMITS_ORG_REPOS="petry-projects/flaky" run --separate-stderr bash -c 'source "$1"; arl_count_concurrent_runs dev-lead' _ "$LIB" [ "$status" -eq 0 ] [ "$output" = "1" ] diff --git a/tests/test_agent_rate_limit_token_budget.bats b/tests/test_agent_rate_limit_token_budget.bats index b9e1054ad..6dd0b7855 100644 --- a/tests/test_agent_rate_limit_token_budget.bats +++ b/tests/test_agent_rate_limit_token_budget.bats @@ -81,7 +81,7 @@ write_token_config() { } } }, - exempt_actors: ["dependabot[bot]", "@combsmith/org-leads"], + exempt_actors: ["dependabot[bot]", "@petry-projects/org-leads"], exempt_labels: ["security"] }' >"$AGENT_RATE_LIMITS_CONFIG" } diff --git a/tests/test_agent_rate_limit_weekly_glide.bats b/tests/test_agent_rate_limit_weekly_glide.bats index 0b535ae38..2e943f92c 100644 --- a/tests/test_agent_rate_limit_weekly_glide.bats +++ b/tests/test_agent_rate_limit_weekly_glide.bats @@ -87,7 +87,7 @@ write_glide_config() { } } }, - exempt_actors: ["dependabot[bot]", "@combsmith/org-leads"], + exempt_actors: ["dependabot[bot]", "@petry-projects/org-leads"], exempt_labels: ["security"] }' >"$AGENT_RATE_LIMITS_CONFIG" } diff --git a/tests/test_agent_rate_limits_config.bats b/tests/test_agent_rate_limits_config.bats index 96417f109..9765ce725 100644 --- a/tests/test_agent_rate_limits_config.bats +++ b/tests/test_agent_rate_limits_config.bats @@ -217,7 +217,7 @@ AGENT_TYPES=(dev-lead compliance-audit feature-ideation initiative-driver) } @test "org-leads break-glass actor is present in the exempt-actor list" { - run jq -e '.exempt_actors | index("@combsmith/org-leads") != null' "$CONFIG" + run jq -e '.exempt_actors | index("@petry-projects/org-leads") != null' "$CONFIG" [ "$status" -eq 0 ] [ "$output" = "true" ] } diff --git a/tests/test_bootstrap_new_repo.bats b/tests/test_bootstrap_new_repo.bats index 296c27069..a199ac6cf 100644 --- a/tests/test_bootstrap_new_repo.bats +++ b/tests/test_bootstrap_new_repo.bats @@ -11,7 +11,7 @@ setup() { export PATH="$STUB_BIN:$PATH" CALLS="$STUB_BIN/calls.log"; export CALLS STUB_DIR="$(mktemp -d)" || { echo "Failed to create STUB_DIR" >&2; exit 1; } - # Fleet rulesets (code-quality, pr-quality) now live in combsmith/.github + # Fleet rulesets (code-quality, pr-quality) now live in petry-projects/.github # (relocated under #575), so the REAL apply-rulesets.sh runs in fleet mode. Point # it at a local fixture so resolution needs no network; the authoritative content # is validated in .github. release-channel-tags stays repo-local and is NOT @@ -20,7 +20,7 @@ setup() { printf '{"name":"code-quality","target":"branch","enforcement":"active"}\n' > "$FLEET_DIR/code-quality.json" printf '{"name":"pr-quality","target":"branch","enforcement":"active"}\n' > "$FLEET_DIR/pr-quality.json" export FLEET_RULESETS_DIR="$FLEET_DIR" - # Canonical apply-repo-settings.sh (combsmith/.github) requires a token and + # Canonical apply-repo-settings.sh (petry-projects/.github) requires a token and # fetches current state even under dry-run (to diff). gh is stubbed, so this dummy # is never used for a real call — it only satisfies the guard. export GH_TOKEN=dummy @@ -83,7 +83,7 @@ EOF # NOTE: the codified pr-quality.json / code-quality.json shape assertions moved out # of this suite with the JSONs themselves — the fleet rulesets are now owned by -# combsmith/.github (standards/rulesets/, relocated under #575) and their +# petry-projects/.github (standards/rulesets/, relocated under #575) and their # content is validated there. This suite covers bootstrap's ORCHESTRATION: that it # applies exactly the two fleet rulesets (via fleet-mode apply-rulesets.sh) and not # the repo-local release-channel-tags. @@ -211,9 +211,9 @@ _ring_sot_copy() { # central file 1: this repo's canary-rings.json [[ "$output" == *"would add owner/new-repo"* ]] [[ "$output" == *"ring1"* ]] - # central file 2: cross-repo ring-pins.sh in combsmith/.github + # central file 2: cross-repo ring-pins.sh in petry-projects/.github [[ "$output" == *"ring-pins.sh"* ]] - [[ "$output" == *"combsmith/.github"* ]] + [[ "$output" == *"petry-projects/.github"* ]] # stub repin to the matching channel tag [[ "$output" == *"@dev-lead/ring1"* ]] # dry-run makes no write API calls and does not mutate the SoT @@ -242,7 +242,7 @@ _ring_sot_copy() { _stub_gh _ring_sot_copy run env DRY_RUN=true GITHUB_ACTOR=octocat CANARY_RINGS="$RING_SOT" \ - bash "$BOOTSTRAP" combsmith/acme-service + bash "$BOOTSTRAP" petry-projects/acme-service [ "$status" -eq 0 ] # (1/5) ring — auditable record, default stable, record-only. @@ -275,8 +275,8 @@ _ring_sot_copy() { # (6/6) .gitignore secrets baseline — the marker-wrapped L1 block is seeded. [[ "$output" == *".gitignore"* ]] - [[ "$output" == *">>> BEGIN combsmith secrets baseline"* ]] - [[ "$output" == *"<<< END combsmith secrets baseline"* ]] + [[ "$output" == *">>> BEGIN petry-projects secrets baseline"* ]] + [[ "$output" == *"<<< END petry-projects secrets baseline"* ]] # PASS summary + the no-drift invariant: a pure DRY_RUN makes no write API calls. [[ "$output" == *"PASS"* ]] @@ -296,8 +296,8 @@ _ring_sot_copy() { run env DRY_RUN=true CANARY_RINGS="$RING_SOT" bash "$BOOTSTRAP" owner/new-repo [ "$status" -eq 0 ] [[ "$output" == *".gitignore"* ]] - [[ "$output" == *">>> BEGIN combsmith secrets baseline"* ]] - [[ "$output" == *"<<< END combsmith secrets baseline"* ]] + [[ "$output" == *">>> BEGIN petry-projects secrets baseline"* ]] + [[ "$output" == *"<<< END petry-projects secrets baseline"* ]] # STORY3 anchors ride inside the seeded block. [[ "$output" == *"*.pem"* ]] [[ "$output" == *"*.key"* ]] diff --git a/tests/test_seed_repo_template_gitignore.bats b/tests/test_seed_repo_template_gitignore.bats index 50d946328..5a5d70eaa 100644 --- a/tests/test_seed_repo_template_gitignore.bats +++ b/tests/test_seed_repo_template_gitignore.bats @@ -21,8 +21,8 @@ emit() { STANDARDS_DIR="$REPO_ROOT" bash "$SEED" --emit-baseline .gitignore; } @test "template .gitignore leads with the marker-wrapped L1 block" { run emit [ "$status" -eq 0 ] - [ "${lines[0]}" = '# >>> BEGIN combsmith secrets baseline (managed by .github — do not edit) >>>' ] - echo "$output" | grep -qxF '# <<< END combsmith secrets baseline <<<' + [ "${lines[0]}" = '# >>> BEGIN petry-projects secrets baseline (managed by .github — do not edit) >>>' ] + echo "$output" | grep -qxF '# <<< END petry-projects secrets baseline <<<' } @test "template .gitignore passes the STORY3 anchor check (.env, *.pem, *.key present)" { @@ -37,7 +37,7 @@ emit() { STANDARDS_DIR="$REPO_ROOT" bash "$SEED" --emit-baseline .gitignore; } run emit [ "$status" -eq 0 ] local end_ln node_ln - end_ln="$(printf '%s\n' "$output" | grep -nxF '# <<< END combsmith secrets baseline <<<' | head -1 | cut -d: -f1)" + end_ln="$(printf '%s\n' "$output" | grep -nxF '# <<< END petry-projects secrets baseline <<<' | head -1 | cut -d: -f1)" node_ln="$(printf '%s\n' "$output" | grep -nxF 'node_modules/' | head -1 | cut -d: -f1)" [ -n "$end_ln" ] && [ -n "$node_ln" ] [ "$end_ln" -lt "$node_ln" ] @@ -50,7 +50,7 @@ emit() { STANDARDS_DIR="$REPO_ROOT" bash "$SEED" --emit-baseline .gitignore; } # The baseline re-allows .env.example via `!.env.example`; an L2 `.env.*` would # silently re-hide it. Assert no L2 line re-ignores it. local end_ln l2 - end_ln="$(printf '%s\n' "$output" | grep -nxF '# <<< END combsmith secrets baseline <<<' | head -1 | cut -d: -f1)" + end_ln="$(printf '%s\n' "$output" | grep -nxF '# <<< END petry-projects secrets baseline <<<' | head -1 | cut -d: -f1)" l2="$(printf '%s\n' "$output" | tail -n +"$((end_ln + 1))")" ! printf '%s\n' "$l2" | grep -qxF '.env.*' ! printf '%s\n' "$l2" | grep -qxF '.env' From 76bfe4b1c95220146dfeda875051a242c2853c9d Mon Sep 17 00:00:00 2001 From: don-petry Date: Wed, 14 Oct 2026 10:03:25 -0500 Subject: [PATCH 17/17] chore: limit the org-rename rewrite to the files this PR changes Restores every other file to this branch's previous content, so the PR diff stays this PR's own change; its petry-projects references stay rewritten to combsmith. --- .../workflows/dismiss-stale-bot-reviews.yml | 22 ++-- scripts/deploy-standard-workflows.sh | 8 +- standards/ci-standards.md | 104 +++++++++--------- .../workflows/dismiss-stale-bot-reviews.yml | 22 ++-- standards/workflows/persona-mention.yml | 16 +-- .../orchestrator.bats | 14 +-- 6 files changed, 93 insertions(+), 93 deletions(-) diff --git a/.github/workflows/dismiss-stale-bot-reviews.yml b/.github/workflows/dismiss-stale-bot-reviews.yml index 8672b10bd..70eef9a8c 100644 --- a/.github/workflows/dismiss-stale-bot-reviews.yml +++ b/.github/workflows/dismiss-stale-bot-reviews.yml @@ -1,8 +1,8 @@ # ───────────────────────────────────────────────────────────────────────────── -# SOURCE OF TRUTH: petry-projects/.github/standards/workflows/dismiss-stale-bot-reviews.yml -# Standard: petry-projects/.github/standards/ci-standards.md -# Decision core: petry-projects/.github/scripts/lib/dismiss-stale-bot-reviews.sh -# petry-projects/.github/scripts/dismiss-stale-bot-reviews.sh +# SOURCE OF TRUTH: combsmith/.github/standards/workflows/dismiss-stale-bot-reviews.yml +# Standard: combsmith/.github/standards/ci-standards.md +# Decision core: combsmith/.github/scripts/lib/dismiss-stale-bot-reviews.sh +# combsmith/.github/scripts/dismiss-stale-bot-reviews.sh # # AGENTS — READ BEFORE EDITING: # • This file is a SELF-CONTAINED verbatim stub (the initiative-driver class), @@ -12,8 +12,8 @@ # forever (#617 blocker 3). This workflow dismisses such reviews once a NEWER # commit has been pushed. # • All dismiss/keep decision logic lives in the decision core above, which is -# unit-tested by bats in petry-projects/.github. This stub fetches that core -# from petry-projects/.github@v1 at runtime and runs it — the same runtime +# unit-tested by bats in combsmith/.github. This stub fetches that core +# from combsmith/.github@v1 at runtime and runs it — the same runtime # tooling-checkout pattern initiative-driver uses for the rate-limit gate. # • You MUST NOT change: the trigger event types (synchronize + submitted), the # fork guard, or the job-level `permissions:` block (pull-requests: write is @@ -22,7 +22,7 @@ # allow-list, set the DSBR_BOT_ALLOWLIST repo/org variable (comma-separated # logins) — it REPLACES the default list. Do not fork the decision logic here. # • If you need different behaviour, open a PR against the decision core in -# petry-projects/.github — the change propagates everywhere on next run. +# combsmith/.github — the change propagates everywhere on next run. # ───────────────────────────────────────────────────────────────────────────── # # Dismiss stale bot reviews — self-contained org-standard workflow. @@ -59,16 +59,16 @@ jobs: pull-requests: write # dismissPullRequestReview via GITHUB_TOKEN contents: read # checkout steps: - - name: Checkout decision-core tooling from petry-projects/.github - # The decision core lives in petry-projects/.github; a consumer repo does + - name: Checkout decision-core tooling from combsmith/.github + # The decision core lives in combsmith/.github; a consumer repo does # not carry it, so fetch it read-only at the pinned v1 tag into a scratch - # path. petry-projects/.github is public, so GITHUB_TOKEN suffices. + # path. combsmith/.github is public, so GITHUB_TOKEN suffices. # continue-on-error: a tooling-checkout outage must never fail the PR — the # run step then finds no script and no-ops (fail-closed: nothing dismissed). continue-on-error: true uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - repository: petry-projects/.github + repository: combsmith/.github ref: v1 path: .dsbr-tooling fetch-depth: 1 diff --git a/scripts/deploy-standard-workflows.sh b/scripts/deploy-standard-workflows.sh index 3a11634c4..07bad605c 100755 --- a/scripts/deploy-standard-workflows.sh +++ b/scripts/deploy-standard-workflows.sh @@ -2,7 +2,7 @@ # deploy-standard-workflows.sh — Deploy org-standard workflow stubs to all repos. # # Reads canonical stubs from standards/workflows/ and deploys them into every -# repo in the petry-projects org by opening a pull request per repo (via the +# repo in the combsmith org by opening a pull request per repo (via the # shared scripts/lib/standards-deploy.sh primitive). Only workflows that have a # template in standards/workflows/ AND appear in the DEPLOYABLE_WORKFLOWS list # below are eligible — tech-stack-specific workflows (ci.yml, sonarcloud.yml) @@ -14,7 +14,7 @@ # succeed. Opening a PR works uniformly on protected and unprotected repos and # leaves an auditable, CI-gated record. The PRs are labeled `standards-sync` and # left for the normal review/auto-merge pipeline — this script never merges and -# never uses --admin. See petry-projects/.github#478. +# never uses --admin. See combsmith/.github#478. # # Usage: # deploy-standard-workflows.sh [options] @@ -54,7 +54,7 @@ trap 'rm -f "${_TMPFILES[@]+"${_TMPFILES[@]}"}"' EXIT # --------------------------------------------------------------------------- # Configuration # --------------------------------------------------------------------------- -ORG="petry-projects" +ORG="combsmith" REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" STANDARDS_DIR="$REPO_ROOT/standards/workflows" @@ -450,7 +450,7 @@ reusable_base_of() { } # reusable_host_of