examples.ts
This file
Path
packages/protocol/test/examples.ts
140 lines · 3.5 KiB · TypeScript
Last changed by
Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f
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–7why, one step back1import { DateTime } from "effect";23import {4 AskId,5 CommitSha,6 DecisionId,7 EnvKey,Merge build/1400-w14-foundation into mainoscabrielbefore adoption47dd2f8
line 8why, one step back8 Handle,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
line 9why, one step back9 ProjectName,Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
line 10why, one step back10 ProposalId,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 11–22why, one step back11 RepoPath,12} from "../src/ids.ts";13import {14 AskBlocked,15 AskFull,16 AttemptsExhausted,17 CapReached,18 ChecksFailed,19 ClaimLapsed,20 DecisionClosed,21 Denounced,22 DirectPush,Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
line 23why, one step back23 DraftInProgress,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 24–37why, one step back24 Flake,25 HeldBackFailed,26 ImportFailed,27 IncompleteBrief,28 LayerContentInPublicTree,29 NoAsk,30 NotClaimed,31 NotDecider,32 NotRedFirst,33 NotSensitive,34 NotVouched,35 OutOfScope,36 PostureChange,37 PrivatePathInPublicTree,Merge build/1400-w14-foundation into mainoscabrielbefore adoption47dd2f8
line 38why, one step back38 NotYourNamespace,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
line 39why, one step back39 ProjectExists,Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
line 40why, one step back40 ProposalClosed,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 41–50why, one step back41 ReachedInternals,42 RepoBusy,43 SecretInOutput,44 StaleBase,45 StaleLayer,46 TouchedJudge,47 UnknownAsk,48 UnknownCommit,49 UnknownDecision,50 UnknownEnvItem,Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
line 51why, one step back51 UnknownPath,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
line 52why, one step back52 UnknownProject,Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
lines 53–54why, one step back53 UnknownProposal,54 UnknownRevision,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 55–70why, one step back55 UnstatedRequirement,56 ValueTooShort,57 VerifierBlocked,58 WeakCheck,59 Weakened,60} from "../src/refusal.ts";61import type { Refusal } from "../src/refusal.ts";6263export const ask = AskId.make("fix-parser");6465export const base = CommitSha.make("1111111111111111111111111111111111111111");6667export const main = CommitSha.make("2222222222222222222222222222222222222222");6869export const path = RepoPath.make("src/a.ts");70Merge build/1400-w14-foundation into mainoscabrielbefore adoption47dd2f8
line 71why, one step back71const project = ProjectName.make("oscabriel/datekit");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 72–76why, one step back7273const decision = DecisionId.make("dec-000001");7475const key = EnvKey.make("PAYMENTS_KEY");76Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
lines 77–78why, one step back77const proposal = ProposalId.make("prop-000001");78Merge 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 79–124why, one step back79export const examples: readonly Refusal[] = [80 NotClaimed.of(ask),81 ClaimLapsed.of(ask),82 new NotVouched({}),83 new CapReached({ cap: 3 }),84 new AskFull({ ask }),85 new NoAsk({}),86 new RepoBusy({}),87 new DirectPush({ ref: "refs/heads/main" }),88 AskBlocked.of(ask, [AskId.make("drop-moment")]),89 new Denounced({}),90 new OutOfScope({ paths: [path] }),91 new TouchedJudge({ paths: [path] }),92 new Weakened({93 at: { line: 3, path },94 weakening: { marker: "it.skip", reason: "flaky on CI" },95 }),96 new PrivatePathInPublicTree({ paths: [path] }),97 new ReachedInternals({98 at: { line: 1, path },99 from: path,100 to: "@datekit/format/src/internal.ts",101 }),102 new StaleBase({ base, conflicts: [path], main }),103 new StaleLayer({ layer: "maintainers" }),104 new ChecksFailed({105 lane: "test",106 logRef: "logs/7",107 next: "bun test src/a.test.ts",108 }),109 new HeldBackFailed({ area: "parser", suite: "edge-cases" }),110 new AttemptsExhausted({111 area: "parser",112 resetsAt: DateTime.makeUnsafe("2026-10-07T00:00:00Z"),113 }),114 new Flake({ lane: "test" }),115 new VerifierBlocked({}),116 new NotRedFirst({}),117 new WeakCheck({ weakness: "no assertion" }),118 new IncompleteBrief({ missing: ["territory"] }),119 new LayerContentInPublicTree({ paths: [path] }),120 new SecretInOutput({ item: "PAYMENTS_KEY", where: "output" }),121 new UnstatedRequirement({ area: "parser" }),122 new PostureChange({ from: "open", to: "openCore" }),123 new NotDecider({}),124 new DecisionClosed({ decision }),Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
lines 125–126why, one step back125 new ProposalClosed({ proposal }),126 DraftInProgress.of(proposal),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 127–130why, one step back127 new UnknownProject({ project }),128 new UnknownAsk({ ask }),129 new UnknownCommit({ sha: main }),130 new UnknownDecision({ decision }),Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
lines 131–133why, one step back131 new UnknownPath({ commit: main, path }),132 new UnknownRevision({ rev: "v9.9.9" }),133 new UnknownProposal({ proposal }),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
line 134why, one step back134 new ProjectExists({ project }),Merge build/1400-w14-foundation into mainoscabrielbefore adoption47dd2f8
line 135why, one step back135 NotYourNamespace.of(project, Handle.make("bob")),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 136–140why, one step back136 new ImportFailed({ reason: "the repo needs a sign-in to read" }),137 new UnknownEnvItem({ key }),138 new NotSensitive({ key }),139 ValueTooShort.of(key, 32),140];