# configuration/strings/surface.strings.ts

> 47 lines of code and 12 definitions.

Tree: Bane's Lab Build Scripts
Language: typescript
Layer: product
Canonical: https://banes-lab.com/anatomy/build-scripts#file-build-scripts-configuration-strings-surface-strings-ts
Source text: https://banes-lab.com/source/build-scripts/configuration/strings/surface.strings.ts.txt

Listed in [configuration/strings](https://banes-lab.com/api/source/build-scripts/configuration/strings.md), after [configuration/strings/site.strings.ts](https://banes-lab.com/source/build-scripts/configuration/strings/site.strings.ts.md) and before [configuration/strings/text.strings.ts](https://banes-lab.com/source/build-scripts/configuration/strings/text.strings.ts.md).

## Definitions

- `stepFailed` (lexical_declaration, line 35, exported)
- `surfacesLine` (lexical_declaration, line 29, exported)
- `waitUnresolved` (lexical_declaration, line 44, exported)
- `venueMissing` (lexical_declaration, line 48, exported)
- `slotsUnreadable` (lexical_declaration, line 52, exported)
- `scriptMissing` (lexical_declaration, line 56, exported)
- `SAMPLE_ROLES` (lexical_declaration, line 1, exported)
- `SAMPLE_INVARIANT` (lexical_declaration, line 3, exported)
- `SAMPLE_ESTABLISHES` (lexical_declaration, line 5, exported)
- `SAMPLE_POSITION_A` (lexical_declaration, line 7, exported)
- `SAMPLE_POSITION_B` (lexical_declaration, line 17, exported)
- `SAMPLE_OWNER_ENTRY` (lexical_declaration, line 27, exported)

## Contained in

- [configuration/strings](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-configuration-strings.md)

## Used by

- [core/adapters/surface.adapter.ts](https://banes-lab.com/source/build-scripts/core/adapters/surface.adapter.ts.md)
- [core/coordinators/surface.coordinator.ts](https://banes-lab.com/source/build-scripts/core/coordinators/surface.coordinator.ts.md)
- [core/steps/surface.step.ts](https://banes-lab.com/source/build-scripts/core/steps/surface.step.ts.md)

## Linked from

- [core/adapters](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-adapters.md)
- [core/coordinators](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-coordinators.md)
- [core/steps](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-steps.md)

## Source

```typescript
export const SAMPLE_ROLES = ["foo", "bar", "baz"] as const;

export const SAMPLE_INVARIANT = "retries-have-one-home";

export const SAMPLE_ESTABLISHES = "The retry limit is read from one setting.";

export const SAMPLE_POSITION_A = [
    "Position A1 — The retry limit moves into the settings file.",
    "Axis: Where the retry limit lives.",
    "Evidence: client.ts and worker.ts each set their own limit.",
    "Proposes: One retry.limit setting that both files read.",
    "Costs: Both call sites change in one step.",
    "Contradicts:",
    "Signed: A",
].join("\n");

export const SAMPLE_POSITION_B = [
    "Position B1 — The worker keeps its own limit.",
    "Axis: Where the retry limit lives.",
    "Evidence: The worker retries a queue, and the client retries a request.",
    "Proposes: Two settings, one for each caller.",
    "Costs: Two values to keep in step.",
    "Contradicts: A-1",
    "Signed: B",
].join("\n");

export const SAMPLE_OWNER_ENTRY = "# Owner note: The worker and the client share one limit for now.";

export const surfacesLine = function surfacesLine(count: number, reused: boolean, folder: string): string {
    return reused
        ? `surfaces: reused ${String(count)} figure(s) in ${folder}, because their inputs are unchanged\n`
        : `surfaces: recorded ${String(count)} figure(s) into ${folder}\n`;
};

export const stepFailed = function stepFailed(
    command: string,
    expected: number,
    actual: number,
    output: string,
): string {
    return `surfaces: \`${command}\` exited ${String(actual)}, and the scenario expects ${String(expected)}. Its output:\n${output}`;
};

export const waitUnresolved = function waitUnresolved(command: string): string {
    return `surfaces: \`${command}\` did not return after the next write, so the wait frame has no result`;
};

export const venueMissing = function venueMissing(): string {
    return "surfaces: the raise created no venue file, so the scenario has no surface to record";
};

export const slotsUnreadable = function slotsUnreadable(): string {
    return "surfaces: the package's config/surface.config.ts exports no slotText function, so the recorder cannot find the board template";
};

export const scriptMissing = function scriptMissing(name: string): string {
    return `surfaces: the package's package.json declares no \`${name}\` script run by node, so the scenario cannot start it`;
};
```
