Skip to content

Commit a00a3eb

Browse files
authored
docs(comments): restore four facts the lint-floor sweep cut (#560)
1 parent 0d77fad commit a00a3eb

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎.github/scripts/post-green-steps.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ import { attempt, requireEnv, setOutput } from "./lib/workflow-step.js";
1414
/** What each subcommand writes to GITHUB_OUTPUT; test/workflows/post-green-workflow.test.ts judges the job's wiring from it, as from the shell steps' echo lines. */
1515
export const STEP_OUTPUTS = { probe: ["proceed"] } as const;
1616

17-
/** Refused for a token without write access and creates nothing, against a ref that never exists, so git cannot refuse a non-fast-forward locally whatever the token. */
17+
/** A dry-run push asks origin for its receive-pack advertisement over the real push's channel, so a token without write access is refused and nothing is created. */
1818
const DRY_RUN_PUSH = [
1919
"git",
2020
"push",
2121
"--dry-run",
2222
"--quiet",
2323
"origin",
24-
"HEAD:refs/dry-run/token-probe",
24+
"HEAD:refs/dry-run/token-probe", // a ref that never exists, so git cannot refuse a non-fast-forward locally whatever the token
2525
];
2626

2727
/** The text's lines as awk would read them: no trailing record for a final newline, none at all for empty text. */

‎src/sections/contract/endpoints.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ type PermissionOverride = SectionPermission | "none";
4141

4242
/**
4343
* A read's phase. Omitted, the read is available to plan(), so check mode and preflight may meet it. "execution"
44-
* gates it behind the ExecTools token only a thunk receives (ReadPort in ./plan.ts), so check mode never issues it.
44+
* gates it behind the ExecTools token only a thunk receives (ReadPort in ./plan.ts), so check mode never issues it
45+
* (the Codespaces sealing key, for one).
4546
*
4647
* e2e mock -> treats an execution read in check mode as a violation
4748
* denialPosture() -> rejects a primaryRead on it: no denied first read can be classified from it

‎src/sections/environments/schema.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ export type EnvironmentSecretConfig = z.infer<typeof EnvironmentSecretConfig>;
7373
const DeploymentBranchPolicy = open(DeploymentBranchPolicyFlags.unwrap().shape)
7474
.check(
7575
rule((flags, refineCtx) => {
76+
// GitHub accepts exactly one flag on: both true is a 422, and both false is a 422 too, since "any branch may
77+
// deploy" is spelled `deployment_branch_policy: null`.
78+
7679
// A raw flag beside its own shape issue is neither setting: two equal raw values (0 and 0, a YAML alias
7780
// to one mapping) are not both false, nor both true.
7881
if (

‎src/sections/shared/secrets-and-variables/repo-secrets.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export type RepoSecretsKey =
5151
| "codespaces_secrets"
5252
| "agents_secrets";
5353

54-
/** The routes derive from THIS map, so a key paired with another family's segment (which the mock would faithfully serve) is unrepresentable; the `satisfies` pins each value to the segment its key spells. */
54+
/** Routes derive from THIS map, so a key under another family's segment is unrepresentable (the mock would serve the swap and hide it). */
5555
const SECRETS_SEGMENTS = {
5656
actions_secrets: "actions",
5757
dependabot_secrets: "dependabot",
@@ -67,6 +67,7 @@ const SECRETS_ENTRIES = {
6767
agents_secrets: AgentsSecretConfig,
6868
} as const satisfies Record<RepoSecretsKey, ReturnType<typeof sealedSecretConfig>>;
6969

70+
/** The path segment a family's key spells; a fifth family breaking the `<segment>_secrets` naming must say so here. */
7071
type SegmentOfSecretsKey<K extends RepoSecretsKey> = K extends `${infer S}_secrets` ? S : never;
7172

7273
type SecretsSegment<K extends RepoSecretsKey = RepoSecretsKey> = (typeof SECRETS_SEGMENTS)[K];

0 commit comments

Comments
 (0)