Skip to content
Myr

testing.ts

This file

Path

packages/protocol/src/testing.ts

60 lines · 1.7 KiB · TypeScript

Last changed by

Merge project/drop-proposals into mainoscabrielbefore adoptionb4ed08b

History of this file

Take it

The walk stopped after 200 commits: lines older than 61ef4c0 point at it.

Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f

line 1why, one step back
1// Test code alone imports this module; nothing under any `src/` may.

Walk the swarm take's pre-flight: Amp updated, Claude Code's updater off, pell's key, a fresh herdr sessionoscabrielbefore adoption61ef4c0

lines 2–19why, one step back
2import { 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.");19

Merge build/comments-cli-protocol-checks into mainoscabrielbefore adoptionc86204f

line 20why, one step back
20/** Tests merge their own handlers over these with `Contracts.toLayerHandler`: a later layer's wins. */

Walk the swarm take's pre-flight: Amp updated, Claude Code's updater off, pell's key, a fresh herdr sessionoscabrielbefore adoption61ef4c0

lines 21–35why, one step back
21export const unanswered = Contracts.toLayer({
22 claim: uncalled,23 credits: uncalled,24 decide: uncalled,25 // Keyed by the class: lint keeps "shape" out of code names.26 [EnvSchemaOf._tag]: uncalled,27 evidence: uncalled,28 finish: uncalled,29 fork: uncalled,30 frontPage: uncalled,31 initProject: uncalled,32 land: uncalled,33 landing: uncalled,34 ledger: uncalled,35 listAsks: uncalled,

Merge project/discussions into mainoscabrielbefore adoption29b0353

line 36why, one step back
36 listDiscussions: uncalled,

Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d

line 37why, one step back
37 listPaths: uncalled,

Walk the swarm take's pre-flight: Amp updated, Claude Code's updater off, pell's key, a fresh herdr sessionoscabrielbefore adoption61ef4c0

line 38why, one step back
38 listProjects: uncalled,

Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d

lines 39–40why, one step back
39 listRefs: uncalled,
40 log: uncalled,

Walk the swarm take's pre-flight: Amp updated, Claude Code's updater off, pell's key, a fresh herdr sessionoscabrielbefore adoption61ef4c0

line 41why, one step back
41 openAsk: uncalled,

Merge project/discussions into mainoscabrielbefore adoption29b0353

line 42why, one step back
42 postDiscussion: uncalled,

Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d

lines 43–45why, one step back
43 projectPolicy: uncalled,
44 readFile: uncalled,45 readTree: uncalled,

Merge redesign into mainoscabrielbefore adoptioncaedd21

line 46why, one step back
46 recentLandings: uncalled,

Walk the swarm take's pre-flight: Amp updated, Claude Code's updater off, pell's key, a fresh herdr sessionoscabrielbefore adoption61ef4c0

lines 47–49why, one step back
47 release: uncalled,
48 setEnv: uncalled,49 showAsk: uncalled,

Add the code-browser, policy and drafting contracts, peeled tags and commit times on the port, and the AI bindingoscabrielbefore adoptionfc4691d

line 50why, one step back
50 showCommit: uncalled,

Merge project/discussions into mainoscabrielbefore adoption29b0353

line 51why, one step back
51 showDiscussion: uncalled,

Walk the swarm take's pre-flight: Amp updated, Claude Code's updater off, pell's key, a fresh herdr sessionoscabrielbefore adoption61ef4c0

lines 52–57why, one step back
52 status: uncalled,
53 submitAnswer: uncalled,54 today: uncalled,55 verdict: uncalled,56 vouch: uncalled,57 watch: uncalled,

Merge perf/whoami into mainoscabrielbefore adoptionceaf566

line 58why, one step back
58 whoami: 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 back
59 why: uncalled,

Walk the swarm take's pre-flight: Amp updated, Claude Code's updater off, pell's key, a fresh herdr sessionoscabrielbefore adoption61ef4c0

line 60why, one step back
60});