Skip to content

feat(source-control): read the ready hold check's trusted list from standards for opted-in repos - #18743

Closed
melodic-automation-lanes[bot] wants to merge 2 commits into
mainfrom
work-resolve-issue/issue-18701-45339175708-1
Closed

melodic-automation-lanes[bot] wants to merge 2 commits into
mainfrom
work-resolve-issue/issue-18701-45339175708-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #18701

Summary

Opened by the work-resolve-issue lane. The run's own summary:

check-ready-holds.sh now reads trusted_actors_source from docs/conventions/source-control.yaml on the default branch (contents API, no ref) before it trusts an eval-only do-not-merge hold. With standards it resolves melodic-software/standards commits/main once and reads components/trusted-actors/trusted-actors.json at that SHA. Unset, a 404 conventions file, or repository reads the repository's own .github/standards copy as before. Any other or non-scalar value, an unreadable conventions file, an unreadable or malformed standards commit, or an unreadable standards list makes eval_only_hold fail, so the label keeps holding and the script exits 3. Choice of means: the opt-in is parsed with the plugin's existing lib/base-file.sh (base_file_read_key --http-response over a gh api -i read), the same reader branch-update-signals.sh and read-review-venue.sh use, and the standards reads go to github.com, where melodic-software/standards lives.

Not verified

  • check-ready-holds.test.sh was not executed: this lane runs no interpreter or test runner; left to the PR's CI.
  • Shell lint (lint-full) and comment-hygiene did not run here (script absent / network fetch blocked); left to the PR's CI.
  • schemas/source-control.schema.json (additionalProperties: false) does not yet declare trusted_actors_source, so a conventions file that sets it fails schema validation until the sibling part of #18696 that documents the key in the schema and config-resolution.md lands. This repository's own…
  • Tidy pass 5 (ai-slop) ran as a manual rubric read only: detect.sh and the fix flow's digest-guard.sh cannot run under this lane's Bash allowlist. Passes 1-4 ran; pass 1 removed an unreachable fallback default, pass 4 clarified one fragment sentence.
  • review-venue.txt was absent, so the review ran locally in one fresh-context subagent instead of the CI code-review lane.

Fix

  • plugins/source-control/skills/pull-request/scripts/check-ready-holds.sh: new trusted_list function choosing the repository copy or the standards list at the commit standards main names from trusted_actors_source on the default branch; eval_only_hold calls it and reports its reason; sources…
  • plugins/source-control/skills/pull-request/scripts/check-ready-holds.test.sh: gh stub routes for the conventions file (HTTP response with -i required, 404 when absent, failure toggle), standards commits/main and standards contents; copies lib/ for the relocated-plugin case; new cases for no file,…
  • .changes/source-control/work-resolve-issue-issue-18701-45339175708-1-4a8b0190.md: minor changelog fragment describing the new opt-in read.

Verification

The runner ran each check from the base copy against 3f033c0:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 29 fragments valid (run before and after tidy and review fixes).
  • check-changed-skills: pull-request skill PASS, 0 errors, 4 pre-existing size/TOC warnings unrelated to this change.
  • check-affected: 17 passed, 10 skipped (typos not installed, comment-hygiene fetch blocked, size-check script absent, lint-full and reference-verify absent, checked-tree code not run), 0 failed.
  • cant-fail-scan --file check-ready-holds.test.sh --check: PASS, no gating findings, 1 test file fully read.
  • Fresh-context review subagent over the diff: no path lets the flip go on when it should hold; found that the opted-in block left the repository list empty (so later hold cases and the final unreadable-list case could not fail) and that the stub did not require -i. Both fixed: the repository list is…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/45339175708

Left out: the items under Not verified.

Related

#18701

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 3f033c0938a448a00597957e1b5fc5eeb568d442: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #18743, check-ready-holds trusted list from standards

I found no security issues in this change. I read all three changed files: the changelog fragment, check-ready-holds.sh and check-ready-holds.test.sh. I also read plugins/source-control/lib/base-file.sh, which the script now sources.

