Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .agents/skills/create-github-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ Created PR [#123](https://github.com/OWNER/REPO/pull/123)
Follow the shared [accepted-work definition](../../../CONTRIBUTING.md#accepted-work)
and [Labeling and Notifications](../../../CONTRIBUTING.md#labeling-and-notifications)
when applying classification labels. Review-readiness applies the acceptance label
to qualifying PRs when they open; this does not replace existing PR requirements.
to qualifying PRs when they open and moves unaccepted ready PRs back to draft.
This does not replace existing PR requirements.

### Monitor Workflow Run (Optional)

Expand Down
3 changes: 0 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
/.agents/agents/labeler/ @ai-openshell/maintainers
/.agents/skills/label-issue @ai-openshell/maintainers

# PR issue acceptance checks
/tasks/scripts/check_issue_acceptance.cjs @ai-openshell/maintainers
/tasks/scripts/check_issue_acceptance.test.cjs @ai-openshell/maintainers

# Auditable SBOM check
/tasks/scripts/verify-image-sbom.sh @ai-openshell/maintainers
19 changes: 12 additions & 7 deletions .github/workflows/pr-issue-acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ jobs:
with:
ref: ${{ github.sha }}
persist-credentials: false
sparse-checkout: tasks/scripts/check_issue_acceptance.cjs
sparse-checkout: |
tasks/scripts/check_review_readiness.py
.agents/agents/labeler/bin/acceptance.py
tasks/scripts/check_maintainer_approval.py
sparse-checkout-cone-mode: false

- name: Check author access and linked issue acceptance
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
script: |
const check = require('./tasks/scripts/check_issue_acceptance.cjs');
await check({ github, context, core });
- name: Check PR acceptance
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
python3 tasks/scripts/check_review_readiness.py \
--repo "$GH_REPO" --pr "$PR_NUMBER" --acceptance-only
2 changes: 1 addition & 1 deletion .github/workflows/review-readiness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
shell: bash
run: |
set -euo pipefail
args=(--repo "$GH_REPO" --pr "$PR_NUMBER" --apply)
args=(--repo "$GH_REPO" --pr "$PR_NUMBER" --event "$PR_ACTION" --apply)
if [ "$PR_ACTION" = opened ]; then
args+=(--label-accepted-work)
fi
Expand Down
2 changes: 1 addition & 1 deletion CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ Maintainers should add ready PRs to the queue rather than pressing a direct merg
| `.github/actions/setup-rust/action.yml` | Restores the Rust target and registry cache. Other branches can restore only their own caches and `main`'s, so per-binary release build caches are saved only on `main`. |
| `.github/workflows/rust-cache.yml` | Builds the Branch Checks test targets on each push to `main` to save the `rust-checks` cache that PRs and merge groups restore. Skips the build when the cache already matches. |
| `.github/workflows/required-ci-gates.yml` | Posts required PR-head and merge-group statuses for gated CI workflows, including for fork PRs. This is what branch protection and merge queue should require. |
| `.github/workflows/review-readiness.yml` | Labels newly opened accepted-work PRs using the shared read-only acceptance library, including drafts; routes matching reviewers when a PR is ready and classified. |
| `.github/workflows/review-readiness.yml` | Labels newly opened accepted-work PRs using the shared read-only acceptance library, including drafts; moves unaccepted ready PRs back to draft with a one-time explanation; routes matching reviewers when a PR is ready and classified. |
| `.github/workflows/workflow-security.yml` | Runs informational Actionlint and High-severity Zizmor reports on GitHub-hosted runners. |
| `.github/workflows/dependency-review.yml` | Reports dependency changes when GitHub Dependency Graph is available; otherwise publishes a neutral warning. |
| `.github/workflows/codeql.yml` | Runs nightly informational CodeQL analysis on `main` for Rust and the Python SDK and retains SARIF artifacts. |
Expand Down
10 changes: 7 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Use GitHub closing references such as `Closes #123` or `Fixes #123`.

The definition of accepted work is encoded in `.agents/agents/labeler/bin/acceptance.py` and should be directly imported where needed.

Acceptance classifies work, not implementation quality or approval to merge. Existing issue-linking rules, the separate `PR Issue Acceptance` check (which requires every linked issue to be accepted for community authors), and maintainer/code-owner approvals still apply. Acceptance does not certify that the diff implements the issue, and the existing Dependabot gate exemption does not automatically qualify a PR as accepted work.
Acceptance classifies work, not implementation quality or approval to merge. Existing issue-linking rules, the [automated acceptance checks](#pull-requests), and maintainer/code-owner approvals still apply. Acceptance does not certify that the diff implements the issue, and the existing Dependabot gate exemption does not automatically qualify a PR as accepted work.

### Labeling and Notifications

Expand Down Expand Up @@ -509,9 +509,13 @@ Every PR must close an existing issue, except automated dependency updates and t

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.
Both acceptance checks use `tasks/scripts/check_review_readiness.py`. The `PR Issue Acceptance` workflow reports the native `OpenShell / PR Issue Acceptance` job result when a PR is opened, edited, reopened, or updated with new commits, including drafts. It only reports acceptance and does not change the PR. `Review Readiness` checks the same policy when a ready PR is opened or leaves draft; it moves rejected work to draft before requesting reviewers. Area/topic label changes only reconcile reviewers.

Automated dependency update PRs, including Dependabot PRs, are exempt from the separate issue and closing-reference requirement. Human-authored dependency updates follow the normal issue requirement. The exception does not bypass `PR Issue Acceptance` for authors without repository write access or change applicable verification, review, or private vulnerability disclosure requirements.
The automated gate recognizes repository write access, `state:accepted` on the PR or any referenced issue, and the Dependabot exemption. It does not replace the contributor issue-linking requirements above or the [accepted-work definition](#accepted-work) used for automatic labeling.

The checks do not publish a shared commit status; lookup and execution errors fail the job. Description references support `#NNN`, `OWNER/REPO#NNN`, and GitHub issue URLs. Rerun `PR Issue Acceptance` 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.

Automated dependency update PRs, including Dependabot PRs, are exempt from the separate issue and closing-reference requirement. The automated acceptance gate also exempts Dependabot PRs. Human-authored dependency updates follow the normal issue requirement. These exceptions do not change applicable verification, review, or private vulnerability disclosure requirements.

Authors with `WRITE`, `MAINTAIN`, or `ADMIN` access may open a PR that only fixes a broken build or flaky tests without a separate issue. Describe the failure in the PR instead. Authors without write access follow the normal issue and acceptance requirements.

Expand Down
82 changes: 0 additions & 82 deletions tasks/scripts/check_issue_acceptance.cjs

This file was deleted.

150 changes: 0 additions & 150 deletions tasks/scripts/check_issue_acceptance.test.cjs

This file was deleted.

Loading
Loading