You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of Epic #850. Blocked by #849 (so it deploys correct major-scoped channel pins, not bare tags).
Problem
scripts/deploy-standard-workflows.sh is the fleet's shim deployer but runs only manually — standards-deploy-tests.yml merely tests it, and the compliance audit only files remediation issues, never deploys. So bringing the fleet to standard requires a human running the script (and today, admin-merging the PRs). There is no automation that places/re-pins shims.
Scope
Add a scheduled + workflow_dispatch workflow (e.g. standards-deploy.yml) on petry-projects/.github that runs deploy-standard-workflows.sh across the fleet on the org cadence, opening standards-sync PRs wherever a repo drifts (missing required shim OR pinned off its agent's current v<M>-stable channel).
Reuse the existing script and standards-sync label — no new deploy logic; this is a driver, not a reimplementation.
Idempotent: SKIP … already compliant repos open nothing (proven behavior).
Respect SKIP_REPOS / SKIP_OVERRIDES.
Sensible cadence (e.g. weekly, offset from the compliance audit) + a dispatch for on-demand.
Uses the org PAT already wired for cross-repo PR creation; least-privilege.
Acceptance
Scheduled run opens standards-sync PRs only for genuinely-drifted repos; compliant repos untouched.
Dispatch works for on-demand fleet or single-repo (--repo) sweeps.
Add a scheduled + workflow_dispatch driver that runs the existing deploy-standard-workflows.sh across the fleet on the org cadence — opening standards-sync PRs only for drifted repos — plus a thin env→flags driver script so the dispatch inputs are unit-testable. No new deploy logic; drift detection, SKIP_REPOS, ring pinning, and PR creation all stay in the existing script/libs.
Implementation Checklist
scripts/standards-deploy-driver.sh — thin driver mapping env inputs (TARGET_REPO, TARGET_WORKFLOW, DRY_RUN) to deploy-standard-workflows.sh flags and exec-ing it
.github/workflows/standards-deploy.yml — weekly cron (Mon 08:00 UTC, offset from the Fri 12:00 UTC compliance audit) + workflow_dispatch (target_repo / target_workflow / dry_run); ORG_SCORECARD_TOKEN; least-privilege (permissions: {} top-level, contents: read on the job)
.github/workflows/standards-deploy-tests.yml — add the driver script to shellcheck, add the new test dir to the bats run, add both new files to path triggers
scripts/standards-deploy-driver.sh — thin env→flag driver over deploy-standard-workflows.sh (no new deploy logic)
.github/workflows/standards-deploy.yml — weekly cron (Mon 08:00 UTC, offset from the Fri 12:00 UTC compliance audit) + workflow_dispatch (target_repo / target_workflow / dry_run)
.github/workflows/standards-deploy-tests.yml — driver added to shellcheck + bats run + path triggers
test/scripts/standards-deploy-driver/driver.bats — argv mapping, drift, no-op, and fleet-iteration coverage
Test Results
$ bats test/scripts/lib/standards-deploy.bats test/scripts/lib/ring-pins.bats \
test/scripts/deploy-standard-workflows/ test/scripts/standards-deploy-driver/
... (55 tests) ...
ok 50 maps target_repo, target_workflow, and dry_run to script flags
ok 51 no inputs sweeps the whole fleet (no --repo / --workflow flags)
ok 52 dry_run defaults off — no --dry-run flag when unset
ok 53 drift path: a missing stub is planned as a PR
ok 54 no-op path: a compliant stub opens nothing
ok 55 fleet sweep iterates every repo from gh repo list
$ shellcheck --severity=warning -x scripts/standards-deploy-driver.sh # OK
$ bash .dev-lead/scripts/dev-lead-lint.sh # all checks passed
$ yamllint (repo CI config) standards-deploy.yml standards-deploy-tests.yml # PASS
$ actionlint standards-deploy.yml standards-deploy-tests.yml # PASS
Files Changed
scripts/standards-deploy-driver.sh (new): maps dispatch inputs (TARGET_REPO, TARGET_WORKFLOW, DRY_RUN) onto the deploy script's --repo / --workflow / --dry-run flags and exec's it. Empty inputs = whole-fleet, all-workflows sweep (the scheduled default). DEPLOY_SCRIPT is overridable for tests.
.github/workflows/standards-deploy-tests.yml: added the driver script to shellcheck, the new bats dir to the run, and both new files to the PR/push path triggers.
Reuses the existing script + standards-sync label — the driver adds zero deploy logic. Drift detection, SKIP_REPOS / SKIP_OVERRIDES, ring/channel pinning, idempotency, and PR creation all remain in deploy-standard-workflows.sh and its libs.
Token:ORG_SCORECARD_TOKEN is the PAT already wired for cross-repo standards-sync PR creation — compliance-remediate.sh opens its standards-sync PRs via the same sd_deploy_via_pr() primitive under this token. No new secret introduced.
Cadence: weekly on Monday, offset from the Friday compliance audit, so the audit's findings age a few days before the deploy sweep acts on them. Dispatch supports on-demand fleet sweeps, single-repo (target_repo), single-workflow, and dry_run.
Activity
don-petry commentedon Jul 21, 2026
Dev-Lead Implementation Plan
Issue: #851 — [#850 A] Automated standards-deploy driver (scheduled fleet sweep → standards-sync PRs)
Scope
Add a scheduled +
workflow_dispatchdriver that runs the existingdeploy-standard-workflows.shacross the fleet on the org cadence — openingstandards-syncPRs only for drifted repos — plus a thin env→flags driver script so the dispatch inputs are unit-testable. No new deploy logic; drift detection,SKIP_REPOS, ring pinning, and PR creation all stay in the existing script/libs.Implementation Checklist
scripts/standards-deploy-driver.sh— thin driver mapping env inputs (TARGET_REPO,TARGET_WORKFLOW,DRY_RUN) todeploy-standard-workflows.shflags and exec-ing it.github/workflows/standards-deploy.yml— weekly cron (Mon 08:00 UTC, offset from the Fri 12:00 UTC compliance audit) +workflow_dispatch(target_repo / target_workflow / dry_run);ORG_SCORECARD_TOKEN; least-privilege (permissions: {}top-level,contents: readon the job).github/workflows/standards-deploy-tests.yml— add the driver script to shellcheck, add the new test dir to the bats run, add both new files to path triggersTests to Write
test/scripts/standards-deploy-driver/driver.bats— argv mapping (repo/workflow/dry-run → flags, default = whole fleet), drift path (missing stub → plans PR), no-op path (compliant stub → nothing), fleet iteration overgh repo listTest Command
bats test/scripts/standards-deploy-driver/ test/scripts/deploy-standard-workflows/andbash .dev-lead/scripts/dev-lead-lint.shdon-petry commentedon Jul 21, 2026
Dev-Lead: Implementation Complete
Plan Execution
scripts/standards-deploy-driver.sh— thin env→flag driver overdeploy-standard-workflows.sh(no new deploy logic).github/workflows/standards-deploy.yml— weekly cron (Mon 08:00 UTC, offset from the Fri 12:00 UTC compliance audit) +workflow_dispatch(target_repo / target_workflow / dry_run).github/workflows/standards-deploy-tests.yml— driver added to shellcheck + bats run + path triggerstest/scripts/standards-deploy-driver/driver.bats— argv mapping, drift, no-op, and fleet-iteration coverageTest Results
Files Changed
scripts/standards-deploy-driver.sh(new): maps dispatch inputs (TARGET_REPO,TARGET_WORKFLOW,DRY_RUN) onto the deploy script's--repo/--workflow/--dry-runflags and exec's it. Empty inputs = whole-fleet, all-workflows sweep (the scheduled default).DEPLOY_SCRIPTis overridable for tests..github/workflows/standards-deploy.yml(new): scheduled +workflow_dispatchdriver. Least-privilege — top-levelpermissions: {}, job-levelcontents: read(checkout only); all cross-repo branch/PR writes useORG_SCORECARD_TOKEN..github/workflows/standards-deploy-tests.yml: added the driver script to shellcheck, the new bats dir to the run, and both new files to the PR/push path triggers.test/scripts/standards-deploy-driver/driver.bats(new): 6 tests — argv mapping (repo/workflow/dry-run + default fleet), drift path (missing stub → plans PR), no-op path (compliant stub → opens nothing), and fleet iteration overgh repo list.Notes
standards-synclabel — the driver adds zero deploy logic. Drift detection,SKIP_REPOS/SKIP_OVERRIDES, ring/channel pinning, idempotency, and PR creation all remain indeploy-standard-workflows.shand its libs.ORG_SCORECARD_TOKENis the PAT already wired for cross-repostandards-syncPR creation —compliance-remediate.shopens itsstandards-syncPRs via the samesd_deploy_via_pr()primitive under this token. No new secret introduced.target_repo), single-workflow, anddry_run.deploy-standard-workflows.sh(emit_ref_for/ ring-pins) — this driver inherits it; no pinning logic added here.don-petry commentedon Jul 21, 2026
DAG (Epic #850): Depends on → #849 (correct template pins) + #852 (to auto-merge). Blocks → #857 (E, convergence). Phase 2, parallel with #856.
fix: address Copilot review on standards-deploy driver (#851)
fix: correct no-op path assertion in driver.bats (#851)
feat: implement issue #851 — [#850 A] Automated standards-deploy driv…