What changes. The eval-only do-not-merge hold decides whether a hold line comes from a trusted account. It now picks its trusted-actors list from trusted_actors_source in docs/conventions/source-control.yaml. This touches a trust control, so I checked whether it lets in anyone the base version stopped.

  • Who can set the opt-in. The conventions file is read through the contents API with no ref (check-ready-holds.sh#L99-L100), so it always comes from the default branch. A pull request's head cannot point the check at a different list. The same holds for the repository list read at L109, which also names no ref, as before.

  • The standards source. The commit is resolved from melodic-software/standards main, must match ^[0-9a-f]{40}$, and the list is then read at that SHA (L115-L125). Both the repository and the path are fixed constants (L39-L41), and that repository belongs to the owner. No pull request author's input reaches the host, the repository or the path.

  • Fails closed. These cases make trusted_list return 1, so eval_only_hold fails and the label keeps holding:

    • an unknown or non-scalar value ((not a single value) falls to * at L127);
    • a conventions read that fails or will not parse (BASE_FILE_STATE == failed, L101);
    • an unreadable or malformed standards SHA;
    • an unreadable standards list.

    Only a 404 falls back to the repository copy (base-file.sh L65 sets absent), which is exactly what the base version did. Any other HTTP status is failed (L66).

  • The verdict logic. The jq verdict, including the schema check and the requirement that a human be matched by numeric id, is unchanged and still applies to whichever list is read.

  • Text in output. Reasons echoed from the conventions value or the parser have control characters stripped before printing.

The change widens nothing the base version stopped. Who counts as trusted is still decided only on the default branch or in the owner's standards repository, and what the hold gates (only the draft-to-ready flip) is unchanged. The changelog fragment and the test changes have no security surface.

I found no embedded instructions in the PR context.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 3f033c0938a448a00597957e1b5fc5eeb568d442: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

I read all three changed files in full: the changelog fragment, check-ready-holds.sh and check-ready-holds.test.sh. I also read the unchanged code they call: lib/base-file.sh and lib/convention-key.sh.

What the change does. A new trusted_list function in check-ready-holds.sh reads trusted_actors_source from docs/conventions/source-control.yaml on the default branch. It uses the contents API with no ref and the plugin's existing base_file_read_key --http-response reader. It then picks a trusted-actors list:

  • repository, an unset key or a missing file (404): the repository's own .github/standards copy, as before.
  • standards: melodic-software/standards' list, read at the 40-hex SHA that commits/main resolves to.

Any of these keeps the label holding, so an eval-only hold exits 3:

  • another value, or a value that is not a single scalar;
  • a conventions read that fails;
  • a SHA that is missing or malformed;
  • a standards list that cannot be read.

eval_only_hold passes the function's reason through to the refusal line. ../../../lib from the script's directory resolves to plugins/source-control/lib. The relocated-plugin test now copies lib/ so that case still loads it.

Closing issue #18701. "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)": met. Tests that would fail if it broke:

  • the opt-in read carries no ?ref (check-ready-holds.test.sh:181);
  • the standards list is read at ?ref=$SHA (:203);
  • with the opt-in set, the repository copy is emptied, which proves the standards list was used (:198-201);
  • exit 3 for each failure case: commit missing (:214), commit malformed (:219), list missing (:224), unknown value (:229), non-scalar value (:235), conventions read failing (:239).

Not verified by me. I could not run the test suite or shellcheck. The PR body says the tests were not run and leaves them to CI; that is the author's claim, unverified.

Note, not a finding. The PR body says schemas/source-control.schema.json (additionalProperties: false) does not yet declare trusted_actors_source. Until the sibling part of #18696 lands, a conventions file that sets the key fails schema validation. That work is outside this issue's done-when.

Security scope. This repository runs a separate security lane, so trust-boundary questions are left to it. One example is whether a list taken from github.com should gate a hold on a GHES repository.

Loosened checks. The trusted list for eval-only holds can now come from the standards repository. The closing issue (the spec) names that source and asks for it, so it passes. No test was skipped or deleted, and no assertion was weakened. Every earlier hold case still runs, including the final "unreadable trusted-actors list" case, which now goes through the repository path.

Loosened checks would be marked: fail (default: the prompt had no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0. The prompt had no loosened_check_decision_record: line either, so the citation requirement was not checked.

Verifier dropped 0 of 0 candidates.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head a292155996451a28632f6d6325096472a98e5be6. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

a pr-unblock lane stopped its head (pr-unblock/fix-ci is failure), which clears when the lane runs
  again

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped fix-ci on this pull request: the lane could fix a failing check only by weakening a required check, and the head has no fresh fixer round left (it ran one, or an earlier lane stop already spent its same-head retry), so a session builder takes it. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/fix-ci status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=18743 -f activity=fix-ci

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 24, 2026
@kyle-sexton

Copy link
Copy Markdown
Member

Superseded by #18697 (D2 P6, session-owned), which ships this change in the reviewed design: the repository comes from a standards_repository key (docs/plugin-philosophy.md 'Hardcoded consumer specifics'; a hardcoded name fails scripts/check-org-repo-tokens.sh) and the commit is read through git/ref/heads/main. Closing to avoid two implementations of the same reader; reopen if #18697 is abandoned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(source-control): read the trusted list and Dependabot policy from standards for opted-in repos - part 4 of 6

1 participant