Skip to content

Standards sweep reports a drifted initiative-driver.yml as compliant — the template gained a uses: step, so the stub is no longer compared verbatim (repo-template still on ref: v1) #1277

Closed

Description

@don-petry

Problem

scripts/deploy-standard-workflows.sh reports a drifted initiative-driver.yml stub as already compliant, so the sweep never re-syncs it.

is_pin_compliant decides how to compare a stub from the template's first uses: line:

  • no uses: line → "verbatim-managed", full-content comparison (the comment names initiative-driver as the example);
  • otherwise → ring-pin check if it is a ring reusable, else grep -qF "$expected_uses" on the existing stub.

The initiative-driver.yml template gained a step uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 (the rate-limit gate tooling checkout). Since then the template has a uses: line, so the stub is no longer compared verbatim. Any stub that contains that one checkout line passes, whatever else differs.

Evidence (2026-10-10, template blob 1c7c765b)

Standards Deploy runs 38043597933 and 38043075189 logged:

[deploy] SKIP  repo-template/.github/workflows/initiative-driver.yml already compliant
[deploy] SKIP  empower-personal-dashboard/.github/workflows/initiative-driver.yml already compliant

Neither file matches the template:

Repo Difference from the template (non-comment lines)
repo-template Gate tooling checkout is ref: v1, not the commit SHA that #1232 introduced. The gate step still ends in || true and lacks the missing-script check, so a gate failure is silent.
bmad-bgreat-suite Same ref: v1 pin.
empower-personal-dashboard Passes github.repository to the dispatch step through an env var (TARGET_REPO) instead of inline ${{ }} expansion in the shell text. This is a hardening the template does not have.

repo-template matters most: new repos are created from it, so they start on the stub #1232 replaced.

Stubs with no checkout step at all (markets, google-app-scripts, ContentTwin, TalkTerm) are correctly seen as drift, because the grep for the checkout line fails.

Fix direction

  1. Decide "verbatim-managed" by something other than "the template has no uses: line". For example: the first uses: that references a *-reusable.yml workflow, or an explicit list of verbatim-managed templates. A template whose only uses: lines are action steps is compared in full.
  2. Before the corrected sweep runs, move the TARGET_REPO env hardening from empower-personal-dashboard into standards/workflows/initiative-driver.yml, or the sweep will revert it there.

The compliance audit shares helpers with the sweep; check that scripts/compliance-audit.sh does not have the same blind spot.

Acceptance criteria

  • A stub that differs from a verbatim-managed template in any non-CRLF way is reported as drift, even when the template contains uses: action steps. Covered by a test using the current initiative-driver.yml template and the ref: v1 variant.
  • A byte-identical stub is still reported compliant, and ring-managed stubs (dev-lead.yml and the others) keep their ring-pin rule.
  • The template carries the TARGET_REPO env form for the dispatch step.
  • The audit and the sweep agree on the same inputs.

Activity

  1. don-petry commented on Oct 10, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead Implementation Plan

    Issue: #1277 — Standards sweep reports a drifted initiative-driver.yml as compliant

    Scope

    Decide "verbatim-managed" by the absence of a *-reusable.yml uses: line (not of any uses: line), share that decision between the deploy sweep and the compliance audit, and move the TARGET_REPO env hardening into the initiative-driver template.

    Implementation Checklist

    • New shared lib scripts/lib/stub-verbatim.sh: stub_reusable_uses <template> (first uses: naming a -reusable.yml), stub_is_verbatim_managed <template>, stub_verbatim_matches <content> <template> (CRLF-normalized full compare)
    • scripts/deploy-standard-workflows.sh: source the lib; is_pin_compliant and reusable_uses_of use stub_reusable_uses, so action-step uses: lines no longer select the pin rule
    • scripts/compliance-audit.sh: source the lib; new check_verbatim_stubs flags a deployed verbatim-managed stub (initiative-driver.yml) that does not match its template (exempt .github / .github-private, which self-manage it)
    • standards/workflows/initiative-driver.yml (+ the self-hosted identical .github/workflows/initiative-driver.yml): dispatch step passes TARGET_REPO via env

    Tests to Write

    • test/scripts/deploy-standard-workflows/verbatim-managed-stub.bats: current template → compliant; ref: v1 variant → drift; CRLF variant → compliant; ring stub (dev-lead) still uses the ring-pin rule
    • Audit/sweep agreement on the same inputs (identical, ref: v1, CRLF)
    • Template test: dispatch step uses TARGET_REPO env, no inline ${{ }} in the run text

    Test Command

    npx bats -r test tests

  2. don-petry commented on Oct 10, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: Implementation Complete — PR #1278

    The implementation for issue #1277 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.

    Review happens on the PR. Acceptance criteria and test results are evidenced by the PR's diff and CI checks — not asserted here. If a later stage fails, this claim is retracted in place.

  3. added a commit that references this issue on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug reportsdev-leadFor dev-lead agent pickup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions