IF Commons GitHub

Licensing

0035Draft

0035-licensing · owner if · domain commons · part of 0027-commons-libraries

The license

FR-001checkpassing

Every library of commons/ and every other part of this repository that is Intellectual Frontiers' own MUST be licensed by Intellectual Frontiers LLC under the PolyForm Noncommercial License 1.0.0 (SPDX identifier PolyForm-Noncommercial-1.0.0), and no text of another license (the MIT license among them) MUST stand as the license of anything of ours; the identifier MUST be written in one place, commons/libraries/src/license/standard.ts, from which the generator, the packer and the checks read it.

Enforced (check): .github: cd commons/libraries && bun test suite/ — licensing.test.ts: the default is PolyForm-Noncommercial-1.0.0, no LICENSE of the repository is the MIT license, and the manifest, the packer and the generator read the one identifier

Proved by: tests/commons-licensing.test.ts

Tests: passed: suite/license.test.ts the default is the PolyForm Noncommercial license, a manifest's license is one of the clos; passed: suite/license.test.ts the real repository has no finding, no LICENSE is the MIT license, and the README and AGEN; passed: tests/commons-licensing.test.ts every LICENSE of the root and of a library folder is the PolyForm Noncommercial text and n

FR-002checkpassing

The text of the license MUST be the official text, copied byte for byte from the file 1.0.0/PolyForm-Noncommercial-1.0.0.md of https://github.com/polyformproject/polyform-licenses (tag 1.0.0), and MUST NOT be written or reproduced from memory; it MUST be recorded as a typed Standard (0018-standards-first FR-006, FR-007: its issuer, name, version, location, license and the SHA-256 of what was imported) in commons/libraries/src/license/standard.ts, and a test MUST fail where the file's SHA-256 is not the recorded one.

Enforced (check): .github: cd commons/libraries && bun test suite/ — licensing.test.ts: the official text is the one recorded by its standard (SHA-256), and a changed text is refused naming both hashes

Tests: passed: suite/license.test.ts the official text is the one its standard records, a changed text is refused naming both h

FR-003checkpassing

A library whose manifest (library.ts) has a license MUST carry that one of the identifiers of the closed list SPDX_IDS in place of the default, a license that is on no list MUST be refused naming it, and a license is added to the list together with its official text and its standard.

Enforced (check): .github: cd commons/libraries && bun test suite/ — licensing.test.ts: a manifest license of the closed list is read and one that is not is refused naming it

Tests: passed: suite/license.test.ts the default is the PolyForm Noncommercial license, a manifest's license is one of the clos

FR-004checkpassing

