IF Commons GitHub

What a package manager is to the kit, as data: the operations a dialect uses, the command of an operation as the packaging ontology states it, how a manager writes an exact version, and the form a name and a version must have to be put in a command.

0002Active

0002-package-managers-governance · owner if · domain commons

Requirements

FR-001checkpassing

The operations MUST be Install, QueryInstalled, QueryVersion and Refresh, and a command of one MUST carry the manager, the executable, the environment where there is one, whether it needs administrator rights, the template, the form that asks a person nothing where there is one, and whether the ontology carries a date and a place it was tried.

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

Proved by: package-managers/suite/governance.test.ts

Written in: package-managers/src/governance/commands.ts

Tests: passed: suite/governance.test.ts the operations are the four a dialect uses, and a command carries what the ontology states

FR-002checkpassing

A manager MUST write an exact version in one of three ways: joined to the name with = or @, as flags after the name (the flags before it, the flags that make it exact, and the flag of the version), or not at all, with the reason.

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

Proved by: package-managers/suite/governance.test.ts

Written in: package-managers/src/governance/commands.ts

Tests: passed: suite/governance.test.ts a manager writes an exact version joined, as flags, or not at all with the reason

FR-003checkpassing

A package name MUST be safe only if it starts with a letter or a digit (never a dash, so that it cannot be taken for an option), has no .. and uses letters, digits and + . _ @ : / -; a version MUST be safe only if it starts with a letter or a digit and uses letters, digits and + . _ : ~ -.

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

Proved by: package-managers/suite/governance.test.ts

Written in: package-managers/src/governance/commands.ts

Tests: passed: suite/governance.test.ts a name is safe only if it cannot be taken for an option or hold a shell word, and so is a

Cited by: Package managers: logical

Acceptance scenarios

  1. Given the names xz-utils, Vendor.Tool and aqua:org/tool, When they are judged, Then they are safe, per FR-003.
  2. Given the names -rf, a;b, a b, a/../b and the empty name, When they are judged, Then none is safe, per FR-003.

Out of scope

  • Reading the data from the ontology: its reader.

Edge cases

  • A name of more than 200 characters is not safe, per FR-003.

Assumptions

  • A name that passes is never taken by a manager for an option, and no shell reads it, because a command is an argument vector.

Open questions

  • None.

Key entities

  • Command spec - one command of a manager.
  • Versioning - how a manager writes an exact version.

Success criteria

SC-001success criterion

No name or version that begins with a dash or holds a shell character reaches a command.

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

Package managers: logical

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