Skip to content
Myr

custody.ts

This file

Path

packages/git/src/custody.ts

27 lines · 951 bytes · TypeScript

Last changed by

Merge build/comments-packages-rest into mainoscabrielbefore adoption38cd503

History of this file

Take 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–12why, one step back
1import type { RefName, RepoName } from "@repo/artifacts/repo-host";
2import type { CommitSha } from "@repo/protocol/ids";3import type { Refusal } from "@repo/protocol/refusal";4import { Context } from "effect";5import type { Array, Effect, Option } from "effect";67export interface Command {8 readonly ref: RefName;9 readonly from: Option.Option<CommitSha>;10 readonly to: Option.Option<CommitSha>;11}12

Merge build/comments-packages-rest into mainoscabrielbefore adoption38cd503

line 13why, one step back
13/** A push lands whole or not at all at the gateway: any refusal turns every ref away. */

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 14–20why, one step back
14export class Custody extends Context.Service<
15 Custody,16 {17 readonly admit: (18 repo: RepoName,19 commands: Array.NonEmptyReadonlyArray<Command>20 ) => Effect.Effect<readonly Refusal[]>;

Merge build/comments-packages-rest into mainoscabrielbefore adoption38cd503

line 21why, one step back
21 /** A refusal here reaches the pusher though the upstream already took the push. */

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 22–27why, one step back
22 readonly review: (
23 repo: RepoName,24 commands: Array.NonEmptyReadonlyArray<Command>25 ) => Effect.Effect<readonly Refusal[]>;26 }27>()("git/Custody") {}