From 66e6630c162d191dffd1c9a80f84505cbdc96fa4 Mon Sep 17 00:00:00 2001 From: Simon Scatton Date: Fri, 20 Nov 2026 10:31:34 +0100 Subject: [PATCH] ci: remove the vouch system Delete the vouch-check and vouch-command workflows, the VOUCHED.td list, the vouch request discussion template and its issue-template contact link, and the references in CONTRIBUTING.md, CI.md, CODEOWNERS, zizmor.yml and the contributor and gator skills. PR Issue Acceptance remains the gate for authors without write access. Refs #4554 Signed-off-by: Simon Scatton --- .agents/skills/create-github-pr/SKILL.md | 6 +- .agents/skills/sync-agent-infra/SKILL.md | 2 +- .github/CODEOWNERS | 3 - .github/DISCUSSION_TEMPLATE/vouch-request.yml | 45 ---- .github/ISSUE_TEMPLATE/config.yml | 6 - .github/VOUCHED.td | 10 - .github/workflows/vouch-check.yml | 112 ---------- .github/workflows/vouch-command.yml | 201 ------------------ .github/zizmor.yml | 1 - CI.md | 1 - CONTRIBUTING.md | 13 +- .../agents/gator/skills/gator-gate/SKILL.md | 8 +- 12 files changed, 8 insertions(+), 400 deletions(-) delete mode 100644 .github/DISCUSSION_TEMPLATE/vouch-request.yml delete mode 100644 .github/VOUCHED.td delete mode 100644 .github/workflows/vouch-check.yml delete mode 100644 .github/workflows/vouch-command.yml diff --git a/.agents/skills/create-github-pr/SKILL.md b/.agents/skills/create-github-pr/SKILL.md index 3dc67b1b9c..bae6456c1e 100644 --- a/.agents/skills/create-github-pr/SKILL.md +++ b/.agents/skills/create-github-pr/SKILL.md @@ -32,11 +32,11 @@ Authors with verified `WRITE`, `MAINTAIN`, or `ADMIN` access may proceed without to the PR description. Everyone else must link at least one target-repository issue and have `state:accepted` on each. Otherwise, preserve local work and report which issue needs acceptance. A direct -request, roadmap placement, other labels, or vouch status does not bypass this gate. +request, roadmap placement, or other labels do not bypass this gate. When acting for another author, verify their permissions. Resolve failed lookups before proceeding; retry sandbox network failures outside the sandbox before -reporting an authentication problem. Vouch requirements still apply separately. +reporting an authentication problem. ### Check Config Documentation @@ -145,7 +145,7 @@ Closes #123 - Return 400 instead of 500" ``` -If the work needs multiple PRs, create a separate closable issue for each PR. A higher-level tracking issue may link the component issues, but no PR should close that tracking issue until all its work is complete. Follow `SECURITY.md` for vulnerability disclosure. First-time external contributors must be vouched before their PRs are accepted; the vouch check may close unvouched PRs. Check the current vouch process before opening a PR for an external contributor. +If the work needs multiple PRs, create a separate closable issue for each PR. A higher-level tracking issue may link the component issues, but no PR should close that tracking issue until all its work is complete. Follow `SECURITY.md` for vulnerability disclosure. ### Create as Draft diff --git a/.agents/skills/sync-agent-infra/SKILL.md b/.agents/skills/sync-agent-infra/SKILL.md index 31fcfe317d..c71b4329a7 100644 --- a/.agents/skills/sync-agent-infra/SKILL.md +++ b/.agents/skills/sync-agent-infra/SKILL.md @@ -18,7 +18,7 @@ Run after adding, removing, or renaming a skill or crate; changing issue or PR c | Change | Skills to inspect | |---|---| | Issues, triage, labels, or feature proposals | `create-github-issue`, `triage-issue`, `label-issue`, `review-triage-queue`, `apply-triage-action`, `create-spike`, `build-from-issue` | -| PR template, vouch behavior, or review conventions | `create-github-pr`, `review-github-pr`, `build-from-issue` | +| PR template or review conventions | `create-github-pr`, `review-github-pr`, `build-from-issue` | | Security reports, advisories, assessment, or remediation | `create-security-advisory`, `review-security-issue`, `fix-security-issue` | | Published docs workflow | `update-docs-from-commits` | | CLI commands, flags, defaults, or workflows | `openshell-cli` | diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 78f5034728..91c61c6b0f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,9 +1,6 @@ # No wildcard rule. The maintainer-approval workflow checks maintainer reviews. # Explicit ownership below protects the review and CI machinery. -## Vouch list — maintainers only (bot commits bypass, but manual edits need review) -.github/VOUCHED.td @NVIDIA/openshell-codeowners - ## Merge enforcement — these paths decide who can merge, so they notify the full # list of maintainers to raise scrutiny on changes here. # diff --git a/.github/DISCUSSION_TEMPLATE/vouch-request.yml b/.github/DISCUSSION_TEMPLATE/vouch-request.yml deleted file mode 100644 index b5ee84de53..0000000000 --- a/.github/DISCUSSION_TEMPLATE/vouch-request.yml +++ /dev/null @@ -1,45 +0,0 @@ -title: "Vouch request: [your GitHub username]" -labels: [] -body: - - type: markdown - attributes: - value: | - ## Vouch Request - - OpenShell uses a vouch system for first-time contributors. Fill out this - form to request approval. A maintainer will review and comment `/vouch` - if approved. Approved requests are closed automatically. - - **Write in your own words.** Do not have an AI generate this request. - Requests that read like LLM output will be denied. - - - type: textarea - id: what - attributes: - label: What do you want to work on? - description: > - Describe the change you want to make. Link to an existing issue if - there is one. - placeholder: "I want to fix #123 which causes sandbox timeouts when..." - validations: - required: true - - - type: textarea - id: why - attributes: - label: Why this change? - description: > - Explain your motivation and why this matters. Keep it concise. - placeholder: "This bug affects anyone running sandboxes on ARM64 because..." - validations: - required: true - - - type: checkboxes - id: checklist - attributes: - label: Checklist - options: - - label: I wrote this request myself (not AI-generated) - required: true - - label: I have read [CONTRIBUTING.md](https://github.com/NVIDIA/OpenShell/blob/main/CONTRIBUTING.md) - required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 56167f85c9..ee71f072f0 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,11 +1,5 @@ blank_issues_enabled: false contact_links: - - name: First-time contributor? Get vouched first - url: https://github.com/NVIDIA/OpenShell/discussions/new?category=vouch-request - about: > - First-time contributors must be vouched before submitting PRs. Open a - Vouch Request discussion describing what you want to work on. A - maintainer will approve you with /vouch. - name: Have a question? url: https://github.com/NVIDIA/OpenShell/blob/main/CONTRIBUTING.md#skills-for-using-openshell about: > diff --git a/.github/VOUCHED.td b/.github/VOUCHED.td deleted file mode 100644 index f569e39f4e..0000000000 --- a/.github/VOUCHED.td +++ /dev/null @@ -1,10 +0,0 @@ -# Vouched Contributors -# -# Users listed here have been approved to submit pull requests. -# Org members and collaborators with write access bypass this check automatically. -# -# Maintainers vouch new contributors by commenting "/vouch" on their -# Vouch Request discussion. The vouch-command workflow updates this file. -# -# Format: one GitHub username per line, no @ prefix. Sorted alphabetically. -# Prefix with - to denounce. See https://github.com/mitchellh/vouch for details. diff --git a/.github/workflows/vouch-check.yml b/.github/workflows/vouch-check.yml deleted file mode 100644 index 2eeeb949f9..0000000000 --- a/.github/workflows/vouch-check.yml +++ /dev/null @@ -1,112 +0,0 @@ -name: Vouch Check - -on: - pull_request_target: - types: [opened, reopened] - -permissions: - contents: read - pull-requests: write - -jobs: - vouch-gate: - if: github.repository_owner == 'NVIDIA' - runs-on: ubuntu-latest - env: - ORG_READ_TOKEN: ${{ secrets.ORG_READ_TOKEN }} - steps: - - name: Check org membership - id: org-check - if: env.ORG_READ_TOKEN != '' - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 - with: - github-token: ${{ secrets.ORG_READ_TOKEN }} - result-encoding: string - script: | - const author = context.payload.pull_request.user.login; - try { - const { status } = await github.rest.orgs.checkMembershipForUser({ - org: context.repo.owner, - username: author, - }); - if (status === 204 || status === 302) { - console.log(`${author} is an org member. Skipping vouch check.`); - return 'skip'; - } - } catch (e) { - if (e.status !== 404) { - console.log(`Org membership check error (status=${e.status}): ${e.message}`); - } - } - return ''; - - - name: Check if contributor is vouched - if: steps.org-check.outputs.result != 'skip' - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 - with: - script: | - const author = context.payload.pull_request.user.login; - const authorType = context.payload.pull_request.user.type; - - // Skip bots (dependabot, renovate, github-actions, etc.). - if (authorType === 'Bot') { - console.log(`${author} is a bot. Skipping vouch check.`); - return; - } - - // Check the VOUCHED.td file on the dedicated "vouched" branch. - // NOT the PR branch — the PR author could add themselves in their fork. - let vouched = false; - try { - const { data } = await github.rest.repos.getContent({ - owner: context.repo.owner, - repo: context.repo.repo, - path: '.github/VOUCHED.td', - ref: 'vouched', - }); - const content = Buffer.from(data.content, 'base64').toString('utf-8'); - const usernames = content - .split('\n') - .map(line => line.trim()) - .filter(line => line && !line.startsWith('#') && !line.startsWith('-')); - vouched = usernames.some( - name => name.toLowerCase() === author.toLowerCase() - ); - } catch (e) { - console.log(`Could not read VOUCHED.td: ${e.message}`); - } - - if (vouched) { - console.log(`${author} is in VOUCHED.td. Approved.`); - return; - } - - // Not vouched — close the PR with an explanation. - console.log(`${author} is not vouched. Closing PR.`); - - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.pull_request.number, - body: [ - `Thank you for your interest in contributing to OpenShell, @${author}.`, - '', - 'This project uses a **vouch system** for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer.', - '', - '**To get vouched:**', - '1. Open a [Vouch Request](https://github.com/NVIDIA/OpenShell/discussions/new?category=vouch-request) discussion.', - '2. Describe what you want to change and why.', - '3. Write in your own words — do not have an AI generate the request.', - '4. A maintainer will comment `/vouch` if approved.', - '5. Once vouched, open a new PR (preferred) or reopen this one after a few minutes.', - '', - 'See [CONTRIBUTING.md](https://github.com/NVIDIA/OpenShell/blob/main/CONTRIBUTING.md#first-time-contributors) for details.', - ].join('\n'), - }); - - await github.rest.pulls.update({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - state: 'closed', - }); diff --git a/.github/workflows/vouch-command.yml b/.github/workflows/vouch-command.yml deleted file mode 100644 index 2c258e8e13..0000000000 --- a/.github/workflows/vouch-command.yml +++ /dev/null @@ -1,201 +0,0 @@ -name: Vouch Command - -on: - discussion_comment: - types: [created] - -concurrency: - group: vouch-manage - cancel-in-progress: false - -permissions: - contents: write - discussions: write - -jobs: - process-vouch: - if: >- - github.repository_owner == 'NVIDIA' && - github.event.comment.body == '/vouch' - runs-on: ubuntu-latest - steps: - - name: Process /vouch command - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 - with: - script: | - const commenter = context.payload.comment.user.login; - const discussionAuthor = context.payload.discussion.user.login; - const discussionNumber = context.payload.discussion.number; - - // --- Helpers --- - - async function getDiscussionId() { - const query = `query($owner: String!, $repo: String!, $number: Int!) { - repository(owner: $owner, name: $repo) { - discussion(number: $number) { id } - } - }`; - const { repository } = await github.graphql(query, { - owner: context.repo.owner, - repo: context.repo.repo, - number: discussionNumber, - }); - return repository.discussion.id; - } - - async function postDiscussionComment(body) { - const discussionId = await getDiscussionId(); - const mutation = `mutation($discussionId: ID!, $body: String!) { - addDiscussionComment(input: {discussionId: $discussionId, body: $body}) { - comment { id } - } - }`; - await github.graphql(mutation, { discussionId, body }); - } - - async function closeDiscussion() { - const discussionId = await getDiscussionId(); - const mutation = `mutation($discussionId: ID!) { - closeDiscussion(input: {discussionId: $discussionId}) { - discussion { id } - } - }`; - await github.graphql(mutation, { discussionId }); - } - - // --- Authorization --- - - let isMaintainer = false; - try { - const { data } = await github.rest.repos.getCollaboratorPermissionLevel({ - owner: context.repo.owner, - repo: context.repo.repo, - username: commenter, - }); - isMaintainer = ['admin', 'maintain', 'write'].includes(data.permission); - } catch (e) { - console.log(`Permission check failed: ${e.message}`); - } - - if (!isMaintainer) { - console.log(`${commenter} does not have maintainer permissions. Ignoring.`); - return; - } - - // --- Read VOUCHED.td --- - - const filePath = '.github/VOUCHED.td'; - const branch = 'vouched'; - - // Ensure the "vouched" branch exists. If not, create it from main. - try { - await github.rest.repos.getBranch({ - owner: context.repo.owner, - repo: context.repo.repo, - branch, - }); - } catch (e) { - if (e.status === 404) { - console.log('Creating "vouched" branch from main.'); - const { data: mainRef } = await github.rest.git.getRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: `heads/${context.payload.repository.default_branch}`, - }); - await github.rest.git.createRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: 'refs/heads/vouched', - sha: mainRef.object.sha, - }); - } else { - throw e; - } - } - - let currentContent = ''; - let sha = ''; - try { - const { data } = await github.rest.repos.getContent({ - owner: context.repo.owner, - repo: context.repo.repo, - path: filePath, - ref: branch, - }); - currentContent = Buffer.from(data.content, 'base64').toString('utf-8'); - sha = data.sha; - } catch (e) { - console.log(`Could not read VOUCHED.td on "${branch}" branch: ${e.message}`); - return; - } - - // --- Parse .td format --- - - function isVouched(content, username) { - return content - .split('\n') - .map(line => line.trim()) - .filter(line => line && !line.startsWith('#') && !line.startsWith('-')) - .some(name => name.toLowerCase() === username.toLowerCase()); - } - - if (isVouched(currentContent, discussionAuthor)) { - console.log(`${discussionAuthor} is already vouched.`); - await postDiscussionComment( - `@${discussionAuthor} is already vouched. They can submit pull requests.` - ); - await closeDiscussion(); - return; - } - - // --- Append username and commit --- - - async function commitVouch(content, fileSha) { - const updatedContent = content.trimEnd() + '\n' + discussionAuthor + '\n'; - await github.rest.repos.createOrUpdateFileContents({ - owner: context.repo.owner, - repo: context.repo.repo, - path: filePath, - message: `chore: vouch ${discussionAuthor}`, - content: Buffer.from(updatedContent).toString('base64'), - sha: fileSha, - branch, - }); - } - - try { - await commitVouch(currentContent, sha); - } catch (e) { - if (e.status === 409) { - // Concurrent write — re-read and retry once. - console.log('409 conflict. Re-reading VOUCHED.td and retrying.'); - const { data: fresh } = await github.rest.repos.getContent({ - owner: context.repo.owner, - repo: context.repo.repo, - path: filePath, - ref: branch, - }); - const freshContent = Buffer.from(fresh.content, 'base64').toString('utf-8'); - if (isVouched(freshContent, discussionAuthor)) { - console.log(`${discussionAuthor} was vouched by a concurrent operation.`); - } else { - await commitVouch(freshContent, fresh.sha); - } - } else { - throw e; - } - } - - // --- Confirm --- - - await postDiscussionComment([ - `@${discussionAuthor} has been vouched by @${commenter}.`, - '', - 'You can now submit pull requests to OpenShell. Welcome aboard.', - '', - 'Please read [CONTRIBUTING.md](https://github.com/NVIDIA/OpenShell/blob/main/CONTRIBUTING.md) before submitting.', - ].join('\n')); - - await closeDiscussion(); - - console.log(`Vouched ${discussionAuthor} (approved by ${commenter}) and closed the discussion.`); diff --git a/.github/zizmor.yml b/.github/zizmor.yml index e0cb3462c1..bdc4a9037c 100644 --- a/.github/zizmor.yml +++ b/.github/zizmor.yml @@ -12,4 +12,3 @@ rules: - release-canary.yml:3 - required-ci-gates.yml:7 - review-readiness.yml:6 - - vouch-check.yml:3 diff --git a/CI.md b/CI.md index 338d82525e..81f243d7cb 100644 --- a/CI.md +++ b/CI.md @@ -637,7 +637,6 @@ Prerequisites: - All commits include a DCO sign-off (`git commit -s`). - Org members and collaborators sign their commits (see [Commit signing](#commit-signing)). -- First-time external contributors must be vouched. See the [First-Time Contributors](CONTRIBUTING.md#first-time-contributors). Flow: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a93bd6380b..8409bba1a9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,16 +20,7 @@ OpenShell is agent-first, not agent-only. The distinction matters: ## First-Time Contributors -We use a vouch system. This exists because AI makes it trivial to generate plausible-looking but low-quality contributions, and we can no longer trust by default. - -1. Open a [Vouch Request](https://github.com/NVIDIA/OpenShell/discussions/new?category=vouch-request) discussion. -2. Describe what you want to change and why. -3. Write in your own words. AI-generated vouch requests will be denied. -4. A maintainer will comment `/vouch` if approved, and the request discussion - will close automatically. -5. **Get vouched before opening a PR.** Once vouched, you can submit pull requests. - -**If you are not vouched, any pull request you open will be automatically closed.** The PR and its discussion are preserved. Once vouched, open a new PR (preferred) or reopen the closed one. It cannot be held open or converted to a draft to bypass the check. Org members and collaborators with push access bypass this check. +Pull requests from authors without write access must link an issue labeled `state:accepted`. See [Pull Requests](#pull-requests). ### Finding Work @@ -497,7 +488,7 @@ For release notes, describe the user-facing change in a few short, easy-to-read Every PR must close an existing issue, except automated dependency updates and the build and flaky-test fixes described below. In the PR's **Related Issue** section, use `Closes #NNN` for the issue covering that PR's scope. Split multi-PR work into a closable issue for each PR; a tracking issue can link them. Security fixes follow the private disclosure process in [SECURITY.md](SECURITY.md). -Authors without write access to the target repository must link at least one issue with `state:accepted`, and every linked issue must be accepted. This applies to drafts and direct requests to agents. Authors with verified `WRITE`, `MAINTAIN`, or `ADMIN` access may create a PR without the acceptance label; they must still follow the issue-linking requirement above. PR body text, roadmap placement, other labels, and vouch status do not bypass acceptance. +Authors without write access to the target repository must link at least one issue with `state:accepted`, and every linked issue must be accepted. This applies to drafts and direct requests to agents. Authors with verified `WRITE`, `MAINTAIN`, or `ADMIN` access may create a PR without the acceptance label; they must still follow the issue-linking requirement above. PR body text, roadmap placement, and other labels do not bypass acceptance. The `PR Issue Acceptance` workflow reports the native `OpenShell / PR Issue Acceptance` job result for the triggering PR when it is opened, edited, reopened, or updated with new commits. It does not publish a shared commit status; lookup and execution errors fail the job. Link accepted issues in this repository using `Fixes #NNN` or `Closes #NNN`; GitHub recognizes closing references when a PR targets the default branch. Rerun the workflow after issue labels change. Making the job required for merging and configuring any required Actions event policy are separate repository settings; merge-queue support is not included. diff --git a/scripts/agents/gator/skills/gator-gate/SKILL.md b/scripts/agents/gator/skills/gator-gate/SKILL.md index 8fcebe6177..5e9ddacf30 100644 --- a/scripts/agents/gator/skills/gator-gate/SKILL.md +++ b/scripts/agents/gator/skills/gator-gate/SKILL.md @@ -306,7 +306,6 @@ gator:blocked -> previous intended state blocker resolved -> stay blocked blocker still present -> nudge responsible party blocker unchanged after 48 business hours - -> stop closed by vouch gate; wait for vouch and reopen gator:validated -> stop issue is already ready for work, no new PR or comments @@ -317,7 +316,7 @@ gator:in-review -> gator:watch-pipeline review feedback resolved -> nudge PR author review feedback unanswered after 48 business hours -> gator:follow-up-needed author action needed - -> gator:blocked draft, vouch, DCO, merge conflict, or authority blocker + -> gator:blocked draft, DCO, merge conflict, or authority blocker gator:watch-pipeline -> gator:approval-needed required checks are green and maintainer approval is missing @@ -428,7 +427,7 @@ Use 48 business hours as the default inactivity threshold for states that are wa State-specific monitoring: - `gator:follow-up-needed`: wait for submitter or maintainer clarification. If no substantive response arrives after 48 business hours, close as not planned or close the PR with a TTL-expired comment. -- `gator:blocked`: re-check the blocker. If resolved, continue to the previous intended state. If still blocked after 48 business hours, nudge the responsible party unless the PR was auto-closed by the vouch system. +- `gator:blocked`: re-check the blocker. If resolved, continue to the previous intended state. If still blocked after 48 business hours, nudge the responsible party. - `gator:validated`: for an issue-only item with no associated PR, stop; the issue is ready for work. If an associated PR exists or appears during a later invocation, validate the PR and move it to `gator:in-review`. If new information changes the scope, re-run validation. - `gator:in-review`: watch for author commits, trusted author responses, trusted maintainer comments, and unresolved gator findings. Ignore unacknowledged third-party comments. If feedback is addressed, move to E2E/test-label decision and then `gator:watch-pipeline`. If feedback is unanswered after 48 business hours, nudge the PR author. Continue watching after either action. - `gator:watch-pipeline`: watch checks until green, failed, or blocked. Move to `gator:approval-needed` when required checks are green, no review feedback remains, and maintainer approval is missing. Move directly to `gator:merge-ready` when required checks are green, no review feedback remains, and maintainer approval is present. Continue watching after either state transition because maintainer feedback can arrive later. @@ -451,13 +450,10 @@ Before project-validity review, check blockers. Move to `gator:blocked` when any of these apply: - PR is draft and not ready for review -- PR is blocked by the vouch system or was auto-closed for lack of vouch - DCO is missing or failing - PR has merge conflicts or `mergeStateStatus` indicates dirty/blocked for conflict reasons - An outside contributor's workflow runs await approval and the current user lacks maintainer authority -For auto-closed vouch-gate PRs, do not treat the proposal as invalid. Comment only if useful, then stop and wait until the author is vouched and the PR is reopened. - For blocked open PRs, post a concise gator comment that lists the blocker and the exact next human action. On later invocations, re-check the blocker and nudge the responsible party after 48 business hours if it remains unresolved. ## Step 4: Duplicate Detection