Every LICENSE MUST begin with the line Required Notice: Copyright Intellectual Frontiers LLC (https://github.com/intellectual-frontiers/.github), which the license asks of its licensor, then a blank line, then the official text unchanged.

Enforced (check): .github: cd commons/libraries && bun test suite/ — licensing.test.ts: every LICENSE begins with the required notice and ends with the official text unchanged

Tests: passed: suite/license.test.ts the official text is the one its standard records, a changed text is refused naming both h

Cited by: Libraries, Build policy, findings and never failures

The files

FR-005checkpassing

The root MUST hold a LICENSE, and every library folder of commons/ (every folder with a manifest) MUST hold a LICENSE, each made by commons/libraries/src/license.ts from the one official text and the required notice, and never written by hand.

Enforced (check): .github: cd commons/libraries && bun test suite/ — licensing.test.ts: every library folder and the root hold the LICENSE the generator makes, and a hand edit is found

Proved by: tests/commons-licensing.test.ts

Tests: passed: suite/license.test.ts the real repository has no finding, no LICENSE is the MIT license, and the README and AGEN; passed: suite/license.test.ts --check writes nothing and exits 1 naming a library with no LICENSE and the command, the g; passed: tests/commons-licensing.test.ts every LICENSE of the root and of a library folder is the PolyForm Noncommercial text and n

FR-006checkpassing

bun commons/libraries/src/license.ts MUST write the files it makes (every LICENSE and THIRD_PARTY_NOTICES.md), and --check MUST write nothing and exit with 1, naming each file that is not what the manifests and the official text make, a library folder with no LICENSE among them and saying in that finding the command that writes it, so that a new library runs it once.

Enforced (check): .github: cd commons/libraries && bun test suite/ — licensing.test.ts: --check writes nothing and exits 1 naming a library with no LICENSE and the command, and the generator writes it

Tests: passed: suite/license.test.ts --check writes nothing and exits 1 naming a library with no LICENSE and the command, the g

FR-007checkpassing

The check MUST be run by verify of commons/libraries, by the development loop (bun run dev:check, whatever the change) and by the tests of the root, so that CI fails on a missing or a wrong LICENSE.

Enforced (check): .github: cd commons/libraries && bun test suite/ — licensing.test.ts: the verify of libraries and the dev loop run the check, and tests/commons-licensing.test.ts runs it on the real repository

Proved by: tests/commons-licensing.test.ts

Tests: passed: suite/license.test.ts the real repository has no finding, no LICENSE is the MIT license, and the README and AGEN; passed: tests/commons-licensing.test.ts license.ts --check finds nothing on this repository and writes nothing

Cited by: Libraries

FR-008checkpassing

The root MUST hold LICENSING.md (in plain words what is free, what needs a commercial license, how to ask for one by an issue titled Commercial license, and that the owner may offer commercial terms, managed service providers among them, with one sentence that copies a person already holds under the terms they received keep those terms), COMMERCIAL.md (what a commercial license covers and how it is obtained, with pricing and contact left as marked placeholders for the owner and no invented price or address), NOTICE (the copyright of Intellectual Frontiers LLC and that contributions are licensed to it as CONTRIBUTING.md says), CONTRIBUTING.md and CITATION.cff, and the check MUST find each that is missing or lacks the facts it exists for.

Enforced (check): .github: cd commons/libraries && bun test suite/ — licensing.test.ts: a missing or empty LICENSING.md, COMMERCIAL.md, NOTICE, CONTRIBUTING.md or CITATION.cff, and one that lacks its facts, is found

Tests: passed: suite/license.test.ts a missing hand-written file and one that lacks its facts are found

FR-009checkpassing

CONTRIBUTING.md MUST ask for a Developer Certificate of Origin sign-off (git commit -s), MUST state the contributor's agreement that Intellectual Frontiers LLC may license the contribution under the public license and under commercial licenses, and MUST require a Refs #N line on each commit; a trademark paragraph (in LICENSING.md, NOTICE and CONTRIBUTING.md) MUST say that the names Ergonex, Mizan, Kanon, Archon and Stolos and the logos are not licensed beyond saying what the software is.

Enforced (check): .github: cd commons/libraries && bun test suite/ — licensing.test.ts: CONTRIBUTING.md asks for git commit -s and Refs #N, and the trademark paragraph names the five names

Tests: passed: suite/license.test.ts a missing hand-written file and one that lacks its facts are found

FR-010checkpassing

THIRD_PARTY_NOTICES.md MUST be made by the generator from a record of what is really vendored (commons/libraries/src/license/third-party.ts: for each item its path, what it is, its source, its owner, its license and what was checked), MUST say unverified: <what to check> where a license was not checked against its source and never a guess, and the check MUST find an item whose path is no longer in the repository.

Enforced (check): .github: cd commons/libraries && bun test suite/ — licensing.test.ts: THIRD_PARTY_NOTICES.md is what the record makes, and a vendored path that is gone is found

Tests: passed: suite/license.test.ts THIRD_PARTY_NOTICES.md is what the record makes, says unverified where it was not checked,

Cited by: Libraries

FR-011checkpassing

The root README.md MUST have a License section that names the license, says what it allows, how to get a commercial license and links the files above, and MUST say what is and nothing that was; AGENTS.md MUST say the license and the generator's command.

Enforced (check): .github: cd commons/libraries && bun test suite/ — licensing.test.ts: the README License section names the license, and AGENTS.md names the generator's command

Tests: passed: suite/license.test.ts the real repository has no finding, no LICENSE is the MIT license, and the README and AGEN; passed: suite/license.test.ts a missing hand-written file and one that lacks its facts are found

The packages

FR-012checkno test run

The packer MUST write the SPDX identifier of the library (its manifest's license, else the default of FR-001) as the license of the package.json it publishes, MUST put the library's LICENSE in the tarball, and MUST refuse a library that has none, saying the command of FR-006.

Enforced (check): .github: cd commons/libraries && bun test suite/ — licensing.test.ts: the packer writes the SPDX id, packs the LICENSE and refuses a library that has none

Cited by: Libraries

Acceptance scenarios

  1. Given the official text in the repository and the manifests, When license.ts --check runs, Then it writes nothing, names nothing and exits 0, per FR-005 and FR-006.
  2. Given a library folder with a manifest and no LICENSE, When --check runs, Then it exits 1, names commons/<name>/LICENSE and says to run bun commons/libraries/src/license.ts, and running it writes the file, per FR-006.
  3. Given a LICENSE edited by hand, When --check runs, Then it exits 1 and names the file, per FR-005.
  4. Given the file of the official text with one character changed, When the generator runs, Then it writes nothing and names the SHA-256 it found and the one recorded, per FR-002.
  5. Given a manifest with license: "MIT", When it is read, Then it is refused naming the identifier, per FR-003.
  6. Given a library, When it is packed, Then the tarball holds its LICENSE and its package.json has license equal to PolyForm-Noncommercial-1.0.0, per FR-012.
  7. Given a root with no COMMERCIAL.md, or a NOTICE that does not name the licensor, When --check runs, Then it names the file, per FR-008.
  8. Given an item of the vendored record whose file is gone, When --check runs, Then it names the path, per FR-010.
  9. Given the real repository, When the tests of the root run, Then no LICENSE is the MIT license, the README names the license and every generated file is current, per FR-001 and FR-011.

Out of scope

  • Publishing, and what a registry shows of a license: the release (0027-commons-libraries FR-015 to FR-018).
  • The text of a commercial agreement, its prices and its contact: the owner's, marked in COMMERCIAL.md.
  • The pages of the documentation site that show the license: the site's own specification.

Edge cases

  • A new library that has run no generator: found by every check and by the packer, per FR-006 and FR-012.
  • A vendored file that is dual-licensed or whose source could not be read: the record says unverified: and what to check, per FR-010.
  • A checkout with CRLF line ends: the same file, per FR-005.
  • Copies that a person already holds under the terms they received: they keep those terms, said once in LICENSING.md, per FR-008.

Assumptions

  • The PolyForm Project's own terms (LICENSE.md of its repository) allow the text to be copied unchanged, and the Required Notice: line goes beside it, not inside it.

Open questions

  • None.

Key entities

  • License standard - the official text as a typed Standard: issuer, name, version, location, license and SHA-256.
  • Required notice - the one line of the licensor's copyright that every LICENSE begins with.
  • Vendored record - the items of the repository that are not ours and the license of each.

Success criteria

SC-001success criterion

No LICENSE of this repository is written by hand, none is missing, and none is another license than the one the manifests name.

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

Libraries, license, Libraries, Libraries by concern, Build policy, findings and never failures

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