Skip to content

feat(source-control): read the trusted list and Dependabot policy from standards for opted-in repos #18696

In review
6 of 6 issues completed

Description

@kyle-sexton

Goal

The source-control plugin's scripts that run on user machines and in the babysit (pr-merge) lane read the trusted-actors list and the Dependabot policy from the standards repository (here melodic-software/standards) through the contents API, at one standards commit per process, for a repository that opts in through its tracked config. A repository that does not opt in reads its own .github/standards/ copies exactly as today. This is the reader move for the source-control plugin before the synced copies are deleted (standards track-main plan, D2 piece P6).

Basis

  • Owner decision, docs/owner-decisions.md row 382 (line 383, "Where plugin skill scripts read the trusted-actors list (standards track-main plan, item 1)"), 2026-11-24T02:50Z, architecture#220. Options were "(a, recommended) read melodic-software/standards through the contents API at a SHA resolved once per process, only for repositories that opt in by config (today claude-code-plugins and pr-pipeline-sandbox); (b) keep reading the repository copy; (c) ship a copy in the plugin." Owner, verbatim: "/session-flow:go-with-recommendations". Decision: (a), with the opt-in.
  • Brief acceptance Q2 of the standards sync track (owner decision D1): CI-only synced files are read from standards main, every reader is repointed, and gating files change expand-then-contract (readers move first, copies are deleted last). This change deletes no copy and removes no hold path.
  • Opt-in key: trusted_actors_source: standards in docs/conventions/source-control.yaml, the key the D2 scope's D2-F1 recommendation names (the decision leaves the name open). repository, or unset, reads the copies; any other value reads neither, so the lane adopts nothing and the ready hold check leaves the label holding. The same key also moves the Dependabot policy read, so a repository that does not opt in keeps reading its own copy of both.
  • Standards repository key: standards_repository: <owner>/<repo> in the same file names the repository the opt-in reads, so the shipped plugin names no consumer repository (docs/plugin-philosophy.md "Hardcoded consumer specifics", enforced by scripts/check-org-repo-tokens.sh). trusted_actors_source: standards with this key absent or not an owner/repo pair reads neither list, as an unknown source does.

Done when

  • babysit_merge_policy.py: trusted_listing (lane adoption, issue-status setters) and _dependabot_policy read components/trusted-actors/trusted-actors.json and components/dependabot-policy/policy.json from the repository standards_repository names when the repository's docs/conventions/source-control.yaml at the same ref sets trusted_actors_source: standards; that repository's main branch tip (read by its full ref, git/ref/heads/main) is resolved once per process and each standards file is read once per process.
  • Without the key, or with repository, both readers read the repository copy at the same ref, as before; an unknown or non-scalar value, or standards without a valid standards_repository, raises, so the lane adopts nothing.
  • babysit_verify_evidence.py _read_trusted_list takes the same choice at the branch tip; a failed read is verify:unreadable.
  • babysit_merge_skip.py adds a digest of the standards trusted list to the skip key when the .base clone's team YAML opts in (unread otherwise), so a change to the standards list never carries a refusal over; a failed read skips nothing.
  • check-ready-holds.sh reads the opt-in from the default branch and, when set, the standards list at the commit standards main names; an unreadable source or standards commit leaves the label holding (exit 3 on an eval-only hold).
  • source-control.schema.json and reference/config-resolution.md document trusted_actors_source and standards_repository; merge.md and ready-for-review.md say where the list is read.
  • This repository's docs/conventions/source-control.yaml sets trusted_actors_source: standards and standards_repository: melodic-software/standards.
  • Tests cover the opt-in, the unset and repository cases, an unknown value and a failed standards read for each reader, and one standards commit and read shared by two repositories in one process.
  • A source-control changelog fragment (minor).

Out of scope: the guardrails, review and work-items readers (P7), diff_risk.py and CARRY_REFUSES (hold paths, P8), and pr-pipeline-sandbox's own opt-in (its repository).

Activity

  1. added
    needs-triage
    on Nov 24, 2026
  2. github-actions commented on Nov 24, 2026

    @github-actions
    Contributor

    Size: Large
    Complexity: High
    Uncertainty: Knowable
    Flags: none
    Blocked by: none
    Blast radius: source-control plugin's babysit merge, verify-evidence and skip scripts, check-ready-holds.sh, the schema and docs, and this repo's source-control.yaml; read by users' machines and the pr-merge lane.
    Reversible: yes; revert the change. Repositories without the opt-in key keep reading their own copies, and no copy is deleted.
    Claims checked:

    1. trusted_listing exists in babysit_merge_policy.py: held, plugins/source-control/skills/babysit-prs/scripts/babysit_merge_policy.py:5032.
    2. _dependabot_policy exists in babysit_merge_policy.py: held, plugins/source-control/skills/babysit-prs/scripts/babysit_merge_policy.py:5771.
    3. _read_trusted_list exists in babysit_verify_evidence.py: held, plugins/source-control/skills/babysit-prs/scripts/babysit_verify_evidence.py:3210.
    4. check-ready-holds.sh exists: held, plugins/source-control/skills/pull-request/scripts/check-ready-holds.sh.
    5. trusted_actors_source is not yet defined in the repo: held, no match outside the issue text.
      Open questions: none
      I read this as a source-control reader change. The issue gives an exact done-when and cites the recorded owner decision (a). It touches five scripts plus docs and tests, so it will likely need splitting. Plugin readers (guardrails, review, work-items) read the trusted-actor list from standards on opt-in #18693 covers the sibling guardrails, review and work-items readers, which this issue lists as out of scope. It is related, not a duplicate. I found no merged pull request that already does this.

    Automated triage. A maintainer reviews it.

  3. removed
    needs-triage
    on Nov 24, 2026
  4. melodic-automation-lanes commented on Nov 24, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane yet: Size large: the split into sub-issues at intake is pending (owner Q93).

  5. melodic-automation-lanes commented on Nov 24, 2026

    @melodic-automation-lanes
    Contributor

    Split at intake (owner Q93). This issue is Size Large, so its done-when is split into 6 sub-issues, each holding its task-list lines as written.

    Automated split by the lanes App. Admission waits on this issue while a sub-issue is open; work-unblock closes it as completed once every sub-issue is closed as completed by a merge or a listed human and its done-when is covered.

  6. kyle-sexton commented on Nov 24, 2026

    @kyle-sexton
    MemberAuthor

    Spec addition from #18697: the readers no longer carry the standards repository's name in shipped code.

    • New key standards_repository: <owner>/<repo> in docs/conventions/source-control.yaml, read beside trusted_actors_source. With trusted_actors_source: standards, every reader (babysit_merge_policy.py, babysit_verify_evidence.py, babysit_merge_skip.py, check-ready-holds.sh) reads the standards components from that repository. If the key is absent, not a scalar, or not an owner/repo pair, the reader fails closed exactly as an unknown source value does: the lane adopts nothing and the ready check leaves the label holding.
    • This repository sets standards_repository: melodic-software/standards.
    • Why: scripts/check-org-repo-tokens.sh failed Lint Repo on the hardcoded name, and docs/plugin-philosophy.md "Hardcoded consumer specifics" puts one organization's repository names in the consumer's config. Its Design boundary section also says a fetch of a publisher-owned file is not conforming as shipped content. Keeping trusted_actors_source: standards leaves this spec's key, and the contract P7 reads, unchanged.
  7. added
    session-owned
    on Nov 24, 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

    session-owned

    Fields

    Work status

    ready

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions