@homeflare/alchemy 0.53.0 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,55 @@
1
+ /**
2
+ * `GitHub.ForkPrApproval` — a repository's "approval for running fork pull request workflows
3
+ * from contributors" setting, as a declared resource.
4
+ *
5
+ * ★ WHY IT EXISTS (Tim, 2026-10-14 01:28 ET). `PUBLIC_ONLY_UNDECLARABLE` (repo-baseline-data.ts)
6
+ * listed this setting as something no resource could express. homeflare-kit moved onto the
7
+ * self-hosted pve pool, and homeflare-mini's ci-runner serves a public repo only while this
8
+ * setting is `all_external_contributors` (its `PUBLIC_RUNNER_REPOS`, fail-closed) — a fork's
9
+ * code must not reach the LAN runner without a maintainer's click. So the setting is now code.
10
+ *
11
+ * ⚠️ ONE ENDPOINT PAIR, NOTHING ELSE. `GET`/`PUT /repos/{owner}/{repo}/actions/permissions/
12
+ * fork-pr-contributor-approval`. The setting always exists, so there is no create and no delete:
13
+ * `reconcile` PUTs the declared policy and reads it back; `delete` leaves the live setting as it
14
+ * is (the default removal policy is `retain`, and dropping a declaration must never loosen it).
15
+ * ⛔ ADOPT, NEVER CLAIM SILENTLY. With no prior state `read` returns the live value as `Unowned`,
16
+ * so a stack has to `adopt(true)` it on purpose — the same convention as `RepositoryRuleset`.
17
+ * ⛔ READ BACK. A PUT that GitHub accepts but does not store is reported, not trusted: the
18
+ * reconcile re-reads and fails on a mismatch.
19
+ */
20
+ import { Resource } from 'alchemy';
21
+ import { GitHubCredentials } from 'alchemy/GitHub';
22
+ import * as Provider from 'alchemy/Provider';
23
+ import * as Effect from 'effect/Effect';
24
+ /** GitHub's three values, most to least permissive. */
25
+ export declare const FORK_PR_APPROVAL_POLICIES: readonly ['first_time_contributors_new_to_github', 'first_time_contributors', 'all_external_contributors'];
26
+ export type ForkPrApprovalPolicy = (typeof FORK_PR_APPROVAL_POLICIES)[number];
27
+ export interface ForkPrApprovalProps {
28
+ readonly owner: string;
29
+ readonly repository: string;
30
+ readonly approvalPolicy: ForkPrApprovalPolicy;
31
+ /** GitHub Enterprise API base; omit for github.com. */
32
+ readonly baseUrl?: string;
33
+ }
34
+ export interface ForkPrApprovalAttributes {
35
+ readonly owner: string;
36
+ readonly repository: string;
37
+ readonly approvalPolicy: string;
38
+ }
39
+ export interface ForkPrApproval extends Resource<'GitHub.ForkPrApproval', ForkPrApprovalProps, ForkPrApprovalAttributes, never> {
40
+ }
41
+ export declare const ForkPrApproval: import("alchemy").ResourceClass<ForkPrApproval>;
42
+ /** The two calls this resource makes, so tests can hand it a fake. */
43
+ export interface ForkPrApprovalClient<R = never> {
44
+ readonly get: (owner: string, repo: string) => Effect.Effect<string, Error, R>;
45
+ readonly put: (owner: string, repo: string, policy: ForkPrApprovalPolicy) => Effect.Effect<void, Error, R>;
46
+ }
47
+ /** A PUT GitHub accepted but did not store. */
48
+ export declare class ForkPrApprovalReadbackMismatch extends Error {
49
+ readonly _tag = "ForkPrApprovalReadbackMismatch";
50
+ }
51
+ export declare const octokitForkPrApprovalClient: (baseUrl: string | undefined) => ForkPrApprovalClient<GitHubCredentials>;
52
+ /** The provider's handlers over any client — the real one below, a fake in tests. */
53
+ export declare const forkPrApprovalHandlers: <R>(clientFor: (baseUrl: string | undefined) => ForkPrApprovalClient<R>) => Provider.ProviderService<ForkPrApproval, R, never, never, R, never, never, never, never>;
54
+ export declare const ForkPrApprovalProvider: () => import("effect/Layer").Layer<Provider.Provider<ForkPrApproval>, never, GitHubCredentials>;
55
+ //# sourceMappingURL=fork-pr-approval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fork-pr-approval.d.ts","sourceRoot":"","sources":["../../src/github/fork-pr-approval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAA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A+B,SAAQ,KAAK;IACvD,QAAQ,CAAC,IAAI,oCAAoC;CAClD;AAKD,eAAO,MAAM,2BAA2B,YAC7B,MAAM,GAAG,SAAS,KAC1B,oBAAoB,CAAC,iBAAiB,CA6BxC,CAAC;AAYF,qFAAqF;AACrF,eAAO,MAAM,sBAAsB,GAAI,CAAC,aAC3B,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,oBAAoB,CAAC,CAAC,CAAC,6FA+CjE,CAAC;AAEL,eAAO,MAAM,sBAAsB,iGACoD,CAAC"}
@@ -25,6 +25,7 @@ export { type DeclareRepoPolicyOptions, declareRepoPolicy } from './repo-policy.
25
25
  export { type RepoBaselineInput, PUBLIC_ONLY_UNDECLARABLE, repoBaselineRuleset, repoBaselineSettings, } from './repo-baseline-data.ts';
26
26
  export { type DeclareRepoBaselineOptions, declareRepoBaseline } from './declare-repo-baseline.ts';
27
27
  export { RepositoryRuleset, RepositoryRulesetProvider, type RepositoryRulesetAttributes, type RepositoryRulesetProps, type RepositoryRulesetPullRequestRule, type RepositoryRulesetReviewerRule, type RepositoryRulesetRules, type RepositoryRulesetStatusChecksRule, } from './repository-ruleset.ts';
28
+ export { FORK_PR_APPROVAL_POLICIES, ForkPrApproval, type ForkPrApprovalAttributes, type ForkPrApprovalPolicy, type ForkPrApprovalProps, ForkPrApprovalProvider, ForkPrApprovalReadbackMismatch, } from './fork-pr-approval.ts';
28
29
  export { repoPolicyProviders } from './repository-ruleset-providers.ts';
29
30
  export { RULE_TYPE_COVERAGE, type RepositoryRuleType } from './repository-ruleset-constraints.ts';
30
31
  export { BypassActorNarrowed, BypassActorWidened, DuplicateRuleset, NeverReportedContext, ReadbackMismatch, RequiredChecksOmitted, RuleNarrowed, RulesetConstraintRefused, UndeclaredLiveRule, type RepositoryRulesetError, } from './repository-ruleset-errors.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/github/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;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K,iBAAiB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,KAAK,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAClG,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,iCAAiC,GACvC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAClG,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,wBAAwB,EACxB,kBAAkB,EAClB,KAAK,sBAAsB,GAC5B,MAAM,gCAAgC,CAAC"}
