facts.ts
This file
Path
packages/gate/src/facts.ts
84 lines · 2.9 KiB · TypeScript
Last changed by
Merge build/maintainer-wording into mainoscabrielbefore adoption4c1a571
History of this fileTake it
The walk stopped after 200 commits: lines older than 678c8b8 point at it.
Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 1–59why, one step back1import type { Ask } from "@repo/protocol/domain/ask";2import type { ClaimView } from "@repo/protocol/domain/claim";3import type { RefNameText } from "@repo/protocol/domain/common";4import type { Policy } from "@repo/protocol/domain/policy";5import type {6 AskId,7 BlobSha,8 CommitSha,9 Handle,10 LandedSha,11 LayerName,12 ProjectName,13 RatchetName,14 RepoPath,15} from "@repo/protocol/ids";16import type { Principal } from "@repo/protocol/principal";17import { Data } from "effect";18import type { Option } from "effect";1920export interface Change {21 readonly path: RepoPath;22 readonly status: "added" | "modified" | "deleted";23 readonly before?: BlobSha;24 readonly after?: BlobSha;25}2627export interface AddedLine {28 readonly line: number;29 readonly text: string;30}3132export type PushTarget = Data.TaggedEnum<{33 Canonical: { readonly project: ProjectName };34 ClaimFork: {35 readonly project: ProjectName;36 readonly ask: AskId;37 readonly claimant: Handle;38 };39 Layer: { readonly project: ProjectName; readonly layer: LayerName };40 WorkingFork: { readonly project: ProjectName; readonly owner: Handle };41}>;4243export const PushTarget = Data.taggedEnum<PushTarget>();4445export interface PushFacts {46 readonly policy: Policy;47 readonly ask: Option.Option<Ask>;48 readonly claim: Option.Option<ClaimView>;49 readonly pusher: Principal;50 readonly target: PushTarget;51 readonly ref: RefNameText;52 readonly base: CommitSha;53 readonly head: CommitSha;54 readonly landed: LandedSha;55 readonly changes: readonly Change[];56 readonly addedLines: ReadonlyMap<RepoPath, readonly AddedLine[]>;57 readonly scriptsChanged: boolean;58 readonly layerPaths: ReadonlySet<RepoPath>;59 /**Drop the private build plan's citations from the code, and fail verify if one comes backoscabrielbefore adoptiona29cef6
line 60why, one step back60 * Whether the pusher reads the layers `layerPaths` holds. Only aMerge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 61–67why, one step back61 * reader hears which of their paths collide with a layer; anyone else62 * hears every path they wrote, so the refusal is no oracle. It vouches for63 * every layer in the set: true only when the pusher reads all of them, so64 * reading one layer never names another's paths. Absent, they read none.65 */66 readonly canReadLayers?: boolean;67 readonly claimsHeld: number;Merge build/comments-packages-rest into mainoscabrielbefore adoption38cd503
line 68why, one step back68 /** Only when the push opens the ask are its own file and check file the push's to write. */Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 69–73why, one step back69 readonly opensAsk: boolean;70 readonly ratchetBaselines?: ReadonlyMap<RatchetName, number>;71 /**72 * The lines a push removes, by their 1-based number in the old file, so a73 * removed escape offsets an added one. Absent, a push removes none, whichMerge build/maintainer-wording into mainoscabrielbefore adoption4c1a571
line 74why, one step back74 * only errs toward asking a maintainer.Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 75–78why, one step back75 */76 readonly removedLines?: ReadonlyMap<RepoPath, readonly AddedLine[]>;77 /**78 * Each territory's count of reasoned escapes on main, by its escapeMerge build/maintainer-wording into mainoscabrielbefore adoption4c1a571
line 79why, one step back79 * ratchet, when the caller keeps it apart from the baseline: a maintainer'sMerge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 80–84why, one step back80 * accepted `Waiver` raises the baseline before the answer lands, so the81 * answer, checked again, is within it. Absent, the baseline stands for it.82 */83 readonly escapeCounts?: ReadonlyMap<RatchetName, number>;84}