Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

docs(ci): keep PR moderation limited to submission rate

haelyra0cf3a25d57a6
diff --git a/.github/PR_MODERATION.md b/.github/PR_MODERATION.md
index c87f7cde8..658327570 100644
--- a/.github/PR_MODERATION.md
+++ b/.github/PR_MODERATION.md
@@ -8,7 +8,6 @@ judge whether a patch is useful. Existing open PRs are not bulk-closed on rollou
| Control | Default | Enforcement |
| --- | --- | --- |
-| Native concurrent cap | Five open PRs, including drafts | Admin must enable GitHub setting |
| Burst allowance | Five creations per author in 20 minutes | Close and lock excess PRs |
| Severe burst | More than ten creations in 20 minutes | Attempt account block; alert maintainers |
| Known denied account | User ID `108231307`, currently `dajiaohuang` | Close and lock its incoming/reopened PR |
@@ -16,8 +15,8 @@ judge whether a patch is useful. Existing open PRs are not bulk-closed on rollou
| Notifications | `@affaan-m @haelyra` | One bot-authored issue per author per UTC day, plus one escalation comment |
Edit `pr-burst-policy.json` to change thresholds, notification recipients or
-denied numeric IDs. A native cap bypass list does not bypass the custom burst
-guard. Granting write access is not required for native cap exceptions.
+denied numeric IDs. This policy limits submission rate, with no limit on the
+total number of open PRs a contributor can accumulate over time.
Closed and draft PRs count toward burst detection. Counting uses stable author
IDs and paginated REST creation metadata, without the search index. A run checks
@@ -30,31 +29,18 @@ but are not mutated again.
Reopening an old ordinary PR does not add a new creation to the burst count.
Reopening a denied author's PR triggers denial even outside the time window.
-The native concurrent cap supplies the pre-creation control. Actions moderation
-happens after creation and cannot prevent every CI job from starting. Account
+Actions moderation happens after creation and cannot prevent every CI job from starting. Account
blocks cannot stop someone from using a different GitHub account.
## Activate
1. Merge the reviewed workflow and script into `main`.
-2. As a repository administrator, enable the native cap under **Settings >
- Moderation options > Interaction limits > Pull request limits**. Set five
- concurrent PRs and include drafts. Alternatively, authenticate `gh` as an
- administrator and run:
-
- ```sh
- gh api --method PATCH repos/affaan-m/ECC/interaction-limits/pulls/creation-cap \
- -H 'X-GitHub-Api-Version: 2026-03-10' \
- -F enabled=true -F max_open_pull_requests=5 -F include_drafts=true
- gh api repos/affaan-m/ECC/interaction-limits/pulls/creation-cap
- ```
-
-3. To enable automatic account blocking, `affaan-m` creates a dedicated
+2. To enable automatic account blocking, `affaan-m` creates a dedicated
fine-grained token with the account permission **Block another user: write**.
Store it as repository Actions secret `PR_MODERATION_BLOCK_TOKEN`. Use GitHub's
secret UI or `gh secret set PR_MODERATION_BLOCK_TOKEN --repo affaan-m/ECC`
with its hidden prompt. Do not paste credentials into chat or source files.
-4. Verify a genuine subsequent guard run and its job summary. Without the secret,
+3. Verify a genuine subsequent guard run and its job summary. Without the secret,
closure and alerting still run. A severe burst records blocking as unavailable
in the alert and fails the job so maintainers see the missing protection.
@@ -65,10 +51,8 @@ collaborator's personal block cannot protect this repository. The normal
`GITHUB_TOKEN` cannot perform account blocking. Organization blocking requires
a separate implementation if repository ownership changes.
-GitHub's native cap counts concurrent open PRs. The custom guard counts creations
-over time. Closing PRs can free native cap slots, but cannot reset burst counts.
-A native cap can therefore stop a contributor before they reach the severe
-threshold; the custom guard still catches rapid closing and resubmission.
+Closing PRs cannot reset burst counts. Rapid closing and resubmission still
+count as creations within the same rolling window.
## Verify without moderating anyone
@@ -109,14 +93,14 @@ verification; the local fixture cannot certify those platform operations.
A contributor-created lookalike cannot suppress alerts. Escalation remains
recorded if a later run has a lower count.
- To roll back, disable **PR Burst Guard** in Actions. Remove its secret if
- abandoning automatic blocking. Disable the native cap separately in Settings.
+ abandoning automatic blocking.
- To restore a contributor, the owner removes the account block. Remove any
denied user ID from the policy, then unlock and reopen selected PRs manually.
## October 15 investigation
Authenticated GitHub GraphQL returned zero `CLOSED_EVENT` or `REOPENED_EVENT`
-entries across all 55 currently open `dajiaohuang` PRs. Their latest update was
+entries across all 55 `dajiaohuang` PRs that were open at the investigation's start. Their latest update was
October 8. The public timeline therefore supplies no evidence that they reopened
on October 15. Restored visibility after GitHub spam classification is a possible
explanation, but GitHub's private moderation history was unavailable. A block on
@@ -125,16 +109,14 @@ owner block. The owner's actual block state was not available to this session.
The visible newer burst was 14 PRs from `jwcastillo`, #3567 through #3580, between
October 14 at 19:01:37 and 19:07:14 UTC. Volume alone does not establish the quality
-of those patches. No historical PR was closed or account blocked during this
-investigation. The native cap API returned `403: Must have admin rights to
-Repository` for the authenticated collaborator `haelyra`.
+of those patches. The maintainer subsequently authorized closing all 55 open
+`dajiaohuang` PRs. All closures were verified, and a fresh paginated REST scan
+found zero remaining open PRs from numeric user ID `108231307`.
This advances M0 maintenance reliability. Runtime sandbox, Capsule, Fleet,
release publication and shared application installation remain separate work.
## GitHub references
-- [Native repository PR caps and bypass lists](https://docs.github.com/en/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository)
-- [Repository cap REST endpoints](https://docs.github.com/en/rest/interactions/repos)
- [Personal account blocking REST endpoints](https://docs.github.com/en/rest/users/blocking)
- [Privileged pull request event security](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 71c844f8f..bd8e3d96b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -441,8 +441,7 @@ closes and locks excess PRs, including drafts. More than ten submissions within
still count toward the window. Contributors with repository write access bypass
this policy. Maintainers can review exceptions through the moderation alert.
-The repository also supports GitHub's native concurrent open-PR cap, configured
-separately by an administrator. See the [moderation runbook](.github/PR_MODERATION.md)
+See the [moderation runbook](.github/PR_MODERATION.md)
for activation, credential requirements, and recovery.
### 1. PR Title Format