@@ -974,8 +974,7 @@ function repoBaselineRuleset(input) {
974
974
  var PUBLIC_ONLY_UNDECLARABLE = [
975
975
  "secret_scanning: enabled",
976
976
  "secret_scanning_push_protection: enabled",
977
- "private_vulnerability_reporting: enabled",
978
- "fork-PR approval: 'first_time_contributors'"
977
+ "private_vulnerability_reporting: enabled"
979
978
  ];
980
979
  // src/github/declare-repo-baseline.ts
981
980
  import { adopt as adopt2 } from "alchemy/AdoptPolicy";
@@ -994,17 +993,101 @@ var declareRepoBaseline = (id, options) => Effect7.gen(function* () {
994
993
  const ruleset = yield* owned(RepositoryRuleset(`${id}-ruleset`, repoBaselineRuleset(options)));
995
994
  return { repository, ruleset };
996
995
  });
996
+ // src/github/fork-pr-approval.ts
997
+ import { Resource as Resource2 } from "alchemy";
998
+ import { Unowned as Unowned2 } from "alchemy/AdoptPolicy";
999
+ import { isResolved as isResolved2 } from "alchemy/Diff";
1000
+ import { GitHubCredentials as GitHubCredentials2 } from "alchemy/GitHub";
1001
+ import * as Provider2 from "alchemy/Provider";
1002
+ import * as Effect8 from "effect/Effect";
1003
+ var FORK_PR_APPROVAL_POLICIES = [
1004
+ "first_time_contributors_new_to_github",
1005
+ "first_time_contributors",
1006
+ "all_external_contributors"
1007
+ ];
1008
+ var ForkPrApproval = Resource2("GitHub.ForkPrApproval", {
1009
+ defaultRemovalPolicy: "retain"
1010
+ });
1011
+
1012
+ class ForkPrApprovalReadbackMismatch extends Error {
1013
+ _tag = "ForkPrApprovalReadbackMismatch";
1014
+ }
1015
+ var asError2 = (e) => e instanceof Error ? e : new Error(String(e));
1016
+ var PATH = "actions/permissions/fork-pr-contributor-approval";
1017
+ var octokitForkPrApprovalClient = (baseUrl) => {
1018
+ const octokit = Effect8.gen(function* () {
1019
+ const creds = yield* yield* GitHubCredentials2;
1020
+ return baseUrl === undefined ? creds.octokit() : creds.octokit({ baseUrl });
1021
+ }).pipe(Effect8.mapError(asError2));
1022
+ return {
1023
+ get: (owner, repo) => Effect8.gen(function* () {
1024
+ const o = yield* octokit;
1025
+ const res = yield* Effect8.tryPromise({
1026
+ try: () => o.request(`GET /repos/{owner}/{repo}/${PATH}`, { owner, repo }),
1027
+ catch: asError2
1028
+ });
1029
+ return String(res.data.approval_policy);
1030
+ }),
1031
+ put: (owner, repo, policy) => Effect8.gen(function* () {
1032
+ const o = yield* octokit;
1033
+ yield* Effect8.tryPromise({
1034
+ try: () => o.request(`PUT /repos/{owner}/{repo}/${PATH}`, {
1035
+ owner,
1036
+ repo,
1037
+ approval_policy: policy
1038
+ }),
1039
+ catch: asError2
1040
+ });
1041
+ })
1042
+ };
1043
+ };
1044
+ var attrs = (owner, repository, approvalPolicy) => ({
1045
+ owner,
1046
+ repository,
1047
+ approvalPolicy
1048
+ });
1049
+ var forkPrApprovalHandlers = (clientFor) => ForkPrApproval.Provider.of({
1050
+ list: () => Effect8.succeed([]),
1051
+ nuke: { skip: true },
1052
+ read: ({ output, olds }) => Effect8.gen(function* () {
1053
+ const live = yield* clientFor(olds.baseUrl).get(olds.owner, olds.repository);
1054
+ const found = attrs(olds.owner, olds.repository, live);
1055
+ return output === undefined ? Unowned2(found) : found;
1056
+ }),
1057
+ diff: ({ news, olds }) => Effect8.succeed(isResolved2(news) && olds !== undefined && (news.owner !== olds.owner || news.repository !== olds.repository) ? { action: "replace" } : undefined),
1058
+ reconcile: ({ news }) => Effect8.gen(function* () {
1059
+ if (!FORK_PR_APPROVAL_POLICIES.includes(news.approvalPolicy)) {
1060
+ return yield* Effect8.fail(new Error(`unknown fork-PR approval policy: ${String(news.approvalPolicy)}`));
1061
+ }
1062
+ const client = clientFor(news.baseUrl);
1063
+ const before = yield* client.get(news.owner, news.repository);
1064
+ if (before !== news.approvalPolicy) {
1065
+ yield* client.put(news.owner, news.repository, news.approvalPolicy);
1066
+ }
1067
+ const after = yield* client.get(news.owner, news.repository);
1068
+ if (after !== news.approvalPolicy) {
1069
+ return yield* Effect8.fail(new ForkPrApprovalReadbackMismatch(`${news.owner}/${news.repository}: PUT ${news.approvalPolicy}, read back ${after}`));
1070
+ }
1071
+ return attrs(news.owner, news.repository, after);
1072
+ }),
1073
+ delete: () => Effect8.void
1074
+ });
1075
+ var ForkPrApprovalProvider = () => Provider2.succeed(ForkPrApproval, forkPrApprovalHandlers(octokitForkPrApprovalClient));
997
1076
  // src/github/repository-ruleset-providers.ts
998
1077
  import * as GitHub3 from "alchemy/GitHub";
999
1078
  import * as Layer from "effect/Layer";
1000
1079
  var repoPolicyProviders = (options) => {
1001
1080
  const github = GitHub3.providers(options);
1002
- return Layer.mergeAll(github, RepositoryRulesetProvider().pipe(Layer.provideMerge(github)));
1081
+ return Layer.mergeAll(github, RepositoryRulesetProvider().pipe(Layer.provideMerge(github)), ForkPrApprovalProvider().pipe(Layer.provideMerge(github)));
1003
1082
  };
1004
1083
  export {
1005
1084
  BypassActorNarrowed,
1006
1085
  BypassActorWidened,
1007
1086
  DuplicateRuleset,
1087
+ FORK_PR_APPROVAL_POLICIES,
1088
+ ForkPrApproval,
1089
+ ForkPrApprovalProvider,
1090
+ ForkPrApprovalReadbackMismatch,
1008
1091
  NeverReportedContext,
1009
1092
  PUBLIC_ONLY_UNDECLARABLE,
1010
1093
  RULE_TYPE_COVERAGE,
@@ -1023,5 +1106,5 @@ export {
1023
1106
  repoPolicyProviders
1024
1107
  };
1025
1108
 
1026
- //# debugId=D21B99F55F9E8E6C64756E2164756E21
1109
+ //# debugId=B8B9D2BF7B19B7F664756E2164756E21
1027
1110
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/github/repo-policy-guards.ts", "../src/github/repo-policy-form.ts", "../src/github/repo-policy.ts", "../src/github/repo-auto-merge-gate.ts", "../src/github/repository-ruleset.ts", "../src/github/repository-ruleset-constraints.ts", "../src/github/repository-ruleset-errors.ts", "../src/github/repository-ruleset-octokit.ts", "../src/github/repository-ruleset-probe.ts", "../src/github/repository-ruleset-reconcile.ts", "../src/github/repository-ruleset-form.ts", "../src/github/repository-ruleset-guards.ts", "../src/github/repository-ruleset-narrowing-guards.ts", "../src/github/repo-baseline-data.ts", "../src/github/declare-repo-baseline.ts", "../src/github/repository-ruleset-providers.ts"],
3
+ "sources": ["../src/github/repo-policy-guards.ts", "../src/github/repo-policy-form.ts", "../src/github/repo-policy.ts", "../src/github/repo-auto-merge-gate.ts", "../src/github/repository-ruleset.ts", "../src/github/repository-ruleset-constraints.ts", "../src/github/repository-ruleset-errors.ts", "../src/github/repository-ruleset-octokit.ts", "../src/github/repository-ruleset-probe.ts", "../src/github/repository-ruleset-reconcile.ts", "../src/github/repository-ruleset-form.ts", "../src/github/repository-ruleset-guards.ts", "../src/github/repository-ruleset-narrowing-guards.ts", "../src/github/repo-baseline-data.ts", "../src/github/declare-repo-baseline.ts", "../src/github/fork-pr-approval.ts", "../src/github/repository-ruleset-providers.ts"],
4
4
  "sourcesContent": [
5
5
  "/**\n * Everything `repoPolicy` refuses, and why. Extracted from repo-policy-form.ts so the\n * shape stays readable and the reasoning stays whole.\n *\n * ⛔ FIVE DIFFERENT DOORS LEAD TO THE SAME FAILURE — auto-merge with nothing to wait for.\n * `gh pr merge --auto` is a queue only while something is outstanding; with nothing\n * outstanding GitHub merges the pull request on the spot. An empty `checks` is the\n * obvious door. `enforcement: 'disabled'` or `'evaluate'` is the quiet one: the ruleset\n * exists, the required checks are listed on it, and none of them block anything. Then\n * three ways to end up with a ruleset that matches NO REF — which enforces on no ref\n * while the GitHub UI still shows it as `active`: an empty `include`, a blank ref\n * pattern, and an `exclude` that cancels every `include`. All five are refused.\n *\n * ★ THE REF DOORS WERE FOUND BY ADVERSARIAL REVIEW, NOT BY DESIGN. The first cut of this\n * module guarded `include.length === 0` and spread `exclude` raw, so\n * `include: ['~DEFAULT_BRANCH'], exclude: ['~DEFAULT_BRANCH']` and `include: [' ']`\n * both sailed through with `allowAutoMerge: true` — the exact end state the empty-array\n * guard exists to prevent, reached by a door beside it. Checked by execution, not by\n * reading: see the `matches no ref` tests in repo-policy-form.test.ts.\n */\n\n/** A non-empty, trimmed identifier, or an error naming the field. */\nexport function requireName(field: string, value: string): string {\n const trimmed = value.trim();\n if (trimmed === '') throw new Error(`repoPolicy: ${field} is required`);\n return trimmed;\n}\n\n/**\n * Trim, de-duplicate, sort. ★ The sort is what makes a second deploy a no-op: GitHub\n * stores the contexts in the order they were sent, so an unsorted list would diff against\n * itself the first time a caller wrote the same contexts in a different order.\n */\nexport function normalizeChecks(checks: readonly string[]): string[] {\n const seen = new Set<string>();\n for (const raw of checks) {\n const context = raw.trim();\n // ⚠️ A blank context is a typo that reads as coverage: GitHub happily stores it and\n // no job ever reports it, so every pull request waits on a check that cannot come.\n if (context === '') {\n throw new Error(\n 'repoPolicy: a required check context is blank — name it exactly as the job reports it',\n );\n }\n seen.add(context);\n }\n return [...seen].sort();\n}\n\n/**\n * Trim, de-duplicate, sort one list of ref patterns, refusing a blank one.\n *\n * ⚠️ A BLANK PATTERN IS NOT AN EMPTY LIST, AND THAT IS THE WHOLE TRAP. `[' ']` has\n * length 1, so a guard that counts the array waves it through; GitHub then stores a ref\n * condition that matches nothing. Same end state as `[]`, reached past the guard.\n * ★ Sorted for the same reason `normalizeChecks` is: GitHub echoes the patterns back in\n * the order they were sent, so an unsorted list diffs against itself the first time a\n * caller writes the same patterns in a different order.\n */\nfunction normalizeRefs(field: string, patterns: readonly string[]): string[] {\n const seen = new Set<string>();\n for (const raw of patterns) {\n const pattern = raw.trim();\n if (pattern === '') {\n throw new Error(\n `repoPolicy: a ${field} ref pattern is blank — a ruleset that matches no ref enforces nothing.`,\n );\n }\n seen.add(pattern);\n }\n return [...seen].sort();\n}\n\n/**\n * ⛔ AN EMPTY `include` IS REFUSED. Alchemy defaults `conditions.include` to `['~ALL']`\n * when it is absent, but an explicitly empty array is sent as an empty array, and a\n * ruleset that matches no ref protects nothing while still reading as `active` in the\n * GitHub UI — the worst possible combination, because it looks like it worked.\n */\nexport function normalizeInclude(\n include: readonly string[] | undefined,\n fallback: readonly string[],\n): string[] {\n if (include === undefined) return [...fallback];\n if (include.length === 0) {\n throw new Error(\n 'repoPolicy: include is empty — a ruleset that matches no ref enforces nothing. Omit it for the default branch.',\n );\n }\n return normalizeRefs('include', include);\n}\n\n/**\n * ⛔ AN `exclude` THAT CANCELS EVERY `include` IS REFUSED. In a GitHub ruleset the\n * exclusions win, so `include: ['~DEFAULT_BRANCH'], exclude: ['~DEFAULT_BRANCH']` is a\n * ruleset over nothing — and it reads as a narrowing, which is what makes it worse than\n * the empty array: the caller believes they scoped the policy, not switched it off.\n *\n * ⚠️ EXACT CANCELLATION ONLY, DELIBERATELY. GitHub's patterns are globs, so deciding in\n * general whether some exclude swallows some include means implementing GitHub's\n * matcher and being wrong about it quietly. This refuses the case that is decidable —\n * every include pattern also appears verbatim in `exclude` — and leaves\n * `exclude: ['refs/heads/*']` against `include: ['~DEFAULT_BRANCH']` to the operator.\n * A narrower guard that is always right beats a broad one that false-refuses.\n */\nexport function normalizeExclude(\n exclude: readonly string[] | undefined,\n include: readonly string[],\n): string[] {\n const patterns = exclude === undefined ? [] : normalizeRefs('exclude', exclude);\n if (patterns.length === 0) return patterns;\n const excluded = new Set(patterns);\n if (include.every((pattern) => excluded.has(pattern))) {\n throw new Error(\n [\n 'repoPolicy: exclude cancels every include pattern, so the ruleset matches no ref and enforces nothing.',\n `include ${JSON.stringify(include)} is fully covered by exclude ${JSON.stringify(patterns)}.`,\n ].join(' '),\n );\n }\n return patterns;\n}\n\n/**\n * ⛔ `0` IS REFUSED, NOT TREATED AS \"NO REVIEWS\". A `pull_request` rule with zero\n * approvals is the solo-maintainer shape — every change through a PR, no second person\n * — and it only works with `require_extra_approval_for_unattributed_changes: false`.\n * alchemy@2.0.0-beta.79's `Ruleset` cannot express that field, and GitHub defaults it\n * to `true` when it is omitted (measured 2026-09-17), which blocks the very PRs the\n * zero was meant to let through. Omitting `requiredApprovals` declares no rule at all,\n * which is a different and honest thing.\n */\nexport function resolveApprovals(requested: number | undefined): number | undefined {\n if (requested === undefined) return undefined;\n if (!Number.isInteger(requested) || requested < 1) {\n throw new Error(\n [\n 'repoPolicy: requiredApprovals must be a whole number of 1 or more.',\n 'Omit it to declare no pull_request rule.',\n '0 is not that: it needs require_extra_approval_for_unattributed_changes: false,',\n 'which alchemy@2.0.0-beta.79 cannot send and GitHub defaults to true.',\n ].join(' '),\n );\n }\n return requested;\n}\n\n/**\n * ⚠️ THE TEST IS \"SOMETHING OUTSTANDING\", NOT \"SOME CHECKS\". A required review holds a\n * pull request open just as a required check does, so `requiredApprovals` with an empty\n * `checks` is a legitimate policy. What is refused is auto-merge over a ruleset that\n * will not hold anything back.\n */\nexport function assertAutoMergeWaits(input: {\n readonly autoMerge: boolean;\n readonly checkCount: number;\n readonly approvals: number | undefined;\n readonly enforcement: 'active' | 'disabled' | 'evaluate';\n}): void {\n if (!input.autoMerge) return;\n if (input.enforcement !== 'active') {\n throw new Error(\n [\n `repoPolicy: autoMerge with enforcement '${input.enforcement}' merges every pull request immediately.`,\n 'A ruleset that is not active enforces none of its rules, so auto-merge has nothing to wait for.',\n 'Pass autoMerge: false while the ruleset is being evaluated.',\n ].join(' '),\n );\n }\n if (input.checkCount === 0 && input.approvals === undefined) {\n throw new Error(\n [\n 'repoPolicy: autoMerge with nothing required merges every pull request immediately.',\n 'Name at least one always-reporting check context, or ask for requiredApprovals,',\n 'or pass autoMerge: false for a repository that has no green run to require yet.',\n ].join(' '),\n );\n }\n}\n",
6
6
  "/**\n * `repoPolicy` — one repository's house merge policy, as plain Alchemy props.\n *\n * ★ PURE ON PURPOSE, AND TYPE-ONLY IMPORTS. The exact shape a stack will deploy can be\n * asserted in a unit test with no credentials, no network and no Effect runtime.\n * `repo-policy.ts` is the thin half that turns these props into resources, and\n * `repo-policy-guards.ts` holds everything this refuses and why.\n *\n * ⛔ AUTO-MERGE WITH NOTHING TO WAIT FOR MERGES IMMEDIATELY. `gh pr merge --auto` is a\n * queue only while something is outstanding. Five different inputs produce \"nothing\n * outstanding\" — no `checks` and no `requiredApprovals`, an `enforcement` that is not\n * `active`, and three ways to land a ruleset that matches no ref (an empty `include`, a\n * blank ref pattern, an `exclude` that cancels every `include`). All five are refused.\n * See the guards module.\n *\n * ⛔ EVERY CONTEXT IN `checks` MUST ALWAYS REPORT. A required context that never reports\n * is not \"passed\", it is \"pending\", and the pull request waits on it forever —\n * auto-merge included. Point this at an aggregate job that runs `if: always()` and\n * fails when any upstream job did, never at a job behind a `paths:` filter, a matrix\n * leg, or anything a skipped workflow can silence.\n */\nimport type { RepositoryProps, RulesetProps } from 'alchemy/GitHub';\nimport {\n assertAutoMergeWaits,\n normalizeChecks,\n normalizeExclude,\n normalizeInclude,\n requireName,\n resolveApprovals,\n} from './repo-policy-guards.ts';\n\n/** Alchemy's own bypass-actor shape, re-exported so a caller imports one module, not two. */\nexport type RepoPolicyBypassActor = NonNullable<RulesetProps['bypassActors']>[number];\n\n/**\n * Repository fields the policy does NOT own — description, topics, visibility, …\n * ⛔ Merged UNDERNEATH the policy, so a caller can describe their repo but cannot quietly\n * re-enable merge commits through this door. The omitted keys are the policy itself.\n * ⛔ `baseUrl` IS OMITTED TOO, and is a top-level option instead. Setting it on only one\n * of the two resources would point the repository at a GitHub Enterprise host and its\n * ruleset at github.com — two halves of one policy on two different instances.\n */\nexport type RepoPolicyRepositorySettings = Omit<\n RepositoryProps,\n | 'allowAutoMerge'\n | 'allowMergeCommit'\n | 'allowRebaseMerge'\n | 'allowSquashMerge'\n | 'baseUrl'\n | 'deleteBranchOnMerge'\n | 'name'\n | 'owner'\n>;\n\nexport interface RepoPolicyOptions {\n /** Repository owner — a user or organization login. */\n readonly owner: string;\n /** Repository name. */\n readonly repository: string;\n /**\n * Status-check contexts a pull request must pass, named exactly as the job reports\n * them. Trimmed, de-duplicated and sorted, so re-ordering the list is not a diff.\n */\n readonly checks: readonly string[];\n /** @default true — with nothing required it is refused, not quietly downgraded. */\n readonly autoMerge?: boolean;\n /** @default 'main' */\n readonly rulesetName?: string;\n /** Ref patterns the ruleset covers. @default ['~DEFAULT_BRANCH'] */\n readonly include?: readonly string[];\n /**\n * Ref patterns exempted from it. @default []\n * ⛔ Exclusions win over inclusions, so one that cancels every `include` is refused —\n * it reads as a narrowing and acts as an off switch.\n */\n readonly exclude?: readonly string[];\n /** Who may bypass the ruleset. @default [] — nobody, administrators included. */\n readonly bypassActors?: readonly RepoPolicyBypassActor[];\n /**\n * Approving reviews a pull request needs. Omit for none — `0` is refused rather than\n * read as \"no reviews\"; `resolveApprovals` in the guards module says why.\n */\n readonly requiredApprovals?: number;\n /** @default 'active' — anything else is refused alongside `autoMerge`. */\n readonly enforcement?: 'active' | 'disabled' | 'evaluate';\n /** GitHub Enterprise host, applied to BOTH resources or to neither. */\n readonly baseUrl?: string;\n /** Everything about the repository that is not merge policy. */\n readonly settings?: RepoPolicyRepositorySettings;\n}\n\nexport interface RepoPolicy {\n readonly repository: RepositoryProps;\n readonly ruleset: RulesetProps;\n}\n\nconst DEFAULT_RULESET_NAME = 'main';\n/**\n * ★ `~DEFAULT_BRANCH`, NOT `refs/heads/main`. GitHub resolves it per repository, so one\n * policy covers a repo whose default branch is `master` or `trunk`, and renaming the\n * default branch later does not silently leave the ruleset pointing at nothing.\n */\nconst DEFAULT_INCLUDE: readonly string[] = ['~DEFAULT_BRANCH'];\n\n/**\n * The house policy for one repository: squash-only merges, auto-merge on, head branches\n * deleted, and a ruleset over the default branch that blocks deletion and force pushes\n * and requires `checks`.\n *\n * ★ `strictRequiredStatusChecksPolicy` IS ALWAYS FALSE, AND NOT A PARAMETER. \"Require\n * branches to be up to date\" means every merge to the default branch invalidates every\n * other open pull request, which with auto-merge on is a re-run storm that converges\n * only when the queue empties. The checks still have to pass; they just do not have to\n * have passed against the very tip.\n */\nexport function repoPolicy(options: RepoPolicyOptions): RepoPolicy {\n const owner = requireName('owner', options.owner);\n const repository = requireName('repository', options.repository);\n const checks = normalizeChecks(options.checks);\n const include = normalizeInclude(options.include, DEFAULT_INCLUDE);\n const exclude = normalizeExclude(options.exclude, include);\n const autoMerge = options.autoMerge ?? true;\n const enforcement = options.enforcement ?? 'active';\n const approvals = resolveApprovals(options.requiredApprovals);\n assertAutoMergeWaits({ approvals, autoMerge, checkCount: checks.length, enforcement });\n const host = options.baseUrl === undefined ? {} : { baseUrl: options.baseUrl };\n\n return {\n repository: {\n ...options.settings,\n ...host,\n // ⛔ Squash only. The ruleset's own `allowed_merge_methods` is not reachable through\n // Alchemy's `pullRequest` rule, so the repository is the only place this holds.\n allowAutoMerge: autoMerge,\n allowMergeCommit: false,\n allowRebaseMerge: false,\n allowSquashMerge: true,\n deleteBranchOnMerge: true,\n name: repository,\n owner,\n },\n ruleset: {\n ...host,\n bypassActors: [...(options.bypassActors ?? [])],\n conditions: { exclude, include },\n enforcement,\n name: options.rulesetName ?? DEFAULT_RULESET_NAME,\n owner,\n repository,\n rules: {\n deletion: true,\n nonFastForward: true,\n ...(approvals === undefined\n ? {}\n : {\n pullRequest: {\n dismissStaleReviewsOnPush: true,\n requiredApprovingReviewCount: approvals,\n },\n }),\n ...(checks.length === 0\n ? {}\n : {\n requiredStatusChecks: {\n checks: checks.map((context) => ({ context })),\n strictRequiredStatusChecksPolicy: false,\n },\n }),\n },\n target: 'branch',\n },\n };\n}\n",
@@ -15,11 +15,12 @@
15
15
  "/**\n * Props → wire form, and a canonical form for comparing two wire rulesets.\n *\n * ★ THE CANONICALIZATION IS THE NEVER-NOOP FIX. Upstream `GitHub.Ruleset#reconcile` compares\n * `desired` against the live GET with a raw `deepEqual` (see repository-ruleset.ts's header).\n * GitHub does not promise to echo `rules`, `allowed_merge_methods` or `checks` back in\n * request order, and a live `required_status_checks` check carries `integration_id: null`\n * where the request never sent the key at all — so an unsorted, un-normalized comparison\n * drifts against itself on every single plan. `canonicalizeWireRuleset` sorts every list that\n * has no meaningful order and drops nullish `integration_id` before two wire rulesets are\n * ever compared.\n */\nimport type {\n RepositoryRulesetProps,\n RepositoryRulesetPullRequestRule,\n RepositoryRulesetRules,\n RepositoryRulesetStatusChecksRule,\n} from './repository-ruleset.ts';\nimport type { CreateRulesetBody, WireRule } from './repository-ruleset-constraints.ts';\n\n/** Fixed, deterministic order — independent of the order keys were set on `props.rules` — so\n * two declarations of the same policy always produce the same wire array. */\nconst RULE_BUILD_ORDER = [\n 'creation',\n 'update',\n 'deletion',\n 'required_linear_history',\n 'required_signatures',\n 'non_fast_forward',\n 'pull_request',\n 'required_status_checks',\n] as const;\n\nfunction buildPullRequestRule(rule: RepositoryRulesetPullRequestRule): WireRule {\n return {\n type: 'pull_request',\n parameters: {\n required_approving_review_count: rule.requiredApprovingReviewCount ?? 0,\n dismiss_stale_reviews_on_push: rule.dismissStaleReviewsOnPush ?? false,\n require_code_owner_review: rule.requireCodeOwnerReview ?? false,\n require_last_push_approval: rule.requireLastPushApproval ?? false,\n required_review_thread_resolution: rule.requiredReviewThreadResolution ?? false,\n ...(rule.allowedMergeMethods === undefined\n ? {}\n : { allowed_merge_methods: [...rule.allowedMergeMethods] }),\n // Defaulted to `[]`, not omitted — GitHub's own GET always carries this key (empty when\n // unset), so omitting it here would make every live ruleset diff against itself forever.\n required_reviewers: (rule.requiredReviewers ?? []).map((r) => ({\n file_patterns: [...r.filePatterns],\n minimum_approvals: r.minimumApprovals,\n reviewer: { id: r.reviewer.actorId, type: r.reviewer.actorType },\n })),\n // Sent as declared, `true` or `false` (K1, 2026-09-23) — see repository-ruleset.ts's H15\n // for why this field exists here at all (Octokit, not distilled) and\n // repository-ruleset-wire.test.ts for whether Octokit forwards it untyped for both values.\n ...(rule.extraApprovalForUnattributedChanges === undefined\n ? {}\n : {\n require_extra_approval_for_unattributed_changes:\n rule.extraApprovalForUnattributedChanges,\n }),\n },\n // The extension field above has no home in Octokit's own rule union (H15) — the cast is\n // the only place that gap is bridged.\n } as WireRule;\n}\n\nfunction buildStatusChecksRule(rule: RepositoryRulesetStatusChecksRule): WireRule {\n return {\n type: 'required_status_checks',\n parameters: {\n required_status_checks: rule.checks.map((c) => ({\n context: c.context,\n ...(c.integrationId === undefined ? {} : { integration_id: c.integrationId }),\n })),\n strict_required_status_checks_policy: rule.strictRequiredStatusChecksPolicy ?? false,\n do_not_enforce_on_create: rule.doNotEnforceOnCreate ?? false,\n },\n };\n}\n\nexport function buildWireRules(rules: RepositoryRulesetRules | undefined): WireRule[] {\n const wire: WireRule[] = [];\n for (const type of RULE_BUILD_ORDER) {\n switch (type) {\n case 'creation':\n if (rules?.creation) wire.push({ type: 'creation' });\n break;\n case 'update':\n if (rules?.update) {\n wire.push({ type: 'update', parameters: { update_allows_fetch_and_merge: false } });\n }\n break;\n case 'deletion':\n if (rules?.deletion) wire.push({ type: 'deletion' });\n break;\n case 'required_linear_history':\n if (rules?.requiredLinearHistory) wire.push({ type: 'required_linear_history' });\n break;\n case 'required_signatures':\n if (rules?.requiredSignatures) wire.push({ type: 'required_signatures' });\n break;\n case 'non_fast_forward':\n if (rules?.nonFastForward) wire.push({ type: 'non_fast_forward' });\n break;\n case 'pull_request':\n if (rules?.pullRequest) wire.push(buildPullRequestRule(rules.pullRequest));\n break;\n case 'required_status_checks':\n if (rules?.requiredStatusChecks) {\n wire.push(buildStatusChecksRule(rules.requiredStatusChecks));\n }\n break;\n }\n }\n return wire;\n}\n\n/** The full desired wire body, minus `owner`/`repo` — sent verbatim to `createRepoRuleset` or\n * `updateRepoRuleset`. */\nexport function desiredWireRuleset(props: RepositoryRulesetProps): CreateRulesetBody {\n return {\n name: props.name,\n target: props.target ?? 'branch',\n enforcement: props.enforcement ?? 'active',\n bypass_actors: (props.bypassActors ?? []).map((a) => ({\n actor_type: a.actorType,\n // `exactOptionalPropertyTypes`: an always-present `actor_id: number | undefined` is not\n // assignable to the wire's `actor_id?: number | null` — the key must be ABSENT, not\n // present-with-`undefined`, when there is no id.\n ...(a.actorId === undefined ? {} : { actor_id: a.actorId }),\n bypass_mode: a.bypassMode ?? 'always',\n })),\n conditions: {\n ref_name: {\n include: [...(props.conditions?.include ?? ['~ALL'])].sort(),\n exclude: [...(props.conditions?.exclude ?? [])].sort(),\n },\n },\n rules: buildWireRules(props.rules),\n };\n}\n\nconst sortByJson = <T>(items: readonly T[]): T[] =>\n [...items].sort((a, b) => JSON.stringify(a).localeCompare(JSON.stringify(b)));\n\n/** Drop keys whose value is `null` or `undefined`, recursively — GitHub's GET fills\n * `integration_id: null` where the request never sent the key; this makes both read the same. */\n/**\n * ⚠️ SORTS OBJECT KEYS TOO, NOT ONLY ARRAY ELEMENTS. `JSON.stringify` preserves insertion\n * order, so `{a:1,b:2}` and `{b:2,a:1}` stringify to different text despite being the same\n * value — measured directly by this file's own lifecycle test: `desiredWireRuleset` and a\n * fixture built by spreading `{...liveRule, ...patch}` produced `parameters` keys in two\n * different orders and every downstream `JSON.stringify` equality check failed although the\n * values were identical. Sorting keys here is what makes the `JSON.stringify(canonicalize(x))\n * === JSON.stringify(canonicalize(y))` comparisons the rest of this family relies on\n * (repository-ruleset-reconcile.ts, and every canonicalize-based test) actually compare\n * VALUES rather than incidental key order.\n */\nfunction stripNullish(value: unknown): unknown {\n if (Array.isArray(value)) return value.map(stripNullish);\n if (value !== null && typeof value === 'object') {\n const out: Record<string, unknown> = {};\n for (const k of Object.keys(value).sort()) {\n const v = (value as Record<string, unknown>)[k];\n if (v !== null && v !== undefined) out[k] = stripNullish(v);\n }\n return out;\n }\n return value;\n}\n\nfunction canonicalizeRule(rule: Record<string, unknown>): Record<string, unknown> {\n const stripped = stripNullish(rule) as Record<string, unknown>;\n const params = stripped.parameters as Record<string, unknown> | undefined;\n if (params === undefined) return stripped;\n const next = { ...params };\n if (Array.isArray(next.allowed_merge_methods)) {\n next.allowed_merge_methods = [...(next.allowed_merge_methods as string[])].sort();\n }\n if (Array.isArray(next.required_status_checks)) {\n next.required_status_checks = sortByJson(\n next.required_status_checks as Record<string, unknown>[],\n );\n }\n return { ...stripped, parameters: next };\n}\n\n/**\n * Normalize a wire ruleset (desired OR observed) so two representations of the same policy\n * compare equal regardless of the order GitHub happens to echo lists back in.\n *\n * ⚠️ `input: unknown`, DELIBERATELY, NOT `CreateRulesetBody | RulesetRecord`. The two real\n * callers (our own request body, and GitHub's JSON response) are independently typed and\n * under `exactOptionalPropertyTypes` a shared structural interface fights both of them at\n * once for no safety this function actually uses — every field below is read defensively,\n * the same way a live GET already has to be, so a typed façade here would be decorative.\n */\nexport function canonicalizeWireRuleset(input: unknown): unknown {\n const r = (input ?? {}) as {\n name?: unknown;\n target?: unknown;\n enforcement?: unknown;\n bypass_actors?: readonly Record<string, unknown>[];\n conditions?: unknown;\n rules?: readonly Record<string, unknown>[];\n };\n return stripNullish({\n name: r.name,\n target: r.target ?? 'branch',\n enforcement: r.enforcement,\n bypass_actors: sortByJson(r.bypass_actors ?? []),\n conditions: r.conditions,\n rules: sortByJson((r.rules ?? []).map(canonicalizeRule)),\n });\n}\n",
16
16
  "/**\n * Everything `reconcile` refuses before it writes, and why. Extracted so\n * repository-ruleset.ts stays the wiring, and the reasoning stays whole — the same split\n * `repo-policy-guards.ts` uses for `declareRepoPolicy`.\n */\nimport * as Effect from 'effect/Effect';\nimport type { RepositoryRulesetProps } from './repository-ruleset.ts';\nimport { RULE_TYPE_COVERAGE, type RepositoryRuleType } from './repository-ruleset-constraints.ts';\nimport {\n BypassActorWidened,\n NeverReportedContext,\n RequiredChecksOmitted,\n UndeclaredLiveRule,\n} from './repository-ruleset-errors.ts';\nimport type { RulesetOctokit, RulesetRecord } from './repository-ruleset-probe.ts';\n\n/** Exported: repository-ruleset-narrowing-guards.ts reuses the identical key so a widened and a\n * narrowed actor are never computed by two independently-drifting definitions of \"the same\n * actor\". */\nexport const bypassKey = (a: { actor_type: unknown; actor_id: unknown; bypass_mode?: unknown }) =>\n `${String(a.actor_type)}:${String(a.actor_id ?? '')}:${String(a.bypass_mode ?? 'always')}`;\n\n/**\n * ⛔ A CREATE REQUIRES `[]`; `undefined` on a create is the same thing (nothing live to widen\n * from). On an update/adopt, `undefined` means unmanaged — the caller never sees this guard\n * because repository-ruleset.ts sends the LIVE value back unchanged in that case, and this\n * function is only called when `props.bypassActors` is explicitly declared.\n */\nexport function bypassWideningRefusal(input: {\n readonly owner: string;\n readonly repository: string;\n readonly name: string;\n readonly declared: RepositoryRulesetProps['bypassActors'];\n readonly live: RulesetRecord | undefined;\n}): BypassActorWidened | undefined {\n // A create may declare any bypass list — nothing live to widen against.\n if (input.live === undefined) return undefined;\n const liveActors = (input.live.bypass_actors ?? []) as {\n actor_type: unknown;\n actor_id: unknown;\n bypass_mode?: unknown;\n }[];\n const liveKeys = new Set(liveActors.map(bypassKey));\n const widened = (input.declared ?? [])\n .map((a) =>\n bypassKey({\n actor_type: a.actorType,\n actor_id: a.actorId,\n bypass_mode: a.bypassMode ?? 'always',\n }),\n )\n .filter((k) => !liveKeys.has(k));\n if (widened.length === 0) return undefined;\n return new BypassActorWidened({\n owner: input.owner,\n repository: input.repository,\n name: input.name,\n widened,\n });\n}\n\n/** Exported for the same reason as `bypassKey` — repository-ruleset-narrowing-guards.ts's\n * `ruleNarrowingRefusal` needs the identical live-type set `undeclaredLiveRuleRefusal` computes,\n * not a second reading of `live.rules` that could disagree with this one. */\nexport const liveRuleTypes = (live: RulesetRecord | undefined): Set<string> =>\n new Set((live?.rules ?? []).map((r) => String(r.type)));\n\n/**\n * Refuses (a) any live rule of a REFUSED type — this resource can never represent it, and the\n * PUT replaces `rules` wholesale, so silence would drop it; and (b) ANY live rule of a MODELED\n * type the declaration is silent about — same hazard, for every rule this resource owns.\n *\n * ⚠️ `declaredTypes` MUST BE PRESENCE, NOT TRUTHINESS — this is the fix for a real bug this\n * family's own design first shipped with. A plain `rules?.deletion` check cannot distinguish\n * \"omitted\" from \"declared `false`\", so `undeclaredLiveRuleRefusal` originally exempted every\n * boolean rule (`creation`/`update`/`deletion`/`requiredLinearHistory`/`requiredSignatures`/\n * `nonFastForward`) as \"fully owned — omission IS the removal\". Concretely, that meant: a\n * live ruleset has `deletion: true` (blocks branch deletion); a caller declares this resource\n * with `rules: { pullRequest: {...}, requiredStatusChecks: {...} }`, simply forgetting\n * `deletion: true` — an easy mistake, since omitting an optional boolean is not a type error.\n * The wholesale PUT would have sent `rules` without a `deletion` entry, silently REMOVING\n * branch-deletion protection on the very next `reconcile` — exactly the hazard this whole\n * guard exists to prevent, reached through the one door it left open. Found by a self-review\n * pass (no subagent available in this harness), not by a test; there is now one:\n * repository-ruleset-write-refusals.test.ts's \"an omitted boolean rule\" case.\n * `required_status_checks` still gets its own, better-worded `RequiredChecksOmitted` from\n * {@link requiredChecksOmissionRefusal} and is excluded here so it is not refused twice.\n */\nexport function undeclaredLiveRuleRefusal(input: {\n readonly owner: string;\n readonly repository: string;\n readonly name: string;\n readonly live: RulesetRecord | undefined;\n readonly declaredTypes: ReadonlySet<string>;\n}): UndeclaredLiveRule | undefined {\n for (const type of liveRuleTypes(input.live)) {\n const coverage = RULE_TYPE_COVERAGE[type as RepositoryRuleType];\n if (coverage === 'refused') {\n return new UndeclaredLiveRule({\n owner: input.owner,\n repository: input.repository,\n name: input.name,\n ruleType: type,\n });\n }\n if (\n coverage === 'modeled' &&\n type !== 'required_status_checks' &&\n !input.declaredTypes.has(type)\n ) {\n return new UndeclaredLiveRule({\n owner: input.owner,\n repository: input.repository,\n name: input.name,\n ruleType: type,\n });\n }\n }\n return undefined;\n}\n\n/** The wire `type` for every rule key present ON THE DECLARATION OBJECT ITSELF — `Object.hasOwn`,\n * not truthiness, so `{ deletion: false }` (an explicit, deliberate removal) counts as declared\n * and a bare omission does not. Feeds `undeclaredLiveRuleRefusal`'s `declaredTypes`. */\nexport function declaredRuleTypes(rules: RepositoryRulesetProps['rules']): ReadonlySet<string> {\n if (rules === undefined) return new Set();\n const BOOLEAN_KEY_TO_TYPE: Record<string, string> = {\n creation: 'creation',\n update: 'update',\n deletion: 'deletion',\n requiredLinearHistory: 'required_linear_history',\n requiredSignatures: 'required_signatures',\n nonFastForward: 'non_fast_forward',\n };\n const types = new Set<string>();\n for (const [key, type] of Object.entries(BOOLEAN_KEY_TO_TYPE)) {\n if (Object.hasOwn(rules, key)) types.add(type);\n }\n if (Object.hasOwn(rules, 'pullRequest')) types.add('pull_request');\n return types;\n}\n\n/** `requiredStatusChecks: undefined` while the live ruleset HAS one → refused, naming the live\n * contexts. `requiredStatusChecks: false` is the declared removal and never reaches here. */\nexport function requiredChecksOmissionRefusal(input: {\n readonly owner: string;\n readonly repository: string;\n readonly name: string;\n readonly declared: RepositoryRulesetProps['rules'];\n readonly live: RulesetRecord | undefined;\n}): RequiredChecksOmitted | undefined {\n if (input.declared?.requiredStatusChecks !== undefined) return undefined;\n const liveRule = (input.live?.rules ?? []).find((r) => r.type === 'required_status_checks');\n if (liveRule === undefined) return undefined;\n const params = liveRule.parameters as\n | { required_status_checks?: { context: string }[] }\n | undefined;\n const liveContexts = (params?.required_status_checks ?? []).map((c) => c.context);\n return new RequiredChecksOmitted({\n owner: input.owner,\n repository: input.repository,\n name: input.name,\n liveContexts,\n });\n}\n\n/** Every context in the declared `requiredStatusChecks` that the LIVE ruleset does not already\n * require — i.e. being added by this plan, the only case a never-reported context can matter. */\nexport const newlyRequiredContexts = (\n declared: RepositoryRulesetProps['rules'],\n live: RulesetRecord | undefined,\n): readonly string[] => {\n if (declared?.requiredStatusChecks === false || declared?.requiredStatusChecks === undefined)\n return [];\n const liveRule = (live?.rules ?? []).find((r) => r.type === 'required_status_checks');\n const liveParams = liveRule?.parameters as\n | { required_status_checks?: { context: string }[] }\n | undefined;\n const liveContexts = new Set((liveParams?.required_status_checks ?? []).map((c) => c.context));\n return declared.requiredStatusChecks.checks\n .map((c) => c.context)\n .filter((c) => !liveContexts.has(c));\n};\n\n/** Fails on the first newly-required context that has never reported success anywhere this\n * family looks (the default branch's tip, then recent merged PR heads — K2) — checked once here\n * (reconcile's observe step) and again by the standalone checker. */\nexport const refuseUnreportedContexts = <R = never>(\n octokit: RulesetOctokit<R>,\n owner: string,\n repo: string,\n contexts: readonly string[],\n): Effect.Effect<void, NeverReportedContext | Error, R> =>\n Effect.gen(function* () {\n for (const context of contexts) {\n const reported = yield* octokit.hasContextReportedSuccess({ owner, repo, context });\n if (!reported) {\n return yield* Effect.fail(new NeverReportedContext({ owner, repository: repo, context }));\n }\n }\n });\n",
17
17
  "/**\n * Narrowing refusals — the counterpart to `bypassWideningRefusal`/`undeclaredLiveRuleRefusal` in\n * repository-ruleset-guards.ts, split into its own file purely to keep both under the 250-line\n * cap (same reason repository-ruleset-props.ts exists).\n *\n * ⛔ WIDENING STAYS UNCONDITIONAL; NARROWING GETS AN ESCAPE HATCH. Widening bypass (granting a\n * NEW actor) has no legitimate reason to happen through a deploy — \"grant it by hand and adopt\n * the change\" (repository-ruleset-errors.ts's `BypassActorWidened` message) already covers it,\n * and this file does not touch that guard. NARROWING (removing a live bypass actor, or\n * dropping a live rule) is different: it is exactly what an EXACT-ADOPT declaration of a repo\n * whose live ruleset is narrower than the house baseline needs to express on its very first\n * deploy — a caller declaring `taslabs-net/taslabs-net`'s live shape (measured live via `gh\n * api repos/taslabs-net/taslabs-net/rulesets/12206080`, 2026-09-23: `bypass_actors:\n * [{actor_id: 5, actor_type: \"RepositoryRole\", bypass_mode: \"always\"}]`, `rules: [deletion,\n * non_fast_forward]`, no `pull_request` rule) is not narrowing anything by declaring exactly\n * that shape — it is matching live exactly, and `reconcileRuleset`'s own noop check (comparing\n * canonicalized wire forms) makes zero writes for it, same as any other exact match. What\n * these guards refuse is a LATER declaration that removes something the CURRENT live state\n * still has, without saying why. `acknowledgeBypassNarrowing`/`acknowledgeRuleNarrowing` are\n * the \"why\": a reasoned, deliberate sign-off, not a rubber stamp — see their doc comments on\n * `RepositoryRulesetProps` (repository-ruleset-props.ts).\n *\n * ⛔ THE TWO ACKNOWLEDGEMENTS ARE DELIBERATELY SEPARATE PROPS, NOT ONE SHARED FLAG (2026-09-23\n * review finding). A single `acknowledgeNarrowing` computed once and handed to both guards let\n * a reason written for one kind of narrowing silently also excuse the other — a declaration\n * dropping BOTH a live rule and a live bypass actor at once needed only one acknowledgement,\n * however narrowly worded, to pass both checks. Each guard below now reads its OWN prop.\n */\nimport { bypassKey, liveRuleTypes } from './repository-ruleset-guards.ts';\nimport { BypassActorNarrowed, RuleNarrowed } from './repository-ruleset-errors.ts';\nimport type { RepositoryRulesetProps, RepositoryRulesetRules } from './repository-ruleset-props.ts';\nimport type { RulesetRecord } from './repository-ruleset-probe.ts';\n\n/** `true` only for a non-empty, non-whitespace `reason` on `acknowledgeBypassNarrowing` — a bare\n * `{}` or a blank string is not an acknowledgement (repository-ruleset.ts's `constraintRefusal`\n * refuses the latter at plan time; this is the read `bypassNarrowingRefusal` shares). Deliberately\n * ignorant of `acknowledgeRuleNarrowing` — see the file header. */\nexport const isBypassNarrowingAcknowledged = (props: RepositoryRulesetProps): boolean =>\n props.acknowledgeBypassNarrowing !== undefined &&\n props.acknowledgeBypassNarrowing.reason.trim().length > 0;\n\n/** The `rules`-side counterpart to `isBypassNarrowingAcknowledged`, reading only\n * `acknowledgeRuleNarrowing` — see the file header. */\nexport const isRuleNarrowingAcknowledged = (props: RepositoryRulesetProps): boolean =>\n props.acknowledgeRuleNarrowing !== undefined &&\n props.acknowledgeRuleNarrowing.reason.trim().length > 0;\n\n/**\n * A live bypass actor the declaration drops, unacknowledged. `undefined` `declared` never\n * reaches here — same rule as `bypassWideningRefusal`: unmanaged means the live value is\n * preserved unchanged (repository-ruleset-reconcile.ts), so there is nothing to narrow.\n */\nexport function bypassNarrowingRefusal(input: {\n readonly owner: string;\n readonly repository: string;\n readonly name: string;\n readonly declared: RepositoryRulesetProps['bypassActors'];\n readonly live: RulesetRecord | undefined;\n readonly acknowledged: boolean;\n}): BypassActorNarrowed | undefined {\n if (input.acknowledged) return undefined;\n if (input.live === undefined) return undefined;\n const liveActors = (input.live.bypass_actors ?? []) as {\n actor_type: unknown;\n actor_id: unknown;\n bypass_mode?: unknown;\n }[];\n const declaredKeys = new Set(\n (input.declared ?? []).map((a) =>\n bypassKey({\n actor_type: a.actorType,\n actor_id: a.actorId,\n bypass_mode: a.bypassMode ?? 'always',\n }),\n ),\n );\n const narrowed = liveActors.map(bypassKey).filter((k) => !declaredKeys.has(k));\n if (narrowed.length === 0) return undefined;\n return new BypassActorNarrowed({\n owner: input.owner,\n repository: input.repository,\n name: input.name,\n narrowed,\n });\n}\n\n/** The live rule `type` for the first boolean/`pullRequest` rule the declaration marks `false`\n * while live still has it — `undefined` when none does. `requiredStatusChecks: false` is\n * checked by the caller directly (its live-side read needs `required_status_checks`'s own\n * parameters shape, not just presence, elsewhere in this family — kept out of this helper so it\n * stays a plain type-to-type comparison). */\nfunction droppedBooleanOrPullRequestType(\n rules: RepositoryRulesetRules,\n live: ReadonlySet<string>,\n): string | undefined {\n const declaredFalse: readonly [boolean | undefined, string][] = [\n [rules.creation, 'creation'],\n [rules.update, 'update'],\n [rules.deletion, 'deletion'],\n [rules.requiredLinearHistory, 'required_linear_history'],\n [rules.requiredSignatures, 'required_signatures'],\n [rules.nonFastForward, 'non_fast_forward'],\n ];\n for (const [declared, type] of declaredFalse) {\n if (declared === false && live.has(type)) return type;\n }\n if (rules.pullRequest === false && live.has('pull_request')) return 'pull_request';\n return undefined;\n}\n\n/**\n * A rule the declaration explicitly marks absent (a boolean rule or `pullRequest` declared\n * `false`, or `requiredStatusChecks: false`) while the LIVE ruleset still has it, unacknowledged\n * — the drop `undeclaredLiveRuleRefusal` (repository-ruleset-guards.ts) never sees, because an\n * explicit `false` IS \"declared\" there (see its own `declaredRuleTypes`).\n */\nexport function ruleNarrowingRefusal(input: {\n readonly owner: string;\n readonly repository: string;\n readonly name: string;\n readonly declared: RepositoryRulesetProps['rules'];\n readonly live: RulesetRecord | undefined;\n readonly acknowledged: boolean;\n}): RuleNarrowed | undefined {\n if (input.acknowledged) return undefined;\n const rules = input.declared;\n if (rules === undefined) return undefined;\n const live = liveRuleTypes(input.live);\n const ruleType =\n droppedBooleanOrPullRequestType(rules, live) ??\n (rules.requiredStatusChecks === false && live.has('required_status_checks')\n ? 'required_status_checks'\n : undefined);\n if (ruleType === undefined) return undefined;\n return new RuleNarrowed({\n owner: input.owner,\n repository: input.repository,\n name: input.name,\n ruleType,\n });\n}\n",
18
- "/**\n * The house GitHub baseline, as plain data — the VALUES section of the GitHub-baseline plan\n * (2026-09-23), and nothing else. No provider import (S9's \"pure core\" pattern, the same split\n * repo-policy-form.ts uses): `declare-repo-baseline.ts` turns this into resources, and\n * `hf-repo-baseline-check.ts` reads it read-only against a live repo. Both import THIS file so\n * neither can drift from the other.\n *\n * ⚠️ IDENTICAL FOR PRIVATE AND PUBLIC, except the fields this module marks `publicOnly` —\n * `security_and_analysis` is `null` on every private repo this estate has (LIVE SURVEY,\n * 2026-09-23), so secret scanning / push protection / private vulnerability reporting are\n * not settable there at all, not merely off.\n */\n\nexport interface RepoBaselineInput {\n readonly owner: string;\n readonly repository: string;\n readonly checks: readonly string[];\n readonly visibility: 'public' | 'private';\n readonly description?: string;\n}\n\n/** `GitHub.Repository` fields this baseline owns. Every merge-automation caller across the 17\n * tray checkouts uses `--squash` (measured 2026-09-23; the only non-squash mentions are\n * GitLab-era comments in cliff.toml), so squash-only is not a per-repo choice.\n *\n * ⛔ K5 (2026-09-24): `allowAutoMerge` FOLLOWS `checks.length`, NOT A HARDCODED `true`. `gh pr\n * merge --auto` (and the ruleset's own auto-merge) is a queue only while something is\n * outstanding — with zero required status checks there is nothing to wait for, so GitHub\n * merges a CLEAN pull request on the spot, with no review and no green run. This is the same\n * failure `repo-policy-guards.ts`'s `assertAutoMergeWaits` refuses on the sibling `repoPolicy`\n * path (five doors to the same \"nothing outstanding\" state); this baseline has no `autoMerge`\n * opt-out prop to refuse WITH, so the fix here is unconditional rather than a thrown refusal —\n * a repo with an empty `checks` list simply never gets auto-merge turned on by this baseline. */\nexport function repoBaselineSettings(input: RepoBaselineInput) {\n return {\n owner: input.owner,\n name: input.repository,\n ...(input.description === undefined ? {} : { description: input.description }),\n visibility: input.visibility,\n allowSquashMerge: true,\n allowMergeCommit: false,\n allowRebaseMerge: false,\n allowAutoMerge: input.checks.length > 0,\n deleteBranchOnMerge: true,\n hasWiki: false,\n };\n}\n\n/** `GitHub.RepositoryRuleset` `main` — target branch, 0-approval solo-maintainer shape, the\n * named `checks` required, squash-only at the ruleset level too (H15's whole reason to exist:\n * the repository setting can be re-ticked in the UI; the ruleset is what actually enforces it). */\nexport function repoBaselineRuleset(input: RepoBaselineInput) {\n return {\n owner: input.owner,\n repository: input.repository,\n name: 'main',\n target: 'branch' as const,\n enforcement: 'active' as const,\n bypassActors: [],\n conditions: { include: ['~DEFAULT_BRANCH'], exclude: [] },\n rules: {\n deletion: true,\n nonFastForward: true,\n pullRequest: {\n requiredApprovingReviewCount: 0,\n dismissStaleReviewsOnPush: true,\n requireCodeOwnerReview: false,\n requireLastPushApproval: false,\n requiredReviewThreadResolution: false,\n allowedMergeMethods: ['squash' as const],\n extraApprovalForUnattributedChanges: false as const,\n },\n ...(input.checks.length === 0\n ? {}\n : {\n requiredStatusChecks: {\n checks: input.checks.map((context) => ({ context })),\n strictRequiredStatusChecksPolicy: false,\n doNotEnforceOnCreate: false,\n },\n }),\n },\n };\n}\n\n/** Public-only settings this baseline asserts but cannot express through either resource above\n * at `alchemy@2.0.0-beta.79` — recorded for the wave-3 handoff artifact (plan section 2), not\n * declared anywhere. Both already measured ON for `kit` (LIVE SURVEY 2026-09-23); `builds` is\n * the gap. */\nexport const PUBLIC_ONLY_UNDECLARABLE = [\n 'secret_scanning: enabled',\n 'secret_scanning_push_protection: enabled',\n 'private_vulnerability_reporting: enabled',\n \"fork-PR approval: 'first_time_contributors'\",\n] as const;\n",
18
+ "/**\n * The house GitHub baseline, as plain data — the VALUES section of the GitHub-baseline plan\n * (2026-09-23), and nothing else. No provider import (S9's \"pure core\" pattern, the same split\n * repo-policy-form.ts uses): `declare-repo-baseline.ts` turns this into resources, and\n * `hf-repo-baseline-check.ts` reads it read-only against a live repo. Both import THIS file so\n * neither can drift from the other.\n *\n * ⚠️ IDENTICAL FOR PRIVATE AND PUBLIC, except the fields this module marks `publicOnly` —\n * `security_and_analysis` is `null` on every private repo this estate has (LIVE SURVEY,\n * 2026-09-23), so secret scanning / push protection / private vulnerability reporting are\n * not settable there at all, not merely off.\n */\n\nexport interface RepoBaselineInput {\n readonly owner: string;\n readonly repository: string;\n readonly checks: readonly string[];\n readonly visibility: 'public' | 'private';\n readonly description?: string;\n}\n\n/** `GitHub.Repository` fields this baseline owns. Every merge-automation caller across the 17\n * tray checkouts uses `--squash` (measured 2026-09-23; the only non-squash mentions are\n * GitLab-era comments in cliff.toml), so squash-only is not a per-repo choice.\n *\n * ⛔ K5 (2026-09-24): `allowAutoMerge` FOLLOWS `checks.length`, NOT A HARDCODED `true`. `gh pr\n * merge --auto` (and the ruleset's own auto-merge) is a queue only while something is\n * outstanding — with zero required status checks there is nothing to wait for, so GitHub\n * merges a CLEAN pull request on the spot, with no review and no green run. This is the same\n * failure `repo-policy-guards.ts`'s `assertAutoMergeWaits` refuses on the sibling `repoPolicy`\n * path (five doors to the same \"nothing outstanding\" state); this baseline has no `autoMerge`\n * opt-out prop to refuse WITH, so the fix here is unconditional rather than a thrown refusal —\n * a repo with an empty `checks` list simply never gets auto-merge turned on by this baseline. */\nexport function repoBaselineSettings(input: RepoBaselineInput) {\n return {\n owner: input.owner,\n name: input.repository,\n ...(input.description === undefined ? {} : { description: input.description }),\n visibility: input.visibility,\n allowSquashMerge: true,\n allowMergeCommit: false,\n allowRebaseMerge: false,\n allowAutoMerge: input.checks.length > 0,\n deleteBranchOnMerge: true,\n hasWiki: false,\n };\n}\n\n/** `GitHub.RepositoryRuleset` `main` — target branch, 0-approval solo-maintainer shape, the\n * named `checks` required, squash-only at the ruleset level too (H15's whole reason to exist:\n * the repository setting can be re-ticked in the UI; the ruleset is what actually enforces it). */\nexport function repoBaselineRuleset(input: RepoBaselineInput) {\n return {\n owner: input.owner,\n repository: input.repository,\n name: 'main',\n target: 'branch' as const,\n enforcement: 'active' as const,\n bypassActors: [],\n conditions: { include: ['~DEFAULT_BRANCH'], exclude: [] },\n rules: {\n deletion: true,\n nonFastForward: true,\n pullRequest: {\n requiredApprovingReviewCount: 0,\n dismissStaleReviewsOnPush: true,\n requireCodeOwnerReview: false,\n requireLastPushApproval: false,\n requiredReviewThreadResolution: false,\n allowedMergeMethods: ['squash' as const],\n extraApprovalForUnattributedChanges: false as const,\n },\n ...(input.checks.length === 0\n ? {}\n : {\n requiredStatusChecks: {\n checks: input.checks.map((context) => ({ context })),\n strictRequiredStatusChecksPolicy: false,\n doNotEnforceOnCreate: false,\n },\n }),\n },\n };\n}\n\n/** Public-only settings this baseline asserts but cannot express through either resource above\n * at `alchemy@2.0.0-beta.79` — recorded for the wave-3 handoff artifact (plan section 2), not\n * declared anywhere. Both already measured ON for `kit` (LIVE SURVEY 2026-09-23); `builds` is\n * the gap. Fork-PR approval left this list on 2026-10-14: `ForkPrApproval` (fork-pr-approval.ts)\n * declares it. */\nexport const PUBLIC_ONLY_UNDECLARABLE = [\n 'secret_scanning: enabled',\n 'secret_scanning_push_protection: enabled',\n 'private_vulnerability_reporting: enabled',\n] as const;\n",
19
19
  "/**\n * `declareRepoBaseline` — the house GitHub baseline (repo-baseline-data.ts), as resources.\n *\n * const baseline = yield* declareRepoBaseline('api', {\n * owner: 'taslabs-net',\n * repository: 'api',\n * checks: ['ci', 'secret scan'],\n * visibility: 'private',\n * });\n *\n * Provide `repoPolicyProviders()` (repository-ruleset-providers.ts) — this subpath ships no\n * provider of its own beyond the ruleset bridge, the same as `declareRepoPolicy`. Both resources\n * are `retain` and `adopt(true)` ALWAYS, unlike `declareRepoPolicy`'s optional `adopt` — a\n * baseline this widely shared is meant for a checkout adopting the estate's existing repository\n * and ruleset by name, never for creating one out from under a caller who forgot the flag (H1: a\n * name match is not ours until adopted).\n *\n * ⛔ NO IMPORT FROM `@homeflare/config`, either direction — see `renderRepoShape`'s own header\n * in `packages/config/src/repo-shape/render.ts`. A caller spreads `renderRepoShape(shape)\n * .policy` into these options itself; `checks` only needs to be `readonly string[]`.\n *\n * ⛔ APPLY ORDER: `allowAutoMerge` NEVER GOES LIVE BEFORE THE RULESET IT WAITS ON. When `checks`\n * is non-empty, the ruleset is declared and applied FIRST, and the repository's `allowAutoMerge`\n * is threaded through `gateAutoMergeOnRuleset` (repo-auto-merge-gate.ts) so Alchemy's own\n * Output-in-props ordering — not declaration order — makes the engine wait for it. See that\n * file's header for the full mechanism, the K5 hazard it closes, and why the reverse direction\n * (checks removed) needs no matching edge.\n * ⚠️ A REPOSITORY THAT DOES NOT YET EXIST: `adopt(true)` above does NOT refuse to create — with\n * nothing live to adopt, Alchemy creates from scratch regardless (`AdoptPolicy`'s own contract:\n * `undefined` observed state means create, adopt policy or not). The paragraph above says this\n * baseline is \"never for creating one out from under a caller who forgot the flag\", but nothing\n * enforces that; it is the caller's discipline, not this function's. If it IS ever called for a\n * repo+ruleset that do not exist yet with `checks` non-empty from day one, the forced\n * ruleset-first order above now makes the ruleset's create fail — GitHub's own ruleset API\n * 404s on a repository that does not exist — instead of racing. That failure is explicit and\n * tested (declare-repo-baseline-apply-order.test.ts's \"created together\" case), not a silent\n * fail-open, but it is still a real usability regression for that one scenario: create the bare\n * repository first (a prior deploy, or a separate `GitHub.Repository` call).\n */\nimport { adopt } from 'alchemy/AdoptPolicy';\nimport * as GitHub from 'alchemy/GitHub';\nimport * as RemovalPolicy from 'alchemy/RemovalPolicy';\nimport * as Effect from 'effect/Effect';\nimport {\n type RepoBaselineInput,\n repoBaselineRuleset,\n repoBaselineSettings,\n} from './repo-baseline-data.ts';\nimport { gateAutoMergeOnRuleset } from './repo-auto-merge-gate.ts';\nimport { RepositoryRuleset } from './repository-ruleset.ts';\n\nexport interface DeclareRepoBaselineOptions extends RepoBaselineInput {}\n\nexport const declareRepoBaseline = (id: string, options: DeclareRepoBaselineOptions) =>\n Effect.gen(function* () {\n const owned = <A, R>(resource: Effect.Effect<A, never, R>) =>\n resource.pipe(RemovalPolicy.retain(), adopt(true));\n const settings = repoBaselineSettings(options);\n\n // Auto-merge is turning on (or staying on): declare and apply the ruleset FIRST, so its\n // rulesetId is available to gate the repository's allowAutoMerge — see the file header.\n if (settings.allowAutoMerge) {\n const ruleset = yield* owned(\n RepositoryRuleset(`${id}-ruleset`, repoBaselineRuleset(options)),\n );\n const repository = yield* owned(\n GitHub.Repository(id, gateAutoMergeOnRuleset(settings, ruleset)),\n );\n return { repository, ruleset };\n }\n\n const repository = yield* owned(GitHub.Repository(id, settings));\n const ruleset = yield* owned(RepositoryRuleset(`${id}-ruleset`, repoBaselineRuleset(options)));\n return { repository, ruleset };\n });\n",
20
- "/**\n * `repoPolicyProviders` — the documented stack wiring for `RepositoryRuleset` (directly, or\n * through `declareRepoPolicy` / `declareRepoBaseline`): `GitHub.providers()` and\n * `RepositoryRulesetProvider()`, composed so the whole thing typechecks and needs nothing\n * further from the stack.\n *\n * providers: repoPolicyProviders()\n *\n * ⛔ WHY THIS EXISTS — MEASURED 2026-09-24 (homeflare-builds bump PR 6, tsc). Writing the two\n * providers side by side, `Layer.mergeAll(GitHub.providers(), RepositoryRulesetProvider())`,\n * type-errors: `RepositoryRulesetProvider()`'s handlers call `octokitFor`, which needs\n * `GitHubCredentials` — a requirement of the PROVIDER's layer, correctly inferred by\n * `Provider.succeed` from `repositoryRulesetHandlers` in repository-ruleset.ts. Merging two\n * layers does not thread one's output into the other's requirement; `RepositoryRulesetProvider()`\n * still needs `GitHubCredentials` fed in. `GitHub.providers()` is the only thing here that\n * resolves credentials (env, stored PAT, `gh` CLI, or OAuth — see `alchemy/src/GitHub/\n * Providers.ts`), and — because it chains `Layer.provideMerge(Credentials.fromAuthProvider(…))`\n * internally rather than `Layer.provide` — its own OUTPUT includes `GitHubCredentials`\n * alongside `GitHub.Providers`. `Layer.provideMerge(github)` on `RepositoryRulesetProvider()`\n * both supplies that requirement AND keeps `github`'s own output merged in for any\n * `GitHub.Repository`/`GitHub.Ruleset` the caller also declares. `github` is built once and\n * referenced twice below — Effect's layer memoization (by reference) builds it once, not\n * twice, not twice against the auth provider either.\n *\n * ★ THIS IS ONLY HALF OF 2026-09-24's FIX. The other half — `RepositoryRuleset`'s own `Resource<>`\n * declaration no longer naming `GitHubCredentials` in its 5th (`Providers`) slot — lives in\n * repository-ruleset.ts's file header; that half is what let a stack BODY calling\n * `declareRepoPolicy`/`declareRepoBaseline` typecheck at all. Composing the providers\n * correctly, as this function does, does not by itself fix a body that still requires\n * `GitHubCredentials` directly.\n *\n * ⚠️ DON'T ALSO MERGE A SEPARATE `GitHub.providers()` CALL IN. `github` here is one Layer\n * object referenced twice, which Effect's layer memoization (by reference, ADVERSARIAL\n * REVIEW 2026-09-24: confirmed against `effect@4.0.0-rc.115`'s own `MemoMap`) builds once. A\n * stack that ALSO writes its own `GitHub.providers()` alongside this function's result is a\n * second, distinct Layer object — a genuine second credential resolution, not shared with\n * this one. Get every GitHub resource's providers from this one call.\n */\nimport * as GitHub from 'alchemy/GitHub';\nimport * as Layer from 'effect/Layer';\nimport { RepositoryRulesetProvider } from './repository-ruleset.ts';\n\nexport const repoPolicyProviders = (options?: GitHub.ProvidersOptions) => {\n const github = GitHub.providers(options);\n return Layer.mergeAll(github, RepositoryRulesetProvider().pipe(Layer.provideMerge(github)));\n};\n"
20
+ "/**\n * `GitHub.ForkPrApproval` — a repository's \"approval for running fork pull request workflows\n * from contributors\" setting, as a declared resource.\n *\n * ★ WHY IT EXISTS (Tim, 2026-10-14 01:28 ET). `PUBLIC_ONLY_UNDECLARABLE` (repo-baseline-data.ts)\n * listed this setting as something no resource could express. homeflare-kit moved onto the\n * self-hosted pve pool, and homeflare-mini's ci-runner serves a public repo only while this\n * setting is `all_external_contributors` (its `PUBLIC_RUNNER_REPOS`, fail-closed) — a fork's\n * code must not reach the LAN runner without a maintainer's click. So the setting is now code.\n *\n * ⚠️ ONE ENDPOINT PAIR, NOTHING ELSE. `GET`/`PUT /repos/{owner}/{repo}/actions/permissions/\n * fork-pr-contributor-approval`. The setting always exists, so there is no create and no delete:\n * `reconcile` PUTs the declared policy and reads it back; `delete` leaves the live setting as it\n * is (the default removal policy is `retain`, and dropping a declaration must never loosen it).\n * ⛔ ADOPT, NEVER CLAIM SILENTLY. With no prior state `read` returns the live value as `Unowned`,\n * so a stack has to `adopt(true)` it on purpose — the same convention as `RepositoryRuleset`.\n * ⛔ READ BACK. A PUT that GitHub accepts but does not store is reported, not trusted: the\n * reconcile re-reads and fails on a mismatch.\n */\nimport { Resource } from 'alchemy';\nimport { Unowned } from 'alchemy/AdoptPolicy';\nimport { isResolved } from 'alchemy/Diff';\nimport { GitHubCredentials } from 'alchemy/GitHub';\nimport * as Provider from 'alchemy/Provider';\nimport * as Effect from 'effect/Effect';\n\n/** GitHub's three values, most to least permissive. */\nexport const FORK_PR_APPROVAL_POLICIES = [\n 'first_time_contributors_new_to_github',\n 'first_time_contributors',\n 'all_external_contributors',\n] as const;\n\nexport type ForkPrApprovalPolicy = (typeof FORK_PR_APPROVAL_POLICIES)[number];\n\nexport interface ForkPrApprovalProps {\n readonly owner: string;\n readonly repository: string;\n readonly approvalPolicy: ForkPrApprovalPolicy;\n /** GitHub Enterprise API base; omit for github.com. */\n readonly baseUrl?: string;\n}\n\nexport interface ForkPrApprovalAttributes {\n readonly owner: string;\n readonly repository: string;\n readonly approvalPolicy: string;\n}\n\nexport interface ForkPrApproval extends Resource<\n 'GitHub.ForkPrApproval',\n ForkPrApprovalProps,\n ForkPrApprovalAttributes,\n never\n> {}\n\nexport const ForkPrApproval = Resource<ForkPrApproval>('GitHub.ForkPrApproval', {\n defaultRemovalPolicy: 'retain',\n});\n\n/** The two calls this resource makes, so tests can hand it a fake. */\nexport interface ForkPrApprovalClient<R = never> {\n readonly get: (owner: string, repo: string) => Effect.Effect<string, Error, R>;\n readonly put: (\n owner: string,\n repo: string,\n policy: ForkPrApprovalPolicy,\n ) => Effect.Effect<void, Error, R>;\n}\n\n/** A PUT GitHub accepted but did not store. */\nexport class ForkPrApprovalReadbackMismatch extends Error {\n readonly _tag = 'ForkPrApprovalReadbackMismatch';\n}\n\nconst asError = (e: unknown): Error => (e instanceof Error ? e : new Error(String(e)));\nconst PATH = 'actions/permissions/fork-pr-contributor-approval';\n\nexport const octokitForkPrApprovalClient = (\n baseUrl: string | undefined,\n): ForkPrApprovalClient<GitHubCredentials> => {\n const octokit = Effect.gen(function* () {\n const creds = yield* yield* GitHubCredentials;\n return baseUrl === undefined ? creds.octokit() : creds.octokit({ baseUrl });\n }).pipe(Effect.mapError(asError));\n return {\n get: (owner, repo) =>\n Effect.gen(function* () {\n const o = yield* octokit;\n const res = yield* Effect.tryPromise({\n try: () => o.request(`GET /repos/{owner}/{repo}/${PATH}`, { owner, repo }),\n catch: asError,\n });\n return String((res.data as { approval_policy?: unknown }).approval_policy);\n }),\n put: (owner, repo, policy) =>\n Effect.gen(function* () {\n const o = yield* octokit;\n yield* Effect.tryPromise({\n try: () =>\n o.request(`PUT /repos/{owner}/{repo}/${PATH}`, {\n owner,\n repo,\n approval_policy: policy,\n }),\n catch: asError,\n });\n }),\n };\n};\n\nconst attrs = (\n owner: string,\n repository: string,\n approvalPolicy: string,\n): ForkPrApprovalAttributes => ({\n owner,\n repository,\n approvalPolicy,\n});\n\n/** The provider's handlers over any client — the real one below, a fake in tests. */\nexport const forkPrApprovalHandlers = <R>(\n clientFor: (baseUrl: string | undefined) => ForkPrApprovalClient<R>,\n) =>\n ForkPrApproval.Provider.of({\n list: () => Effect.succeed([]),\n nuke: { skip: true },\n\n read: ({ output, olds }) =>\n Effect.gen(function* () {\n const live = yield* clientFor(olds.baseUrl).get(olds.owner, olds.repository);\n const found = attrs(olds.owner, olds.repository, live);\n return output === undefined ? Unowned(found) : found;\n }),\n\n diff: ({ news, olds }) =>\n Effect.succeed(\n isResolved(news) &&\n olds !== undefined &&\n (news.owner !== olds.owner || news.repository !== olds.repository)\n ? ({ action: 'replace' } as const)\n : undefined,\n ),\n\n reconcile: ({ news }) =>\n Effect.gen(function* () {\n if (!(FORK_PR_APPROVAL_POLICIES as readonly string[]).includes(news.approvalPolicy)) {\n return yield* Effect.fail(\n new Error(`unknown fork-PR approval policy: ${String(news.approvalPolicy)}`),\n );\n }\n const client = clientFor(news.baseUrl);\n const before = yield* client.get(news.owner, news.repository);\n if (before !== news.approvalPolicy) {\n yield* client.put(news.owner, news.repository, news.approvalPolicy);\n }\n const after = yield* client.get(news.owner, news.repository);\n if (after !== news.approvalPolicy) {\n return yield* Effect.fail(\n new ForkPrApprovalReadbackMismatch(\n `${news.owner}/${news.repository}: PUT ${news.approvalPolicy}, read back ${after}`,\n ),\n );\n }\n return attrs(news.owner, news.repository, after);\n }),\n\n // ⛔ Retain: removing the declaration never loosens the live setting.\n delete: () => Effect.void,\n });\n\nexport const ForkPrApprovalProvider = () =>\n Provider.succeed(ForkPrApproval, forkPrApprovalHandlers(octokitForkPrApprovalClient));\n",
21
+ "/**\n * `repoPolicyProviders` — the documented stack wiring for `RepositoryRuleset` (directly, or\n * through `declareRepoPolicy` / `declareRepoBaseline`): `GitHub.providers()` and\n * `RepositoryRulesetProvider()`, composed so the whole thing typechecks and needs nothing\n * further from the stack.\n *\n * providers: repoPolicyProviders()\n *\n * ⛔ WHY THIS EXISTS — MEASURED 2026-09-24 (homeflare-builds bump PR 6, tsc). Writing the two\n * providers side by side, `Layer.mergeAll(GitHub.providers(), RepositoryRulesetProvider())`,\n * type-errors: `RepositoryRulesetProvider()`'s handlers call `octokitFor`, which needs\n * `GitHubCredentials` — a requirement of the PROVIDER's layer, correctly inferred by\n * `Provider.succeed` from `repositoryRulesetHandlers` in repository-ruleset.ts. Merging two\n * layers does not thread one's output into the other's requirement; `RepositoryRulesetProvider()`\n * still needs `GitHubCredentials` fed in. `GitHub.providers()` is the only thing here that\n * resolves credentials (env, stored PAT, `gh` CLI, or OAuth — see `alchemy/src/GitHub/\n * Providers.ts`), and — because it chains `Layer.provideMerge(Credentials.fromAuthProvider(…))`\n * internally rather than `Layer.provide` — its own OUTPUT includes `GitHubCredentials`\n * alongside `GitHub.Providers`. `Layer.provideMerge(github)` on `RepositoryRulesetProvider()`\n * both supplies that requirement AND keeps `github`'s own output merged in for any\n * `GitHub.Repository`/`GitHub.Ruleset` the caller also declares. `github` is built once and\n * referenced twice below — Effect's layer memoization (by reference) builds it once, not\n * twice, not twice against the auth provider either.\n *\n * ★ THIS IS ONLY HALF OF 2026-09-24's FIX. The other half — `RepositoryRuleset`'s own `Resource<>`\n * declaration no longer naming `GitHubCredentials` in its 5th (`Providers`) slot — lives in\n * repository-ruleset.ts's file header; that half is what let a stack BODY calling\n * `declareRepoPolicy`/`declareRepoBaseline` typecheck at all. Composing the providers\n * correctly, as this function does, does not by itself fix a body that still requires\n * `GitHubCredentials` directly.\n *\n * ⚠️ DON'T ALSO MERGE A SEPARATE `GitHub.providers()` CALL IN. `github` here is one Layer\n * object referenced twice, which Effect's layer memoization (by reference, ADVERSARIAL\n * REVIEW 2026-09-24: confirmed against `effect@4.0.0-rc.115`'s own `MemoMap`) builds once. A\n * stack that ALSO writes its own `GitHub.providers()` alongside this function's result is a\n * second, distinct Layer object — a genuine second credential resolution, not shared with\n * this one. Get every GitHub resource's providers from this one call.\n */\nimport * as GitHub from 'alchemy/GitHub';\nimport * as Layer from 'effect/Layer';\nimport { ForkPrApprovalProvider } from './fork-pr-approval.ts';\nimport { RepositoryRulesetProvider } from './repository-ruleset.ts';\n\nexport const repoPolicyProviders = (options?: GitHub.ProvidersOptions) => {\n const github = GitHub.providers(options);\n return Layer.mergeAll(\n github,\n RepositoryRulesetProvider().pipe(Layer.provideMerge(github)),\n ForkPrApprovalProvider().pipe(Layer.provideMerge(github)),\n );\n};\n"
21
22
  ],
22
- "mappings": ";AAsBO,SAAS,WAAW,CAAC,OAAe,OAAuB;AAAA,EAChE,MAAM,UAAU,MAAM,KAAK;AAAA,EAC3B,IAAI,YAAY;AAAA,IAAI,MAAM,IAAI,MAAM,eAAe,mBAAmB;AAAA,EACtE,OAAO;AAAA;AAQF,SAAS,eAAe,CAAC,QAAqC;AAAA,EACnE,MAAM,OAAO,IAAI;AAAA,EACjB,WAAW,OAAO,QAAQ;AAAA,IACxB,MAAM,UAAU,IAAI,KAAK;AAAA,IAGzB,IAAI,YAAY,IAAI;AAAA,MAClB,MAAM,IAAI,MACR,uFACF;AAAA,IACF;AAAA,IACA,KAAK,IAAI,OAAO;AAAA,EAClB;AAAA,EACA,OAAO,CAAC,GAAG,IAAI,EAAE,KAAK;AAAA;AAaxB,SAAS,aAAa,CAAC,OAAe,UAAuC;AAAA,EAC3E,MAAM,OAAO,IAAI;AAAA,EACjB,WAAW,OAAO,UAAU;AAAA,IAC1B,MAAM,UAAU,IAAI,KAAK;AAAA,IACzB,IAAI,YAAY,IAAI;AAAA,MAClB,MAAM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,2BAA2B,CAAC;;ACvItF;AACA;AAIO,IAAM,sBAAsB,CAAC,YAAsC;AAAA,EACxE,MAAM,SAAgB,kBAAU,OAAO;AAAA,EACvC,OAAa,eACX,QACA,0BAA0B,EAAE,KAAW,mBAAa,MAAM,CAAC,GAC3D,uBAAuB,EAAE,KAAW,mBAAa,MAAM,CAAC,CAC1D;AAAA;",
24
+ "debugId": "B8B9D2BF7B19B7F664756E2164756E21",
24
25
  "names": []
25
26
  }
@@ -79,6 +79,7 @@ export declare function repoBaselineRuleset(input: RepoBaselineInput): {
79
79
  /** Public-only settings this baseline asserts but cannot express through either resource above
80
80
  * at `alchemy@2.0.0-beta.79` — recorded for the wave-3 handoff artifact (plan section 2), not
81
81
  * declared anywhere. Both already measured ON for `kit` (LIVE SURVEY 2026-09-23); `builds` is
82
- * the gap. */
83
- export declare const PUBLIC_ONLY_UNDECLARABLE: readonly ['secret_scanning: enabled', 'secret_scanning_push_protection: enabled', 'private_vulnerability_reporting: enabled', "fork-PR approval: 'first_time_contributors'"];
82
+ * the gap. Fork-PR approval left this list on 2026-10-14: `ForkPrApproval` (fork-pr-approval.ts)
83
+ * declares it. */
84
+ export declare const PUBLIC_ONLY_UNDECLARABLE: readonly ['secret_scanning: enabled', 'secret_scanning_push_protection: enabled', 'private_vulnerability_reporting: enabled'];
84
85
  //# sourceMappingURL=repo-baseline-data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"repo-baseline-data.d.ts","sourceRoot":"","sources":["../../src/github/repo-baseline-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,WAAW,C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;YACnB,mCAAmC;;;YAM7B,MAAM;;;YACN,gCAAgC;YAChC,oBAAoB;;;EAKjC;AAED;;;;kBAIkB;AAClB,eAAO,MAAM,wBAAwB,YACnC,0BAA0B,EAC1B,0CAA0C,EAC1C,0CAA0C,CAClC,CAAC"}
@@ -38,5 +38,5 @@
38
38
  */
39
39
  import * as GitHub from 'alchemy/GitHub';
40
40
  import * as Layer from 'effect/Layer';
41
- export declare const repoPolicyProviders: (options?: GitHub.ProvidersOptions) => Layer.Layer<import("alchemy/Auth/Credentials").CredentialsStore | GitHub.GitHubCredentials | import("alchemy/Auth/Profile").ProfileStore | import("alchemy").Provider<import("./repository-ruleset.ts").RepositoryRuleset> | GitHub.Providers, never, import("alchemy").AuthProviders | import("effect/process/ChildProcessSpawner").ChildProcessSpawner | import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
41
+ export declare const repoPolicyProviders: (options?: GitHub.ProvidersOptions) => Layer.Layer<import("alchemy/Auth/Credentials").CredentialsStore | GitHub.GitHubCredentials | import("alchemy/Auth/Profile").ProfileStore | import("alchemy").Provider<import("./fork-pr-approval.ts").ForkPrApproval> | import("alchemy").Provider<import("./repository-ruleset.ts").RepositoryRuleset> | GitHub.Providers, never, import("alchemy").AuthProviders | import("effect/process/ChildProcessSpawner").ChildProcessSpawner | import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
42
42
  //# sourceMappingURL=repository-ruleset-providers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"repository-ruleset-providers.d.ts","sourceRoot":"","sources":["../../src/github/repository-ruleset-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,eAAO,MAAM,mBAAmB,aAAc,MAAM,CAAC,gBAAgB,oaAGpE,CAAC"}
1
+ {"version":3,"file":"repository-ruleset-providers.d.ts","sourceRoot":"","sources":["../../src/github/repository-ruleset-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAItC,eAAO,MAAM,mBAAmB,aAAc,MAAM,CAAC,gBAAgB,ifAOpE,CAAC"}
@@ -13,6 +13,8 @@ export declare class QuadletEnvironmentValueError extends QuadletEnvironmentValu
13
13
  }> {
14
14
  get message(): string;
15
15
  }
16
+ /** True when `assignment` must be wrapped and escaped to survive the three parsers. */
17
+ export declare const needsQuoting: (assignment: string) => boolean;
16
18
  /**
17
19
  * `Environment="KEY=value"` — the whole assignment double-quoted, with `\`, `"`, `%` and `$`
18
20
  * escaped (in that order, over the joined `KEY=value`), so the wrapping quotes this function adds
@@ -1 +1 @@
1
- {"version":3,"file":"container-env-quote.d.ts","sourceRoot":"","sources":["../../src/linux/container-env-quote.ts"],"names":[],"mappings":"AA6CA,sGAAsG;AACtG,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;;;;AAQpE;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,kCAAiD;IACjG,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB,CAAC;IACA,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,QAAS,MAAM,SAAS,MAAM,KAAG,MAYlE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,gBACd,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAC5C,SAAS,eAAe,EAMoE,CAAC;AAEhG;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,gBACtB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAC5C,MAAM,EAaR,CAAC"}
1
+ {"version":3,"file":"container-env-quote.d.ts","sourceRoot":"","sources":["../../src/linux/container-env-quote.ts"],"names":[],"mappings":"AA6CA,sGAAsG;AACtG,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;;;;AAQpE;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,kCAAiD;IACjG,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB,CAAC;IACA,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF;AAUD,uFAAuF;AACvF,eAAO,MAAM,YAAY,eAAgB,MAAM,KAAG,OAAmC,CAAC;AAEtF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,QAAS,MAAM,SAAS,MAAM,KAAG,MAgBlE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,gBACd,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAC5C,SAAS,eAAe,EAMoE,CAAC;AAEhG;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,gBACtB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAC5C,MAAM,EAaR,CAAC"}
@@ -918,11 +918,15 @@ class QuadletEnvironmentValueError extends Data.TaggedError("QuadletEnvironmentV
918
918
  return environmentValueProblem(this.key);
919
919
  }
920
920
  }
921
+ var SPECIAL = /[\s"'\\%$]/u;
922
+ var needsQuoting = (assignment) => SPECIAL.test(assignment);
921
923
  var quoteEnvironmentValue = (key, value) => {
922
924
  if (key.includes(`
923
925
  `) || value.includes(`
924
926
  `))
925
927
  throw new QuadletEnvironmentValueError({ key });
928
+ if (!needsQuoting(`${key}=${value}`))
929
+ return `${key}=${value}`;
926
930
  return `"${`${key}=${value}`.replaceAll("\\", "\\\\").replaceAll('"', "\\\"").replaceAll("%", "%%").replaceAll("$", () => "$$")}"`;
927
931
  };
928
932
  var environmentLines = (environment) => Object.entries(environment).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, value]) => ["Environment", quoteEnvironmentValue(key, value)]);
@@ -3258,5 +3262,5 @@ export {
3258
3262
  sshSudoRunner
3259
3263
  };
3260
3264
 
3261
- //# debugId=32C72A25441D70A164756E2164756E21
3265
+ //# debugId=DE197B18F4F6D7B664756E2164756E21
3262
3266
  //# sourceMappingURL=index.js.map