IF Commons GitHub

AnyfsCli governance

0002Active

0002-anyfs-cli-governance · owner if · domain commons

Requirements

FR-001checkpassing

The verbs MUST be a closed union VerbId with one entry in the table VERBS for each, the compiler MUST hold the table complete, and verbIds() MUST list every entry once.

Enforced (check): .github: cd commons/anyfs-cli && bun run verify — suite/governance.test.ts

Proved by: anyfs-cli/suite/governance.test.ts

Written in: anyfs-cli/src/governance/verbs.ts

Tests: passed: suite/governance.test.ts every verb has one entry and every entry one verb

Cited by: governance/verbs, AnyFS command line

FR-002checkpassing

The facts of every verb MUST NOT contradict each other by the rules of Headless (actionProblems): a report only reads, an action does not only read, a destructive verb previews and is not idempotent, and every verb that changes anything MUST name the channels local and mcp only, except serve, which opens a listener on the computer and MUST name local only.

Enforced (check): .github: cd commons/anyfs-cli && bun run verify — suite/governance.test.ts

Proved by: anyfs-cli/suite/governance.test.ts

Written in: anyfs-cli/src/governance/verbs.ts

Tests: passed: suite/governance.test.ts the facts of no verb contradict each other by the rules of Headless, and a verb that chang

Cited by: governance/verbs, AnyFS command line

FR-003checkpassing

The tiers MUST be two, reader and writer, lowest first, the ladder's default MUST be writer, tierOf MUST name each and no other word, and every verb of the tier reader MUST only read.

Enforced (check): .github: cd commons/anyfs-cli && bun run verify — suite/governance.test.ts

Proved by: anyfs-cli/suite/governance.test.ts

Written in: anyfs-cli/src/governance/tiers.ts

Tests: passed: suite/governance.test.ts the tiers are reader and writer, the default is writer, and a verb of the reader tier only

FR-004checkpassing

Every problem the program raises MUST be one of the closed union of codes ProblemCode, each code MUST have one explanation of four non-empty parts in CATALOGUE, and isProblemCode MUST accept the codes and nothing else.

Enforced (check): .github: cd commons/anyfs-cli && bun run verify — suite/governance.test.ts

Proved by: anyfs-cli/suite/governance.test.ts

Written in: anyfs-cli/src/governance/problems.ts

Tests: passed: suite/governance.test.ts every problem code has a four-part explanation and isProblemCode accepts them and nothing

Cited by: governance/problems, AnyFS command line

FR-005checkpassing

parseMountName MUST accept lower-case words joined by hyphens of two to thirty-two characters that start with a letter, and MUST refuse the name of a kind of place and any other word, so that name: on a command line is never a place.

Enforced (check): .github: cd commons/anyfs-cli && bun run verify — suite/governance.test.ts

Proved by: anyfs-cli/suite/governance.test.ts

Written in: anyfs-cli/src/governance/location.ts

Tests: passed: suite/governance.test.ts a mount name is a word of two to thirty-two characters and never the name of a kind of pla

Cited by: governance/location, AnyFS command line

FR-006checkpassing

parseLocation MUST read a word as a drive path, an address (scheme:// or memory:), a mount (name: and a path, where the name is a mount), or a plain path, and MUST end with E-MOUNT-UNKNOWN for a word of the form name: whose name is no mount, never read it as a file; the reading MUST depend on the word and the names of the mounts only.

Enforced (check): .github: cd commons/anyfs-cli && bun run verify — suite/governance.test.ts

Proved by: anyfs-cli/suite/governance.test.ts

Written in: anyfs-cli/src/governance/location.ts

Tests: passed: suite/governance.test.ts a word is a drive path, an address, a mount or a plain path, and name: of no mount is an e

Cited by: governance/location, AnyFS command line

Acceptance scenarios

  1. Given the union and the table, When the ids are listed, Then each id has one entry and each entry one id, per FR-001.
  2. Given every verb, When its facts are checked by Headless, Then there is no contradiction, per FR-002.
  3. Given the ladder, When a verb of the tier reader is read, Then its effect is read, per FR-003.
  4. Given the codes, When the catalogue is read, Then each has a title, what, why and fix, per FR-004.
  5. Given fleet, file and Fleet, When they are parsed, Then the first is a mount name and the others are refused, per FR-005.
  6. Given the mounts fleet, When fleet:/a, ssh://h/p, ./x and other:/a are read, Then the first three are locations and the last is E-MOUNT-UNKNOWN, per FR-006.

Out of scope

  • The backends that plug in through the configuration: their own libraries.
  • A mount of the stores as a file system (a WebDAV or NFS server, or FUSE): their own libraries.

Edge cases

  • A word of the form name: whose name is no mount: the ending is E-MOUNT-UNKNOWN, never a file named so, per FR-006.
  • A mount named like a kind of place: it is refused, per FR-005.
  • A verb whose facts contradict each other: it is a finding of the test, per FR-002.

Assumptions

  • The libraries anyfs, anyfs-bridge, anyfs-posix, anyfs-ssh and Headless are on the branch that holds this library.

Open questions

  • None.

Key entities

  • AnyfsCli - the library.

Success criteria

SC-001success criterion

bun run verify in this folder passes.

Review & acceptance checklist

  • [x] Every requirement is testable (MUST / MUST NOT), not aspirational
  • [x] No company fact is asserted here
  • [x] Every open item is marked, not silently decided

Cited by

governance/location, governance/problems, governance/verbs, AnyFS command line

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