Skip to content

Add config-driven test-bed utilities (utilities/)#7

Merged
petemoore merged 1 commit into
mainfrom
chore/testbed-utilities
Jun 15, 2026
Merged

Add config-driven test-bed utilities (utilities/)#7
petemoore merged 1 commit into
mainfrom
chore/testbed-utilities

Conversation

@petemoore

@petemoore petemoore commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Migrates the fork test-bed tooling into the repo so any contributor can iterate on dependabot-sweeper against their own fork of a target monorepo, without touching the shared upstream repo or its CI. (Previously these scripts lived outside the repo and hardcoded one user's fork.)

What's here (utilities/)

  • mirror-upstream-dependabot.sh — reset a fork to mirror UPSTREAM's current open dependabot PRs, so a run against the fork is a faithful dry run. Safe-by-default (prints a plan); --execute to apply; --only-missing for an incremental sync. Applies optional utilities/patches/*.patch on top of upstream main.
  • kill-run.sh — stop a run and tear down its fork footprint: close auto/fix/* PRs, delete their branches, cancel their Taskcluster task groups. Touches only the auto/fix/* namespace and only cancels groups whose decision-task metadata.source names the target repo (the CI pools are shared).
  • patches/0001-… — a fork-compat tweak to the upstream changelog check.
  • README.md — usage + the mandatory fork-safety rules.
  • sweeper.env.example — the per-user config template.

Multi-user by design — no personal values committed

There are no hardcoded forks, accounts, GCP projects, or IPs in the committed scripts (verified). Each user:

cp utilities/sweeper.env.example utilities/sweeper.env   # git-ignored
# set FORK=you/taskcluster (and PROJECT_ID / DASHBOARD_URL if you deploy)

The scripts source utilities/sweeper.env (or read env vars / flags). FORK is required — there is no default — so a run can never silently target the wrong repo (verified: the guard exits non-zero with a clear message). UPSTREAM defaults to taskcluster/taskcluster; deploy knobs (PROJECT_ID, ZONE, VM_NAME, …) reuse the existing deploy/ env/gcloud-config pattern, so separate contributors deploy to separate GCP projects.

Verification

bash -n on all scripts; the FORK-required guard fires (exit 2) when unset; --help works offline; git confirms sweeper.env is ignored and never staged. Not run end-to-end here (they mutate a live fork / need TC creds), but the logic is unchanged from the working originals plus the config-sourcing.

Shell-only tooling — the Go CI (build/test) doesn't cover it.

🤖 Generated with Claude Code

@petemoore petemoore force-pushed the chore/testbed-utilities branch from 9b51a5c to aa464fa Compare June 15, 2026 20:16
Adds the fork test-bed tooling so any contributor can iterate on
dependabot-sweeper against their own fork of a target monorepo, without touching
the shared upstream repo or its CI.

- utilities/mirror-upstream-dependabot.sh — reset a fork to mirror upstream's
  open dependabot PRs (safe-by-default; --execute to apply; --only-missing for
  an incremental sync), applying optional utilities/patches/*.patch on top.
- utilities/kill-run.sh — stop a run and tear down its fork footprint (close
  auto/fix/* PRs, delete branches, cancel their Taskcluster task groups), only
  ever touching the auto/fix/* namespace and only cancelling groups whose
  source is the target repo.
- utilities/README.md — usage + the mandatory fork-safety rules.

Fully config-driven and multi-user-ready: there are NO personal values in the
committed scripts. Each user copies utilities/sweeper.env.example to
utilities/sweeper.env (git-ignored) and sets FORK / UPSTREAM / PROJECT_ID /
DASHBOARD_URL for their own fork and (optional) GCP project; the scripts source
it (or read env vars / flags). FORK is required — there is no default — so a run
can never silently target the wrong repo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@petemoore petemoore force-pushed the chore/testbed-utilities branch from aa464fa to 59e44ee Compare June 15, 2026 20:17
@petemoore petemoore marked this pull request as ready for review June 15, 2026 20:17
@petemoore petemoore merged commit d830afc into main Jun 15, 2026
1 check passed
@petemoore petemoore deleted the chore/testbed-utilities branch June 15, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant