IF Commons GitHub

governance/tiers

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-anyfs-cli-governance FR-003

The audience tiers of the anyfs program (commons headless 0010-audience-tiers): two, lowest first. reader sees what only reads (ls, cat, find, check, places and the rest); writer also sees what changes a store. The tier is a fact of whoever runs the program (the variable ANYFS_TIER, the key of a tool server), never a word of a message; a caller who says nothing is a writer, the person at their own terminal.

import { LADDER, tierOf } from "./tiers.ts";
LADDER.ladder.length; // 2
tierOf("reader") === LADDER.ladder[0]; // true

Source: commons/anyfs-cli/src/governance/tiers.ts

4 of 5 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

TierIdtypeno test imports it
type TierId = "reader" | "writer";

The names of the tiers, lowest first: a closed union.

TIER_IDSconst
const TIER_IDS: readonly TierId[]

Every tier, lowest first.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

TIERSconst
const TIERS: Readonly<Record<TierId, TierName>>

The two tiers as headless' tier names.

Imported by 16 tests of the run (16 passed, 0 failed): the library's results

LADDERconst
const LADDER: TierLadder

The ladder of the program.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

tierOffunction
function tierOf(word: string): TierName | undefined

The tier named by a word, or undefined where the word is none of the two.

Imported by 6 tests of the run (6 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.