testing.ts
This file
Path
packages/protocol/src/testing.ts
60 lines · 1.6 KiB · TypeScript
Last changed by
Merge redesign into mainoscabrielbefore adoptioncaedd21
History of this fileTake it
The walk stopped after 200 commits: lines older than 678c8b8 point at it.
Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f
line 1why, one step back1// Test code alone imports this module; nothing under any `src/` may.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 2–19why, one step back2import { Effect, Layer } from "effect";34import { Contracts, EnvSchemaOf } from "./contracts.ts";5import { Handle } from "./ids.ts";6import { Authenticated, CurrentPrincipal, Person } from "./principal.ts";78export const asPerson = (handle: Handle): Layer.Layer<Authenticated> =>9 Layer.succeed(Authenticated, (effect) =>10 Effect.provideService(effect, CurrentPrincipal, Person.make({ handle }))11 );1213export const asTester: Layer.Layer<Authenticated> = asPerson(14 Handle.make("tester")15);1617const uncalled = () =>18 Effect.die("This test calls only the contracts it sets up.");19Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f
line 20why, one step back20/** Tests merge their own handlers over these with `Contracts.toLayerHandler`: a later layer's wins. */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 21–24why, one step back21export const unanswered = Contracts.toLayer({22 claim: uncalled,23 credits: uncalled,24 decide: uncalled,Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
line 25why, one step back25 draftAsk: uncalled,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 26–37why, one step back26 // Keyed by the class: lint keeps "shape" out of code names.27 [EnvSchemaOf._tag]: uncalled,28 evidence: uncalled,29 finish: uncalled,30 flagAsk: uncalled,31 fork: uncalled,32 frontPage: uncalled,33 initProject: uncalled,34 land: uncalled,35 landing: uncalled,36 ledger: uncalled,37 listAsks: uncalled,Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
line 38why, one step back38 listPaths: uncalled,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 listProjects: uncalled,Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
lines 40–41why, one step back40 listRefs: uncalled,41 log: uncalled,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 42why, one step back42 openAsk: uncalled,Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
line 43why, one step back43 projectPolicy: uncalled,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 44why, one step back44 proposeAsk: uncalled,Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
lines 45–46why, one step back45 readFile: uncalled,46 readTree: uncalled,Merge redesign into mainoscabrielbefore adoptioncaedd21
line 47why, one step back47 recentLandings: uncalled,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 48–50why, one step back48 release: uncalled,49 setEnv: uncalled,50 showAsk: uncalled,Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
lines 51–52why, one step back51 showCommit: uncalled,52 showProposal: uncalled,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 53–58why, one step back53 status: uncalled,54 submitAnswer: uncalled,55 today: uncalled,56 verdict: uncalled,57 vouch: uncalled,58 watch: uncalled,Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d
line 59why, one step back59 why: uncalled,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 60why, one step back60});