Repository navigation
Description
Context
Standards track-main plan, phase D2, piece P7 (guardrails, review and work-items plugin readers). Three plugin scripts that run on user machines and in lanes read the trusted-actor list from the copy standards syncs into the repository they act on (.github/standards/trusted-actors/trusted-actors.json):
plugins/guardrails/hooks/block-unresolved-pr-merge.sh(_bupm_verify, the pr-verify scope read at the base),plugins/review/scripts/loosened-check-settings.mjs(trustedHumans,git showof the default branch),plugins/work-items/tools/work-item-tracker/adapters/github/get-statuses.sh(trust_context), configured byconfig.github.status_trust.trusted_actors(docs/conventions/work-items.yaml, validated incommon.sh).
Once the copies are deleted (P8), each would read nothing. Basis: the Brief's acceptance Q2 (CI-only and gating synced files are read from standards main, gating files change expand-then-contract: readers move first, copies are deleted last).
Owner decision
Row 382 of architecture docs/owner-decisions.md (line 383), 2026-11-24T02:50Z: "Where plugin skill scripts read the trusted-actors list". 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; (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.
This change widens no trust: without the opt-in every reader behaves as today, and the list it reads with the opt-in is the source the copies are synced from. Every new setting is read from the same protected ref as the copy (base branch, default branch, the work-items binding).
Amendment: the standards repository is consumer config
Shipped plugin content may not name one organization's repository: docs/plugin-philosophy.md "Hardcoded consumer specifics" ("no runtime dependence on ... one organization's repository names"; such a value "belongs in the consumer's own config layers"), and check-org-repo-tokens fails a plugin file that does. So the repository row 382 names (melodic-software/standards) is set by each consumer, not written into the guardrails, review and work-items readers. The owner's decision (a) is unchanged: this repository's config names melodic-software/standards.
Opt-in key
- Guardrails and review:
trusted_actors_source: standardsindocs/conventions/source-control.yamlat the ref the reader already uses (base branch, default branch), withstandards_repository: <owner>/<repo>in the same file naming the repository to read.repositoryor notrusted_actors_sourcereads the copy; any other value, orstandardswithout a validstandards_repository, fails the read.trusted_actors_sourceis the key the source-control piece (P6, merged) reads, so one key opts a repository in for every plugin;standards_repositoryis new here. - Source-control config surface: this PR adds the
standards_repositoryentry toplugins/source-control/schemas/source-control.schema.jsonandreference/config-resolution.md, a source-control changelog fragment, andstandards_repository: melodic-software/standardsto this repository'sdocs/conventions/source-control.yaml. It adds notrusted_actors_sourceto this repository'ssource-control.yaml. - Work-items: its existing opt-in,
config.github.status_trust.trusted_actors, also acceptsstandards:<owner>/<repo>:<path>(d2-scope P7 row: "a non-repo-relative source"; the repository is part of the value because the work-items binding has no source-control.yaml). This repository'sdocs/conventions/work-items.yamlmoves tostandards:melodic-software/standards:components/trusted-actors/trusted-actors.json(same list content).
Standards read, every reader: repos/<standards>/git/ref/heads/main -> .object.sha once per process (the full branch ref, so a tag named main cannot stand in for the branch, as babysit_merge_policy.py base_tip reads a branch), then contents/<path>?ref=<sha>. Guardrails and review read components/trusted-actors/trusted-actors.json; work-items reads the path in its value.
Acceptance criteria
-
block-unresolved-pr-merge.shreadsdocs/conventions/source-control.yamlat the base besidepr-pipeline.yaml(GraphQL and REST routes); withtrusted_actors_source: standardsand a validstandards_repositoryit judges pr-verify'slane-or-ownerscope with that repository's list at one resolved commit; withrepositoryor no key it reads the copy and makes no standards call; any other value,standardswithout a validstandards_repository, or a failed standards read, runs the merge unchecked with a warning. -
loosened-check-settings.mjsreadstrusted_actors_sourceandstandards_repositoryfrom the default branch'ssource-control.yaml;standardswith a validstandards_repositoryreads that repository's list at one resolved commit and names<standards_repository>@<sha>inloosened_check_spec;repositoryor no key reads the copy as before; any other value,standardswithout a validstandards_repository, or a failed standards read, printsno reason. -
get-statuseswithtrusted_actors: standards:<owner>/<repo>:<path>resolves that repository's main once per run, reads the list once at that commit for every item repository, and still reads the model from each item repository; a repo-relative path behaves as before; astandards:value without a valid<owner>/<repo>:part, or whose path has..or a leading/, exits 3; standards main unread exits with the mapped gh code. - Every reader resolves the standards commit through
git/ref/heads/main, nevercommits/main. -
docs/conventions/work-items.yamlsetstrusted_actors: standards:melodic-software/standards:components/trusted-actors/trusted-actors.json;docs/conventions/source-control.yamlsetsstandards_repository: melodic-software/standards. - Tests cover each case above:
block-unresolved-pr-merge-b.test.sh,block-unresolved-pr-merge.test.sh,loosened-check-settings.test.sh,get-statuses.test.shandwork-item-tracker.test.shpass. - The docs that state the list path name the opt-in: guardrails README, review
reference/config.md, work-items GitHub adapter README, planningcontext/problem-framing.mdandreference/config.md, source-controlreference/config-resolution.mdand schema (standards_repository); changelog fragments for guardrails, review, work-items, planning and source-control.
Out of scope
- The source-control babysit readers (P6, merged), workflows (P4/P5), removing the copies or any hold path (P8). P6 reads
trusted_actors_sourcebut still namesmelodic-software/standardsand resolvescommits/maininbabysit_merge_policy.py(STANDARDS_REPO,_standards_file); moving it tostandards_repositoryandgit/ref/heads/mainis follow-up work for P6's owner.
Activity