Skip to content

Synced stubs in ring repos carry a header naming v1-stable above a uses: line pinned to their ring — bots flag it and agents edit the stub to match #1297

Open

Description

@don-petry

Problem

The sweep re-pins a synced stub's uses: line (and agent_ref) to the target repo's ring, but leaves the stub's header comment naming the template's channel. In a ring-0 or ring-1 repo the two then disagree inside one file.

standards/workflows/persona-mention.yml line 11 says the uses: ref is pinned to the `persona-mention/v1-stable` channel; standards/workflows/pr-review.yml line 12 says "You MUST NOT change: the @pr-review/v1-stable channel in the uses: line". After the sweep, TalkTerm and bmad-bgreat-suite (ring 1) have uses: …@persona-mention/v1-ring1 and …@pr-review/v1-ring1 under those headers.

Why it matters: review bots flag the mismatch on every ring-repo sync PR (CodeRabbit on petry-projects/bmad-bgreat-suite PR 500: "The header comment and the uses: ref disagree"; "Header comment contradicts the changed code"), and agent passes then "fix" it in the consumer repo. On petry-projects/TalkTerm PR 529 a pass committed fix(workflows): correct channel refs in headers; on petry-projects/bmad-bgreat-suite PR 497 a pass went the other way and re-pinned the uses: line itself to v1-stable to match the comment, moving a ring-1 repo off its ring. Either edit makes the stub drift from the template.

Acceptance criteria

  1. A synced stub never contains a header statement that contradicts its own uses: pin. Prefer making the template headers tier-neutral ("pinned to this repo's ring channel for <agent>, set by the standards sweep") over teaching the sweep to rewrite comment text.
  2. Apply it to every template under standards/workflows/ that names a v<N>-stable channel in a comment.
  3. stub_body_matches_template still treats a correctly swept stub as compliant, with a bats case for a ring-1 repo.
  4. The template-drift consumers in petry-projects/.github-private (template_stub_drift.sh) are checked against the changed templates before standards/v1-stable is next cut, per the standards-channel promotion notes.

Budget guard

Template comment wording and one test. If any template's header wording is load-bearing for a parser, list it and stop.

Activity

  1. don-petry commented on Oct 11, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead Implementation Plan

    Issue: #1297 — Synced stubs in ring repos carry a header naming v1-stable above a uses: line pinned to their ring

    Scope

    Rewrite the AGENTS header of every channel-pinned template under standards/workflows/ so it doesn't name a tier (it points at "this repo's ring channel for <agent>, set by the standards sweep" instead of <agent>/v<N>-stable). The sweep and stub_body_matches_template stay as they are. Add a bats guard.

    Parser check (budget guard): no script in this repo parses the header wording. is_pin_compliant strips comments before reading the uses: ref, and ring_repin_uses only rewrites uses:/agent_ref:/checkout_ref: lines. .github-private's template_stub_drift.sh byte-compares the seed emission (N / N-1 / HEAD = AHEAD) and doesn't parse comments either.

    Implementation Checklist

    • Make the header tier-neutral in: add-to-project.yml, auto-rebase.yml, dependabot-rebase.yml, idea-enhancer.yml, idea-triage.yml, initiative-planner.yml, persona-mention.yml, pr-auto-review.yml, pr-review.yml, pr-review-mention.yml
    • dev-lead.yml: the inline "moving dev-lead stable channel tag" comment has the same contradiction in ring repos, so make it tier-neutral too

    Tests to Write

    • test/scripts/deploy-standard-workflows/stub-header-tier-neutral.bats:
      • every ring-managed template, rendered at a ring1 channel, names no <agent>/stable or <agent>/v<N>-stable channel outside its pin lines
      • ring-1 repo (TalkTerm): a correctly swept persona-mention stub (and pr-review stub) is accepted by stub_body_matches_template and its header doesn't contradict its @…/v1-ring1 pin

    Test Command

    bats -r test/ (plus bash .dev-lead/scripts/dev-lead-lint.sh)

    AC 4 follow-up

    Before standards/v1-stable is next cut, the repo-template rows of template_stub_drift.sh will show the changed stubs as AHEAD/N-1 until the channel is promoted and repo-template is re-seeded. That is a warning only, and it is noted for the promoter.

  2. don-petry commented on Oct 11, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: Implementation Complete — PR #1298

    The implementation for issue #1297 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.

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