answer.ts
This file
Path
packages/protocol/src/domain/answer.ts
88 lines · 1.9 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–36why, one step back1import { Schema, Struct } from "effect";23import {4 AreaName,5 AskId,6 CheckVersion,7 CommitSha,8 LaneName,9 PatchId,10 ProjectName,11 RequestId,12 SuiteRoot,13 TreeSha,14} from "../ids.ts";15import { Outcome, StageName } from "./outcome.ts";1617export const LaneOutcome = Schema.Literals([18 "passed",19 "failed",20 "loadError",21 "flaked",22 "blocked",23]);2425export type LaneOutcome = typeof LaneOutcome.Type;2627export const LaneResult = Schema.Struct({28 command: Schema.NonEmptyString,29 durationMs: Schema.Int,30 lane: LaneName,31 logRef: Schema.optionalKey(Schema.NonEmptyString),32 result: LaneOutcome,33});3435export type LaneResult = typeof LaneResult.Type;36Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f
line 37why, one step back37/** Held-back checks in one area. Nothing beyond these counts is disclosed. */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 38–88why, one step back38export const HeldBackResult = Schema.Struct({39 area: AreaName,40 passed: Schema.Int,41 suite: SuiteRoot,42 total: Schema.Int,43});4445export type HeldBackResult = typeof HeldBackResult.Type;4647export const Verdict = Schema.Struct({48 ask: AskId,49 at: Schema.DateTimeUtcFromString,50 base: CommitSha,51 checkVersion: CheckVersion,52 head: CommitSha,53 heldBack: Schema.Array(HeldBackResult),54 lanes: Schema.Array(LaneResult),55 outcome: Outcome,56 patchId: PatchId,57 project: ProjectName,58 stage: StageName,59 tree: TreeSha,60 verifier: Schema.Literal("platform"),61});6263export type Verdict = typeof Verdict.Type;6465export const AnswerReceipt = Schema.Struct({66 ask: AskId,67 base: CommitSha,68 head: CommitSha,69 outcome: Outcome,70 project: ProjectName,71 requestId: RequestId,72});7374export type AnswerReceipt = typeof AnswerReceipt.Type;7576export const LandReceipt = AnswerReceipt.mapFields(Struct.omit(["ask"]));7778export type LandReceipt = typeof LandReceipt.Type;7980export const AnswerView = Schema.Struct({81 ask: AskId,82 at: Schema.DateTimeUtcFromString,83 head: CommitSha,84 outcome: Outcome,85 requestId: RequestId,86});8788export type AnswerView = typeof AnswerView.Type;