v0.42.73.1 revert(ci): remove the PR gate and withdraw the v0.42.72.1 contribution requirements (#3805)

* v0.42.73.1 revert(ci): remove the PR gate — it cannot function on this repository

The gate needs an ANTHROPIC_API_KEY Actions secret for its verdict and
read-write workflow permissions to post a comment or set a label. This
repository grants neither, and both are admin-only, so it can only ever skip.

It also caused a real incident before that was understood: a read-only token
turned every API call into a 403, the code treated that as a crash, and the
check went red on an outside contributor's PR four times with no comment
explaining why. v0.42.73.0 fixed the crash, but a check that runs on every PR
and can never reach a verdict does not earn a place in the repo.

Removes the workflow, the script, its type surface, and its test file. The code
is preserved in git history at v0.42.73.0. If it is ever restored, the
mechanical half (intent/screenshot policy, title rule, red flags) should render
to the Actions job summary rather than a comment — that needs no token
permission and no API key.

CONTRIBUTING.md's intent-paragraph and screenshot requirement is unchanged and
stands as written; it is enforced by maintainers reading PRs, as before.

typecheck clean, verify 34/34, llms bundles regenerated.

* v0.42.73.1 revert(docs): withdraw the human-intent-paragraph + screenshot contribution requirement

This reverts commit 6d1232d5a6 (v0.42.72.1).

CONTRIBUTING.md, both issue templates, and the pull-request template return
to their pre-2026-08-02 state. VERSION/package.json/CHANGELOG keep moving
forward (0.42.73.1); the v0.42.72.1 CHANGELOG entry stays as historical
record, and the 0.42.73.1 entry now describes the withdrawal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Garry Tan <garrytan@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Sina Matian
2026-08-05 04:20:30 +07:00
committed by GitHub
co-authored by Claude Fable 5 Garry Tan
parent e5dee4fb78
commit aecb33e795
11 changed files with 20 additions and 3653 deletions
-97
View File
@@ -1,97 +0,0 @@
/** Type surface of scripts/pr-gate.mjs for test/pr-gate-workflow.test.ts (tsc-only). */
export interface TitleCheck {
ok: boolean;
reason?: string;
}
export declare function checkTitle(title: string): TitleCheck;
export interface ChangedFile {
filename: string;
status: string;
patch?: string;
additions?: number;
deletions?: number;
}
export interface RedFlag {
id: string;
detail: string;
}
export declare function detectRedFlags(input: {
changedFiles: number;
files: ChangedFile[];
diff: string;
}): RedFlag[];
export declare const RUBRIC: string;
export declare const MAX_STRING: number;
export declare const MAX_ITEMS: number;
export declare const NET_SOURCE_LINE_LIMIT: number;
export declare const DOWNGRADE_FLAG_IDS: string[];
/** CONTRIBUTING.md #3745: human-written intent paragraph + screenshot of gbrain in use. */
export declare const CONTRIBUTING_URL: string;
export declare const INTENT_MIN_WORDS: number;
export declare const POLICY_FLAG_IDS: string[];
export declare const POLICY_SCAN_MAX: number;
export declare const POLICY_EXEMPT_ASSOCIATIONS: string[];
export declare const AI_INTENT_DOWNGRADE: string;
export declare function stripCodeFences(body: unknown): string;
export declare const MODEL_BODY_MAX: number;
export declare function modelBody(pr: { body?: string } | null | undefined): string;
export declare function hasScreenshot(body: unknown): boolean;
export declare function intentWordCount(body: unknown): number;
export declare function hasIntentParagraph(body: unknown): boolean;
export declare function detectPolicyMisses(body: unknown): RedFlag[];
export declare function sanitizeModelText(value: unknown, max?: number): string;
export declare function sanitizeList(value: unknown, maxItems?: number, maxString?: number): string[];
export declare function applyMechanicalDowngrades(
lane: string,
flags: RedFlag[],
intentAuthenticity?: string,
): { lane: string; downgrades: string[] };
/** The pr.json fields the #3745 exemption reads (all GitHub-computed). */
export interface PrIdentity {
author_association?: string;
draft?: boolean;
user?: { type?: string; login?: string };
}
export declare function policyExemption(pr: PrIdentity | null | undefined): string | null;
export interface GhComment {
id?: number;
body?: unknown;
user?: { type?: string; login?: string };
}
export declare function isOwnComment(comment: GhComment | null | undefined): boolean;
export declare function hashInputs(
pr: PrIdentity & { title?: string; body?: string; head?: { sha?: string } },
/** The assembled model payload (changed files + diff). runGate always passes it. */
payload?: string,
): string;
export declare function parseState(body: unknown): { hash: string; lane?: string } | null;
export declare function renderComment(input: {
lane?: string;
verdict?: { confidence?: number; reasons?: unknown; reviewer_checklist?: unknown };
titleCheck: TitleCheck;
flags: RedFlag[];
neutralReason?: string;
downgrades?: string[];
policyMisses?: RedFlag[];
policyExempt?: string | null;
labelsCleared?: boolean;
state?: { hash: string; lane: string };
}): string;
export declare function runGate(
dir: string,
env?: Record<string, string | undefined>,
fetchImpl?: typeof fetch,
): Promise<number>;
export declare function isPermissionFailure(err: unknown): boolean;
export declare const PERMISSION_HELP: (msg: string) => string;
-1216
View File
File diff suppressed because it is too large Load Diff