Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SPDX-License-Identifier = "CC0-1.0"
# This is last and override-level so the protocol-specification license cannot
# be shadowed by the documentation annotation.
[[annotations]]
path = ["spec-*.md", "apps/site/content/docs/spec-*.md", "LICENSE-specs"]
path = ["spec-*.md", "apps/site/content/docs/spec-*.md", "packages/conformance-suite/spec/spec-*.md", "LICENSE-specs"]
precedence = "override"
SPDX-FileCopyrightText = "The PDP-Connect Contributors"
SPDX-License-Identifier = "LicenseRef-CSL-1.0"
1,916 changes: 1,916 additions & 0 deletions packages/conformance-suite/spec/spec-core.md

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions packages/conformance-suite/src/requirements/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,15 @@ export interface Requirement {
*/
export const SPEC_SOURCE = {
document: "PDPP Core",
version: "v0.1.0",
version: "v0.1.0 public-review draft (3 September 2026)",
section: "9",
/** Repository-relative path of the normative source. */
path: "spec-core.md",
/**
* Repository-relative path of the normative source. This is a frozen copy of
* spec-core.md at babd0ef3fb, the text this catalogue was transcribed from. The
* v0.1.0 lock changed spec-core.md after that; until the catalogue and matrix
* are re-transcribed, the suite judges against this copy, not the root file.
*/
path: "packages/conformance-suite/spec/spec-core.md",
} as const;

const AUTHORIZATION_SERVER: readonly Requirement[] = [
Expand Down
4 changes: 2 additions & 2 deletions packages/conformance-suite/test/normative-matrix.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { test } from "node:test";
import { fileURLToPath } from "node:url";
import { REQUIREMENTS } from "../src/requirements/catalog.ts";
import { REQUIREMENTS, SPEC_SOURCE } from "../src/requirements/catalog.ts";
import { CLAUSE_MATRIX, parseSpecVersion } from "../src/requirements/matrix.ts";
import { ALL_CASES } from "../src/suite.ts";

const REPO_ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
const SPEC = readFileSync(join(REPO_ROOT, "spec-core.md"), "utf8");
const SPEC = readFileSync(join(REPO_ROOT, SPEC_SOURCE.path), "utf8");
const SPEC_LINES = SPEC.split("\n");
const HEADING = /^#{1,6} (.+)$/;
const EXPLICIT_ANCHOR = /\{#([^}]+)\}/;
Expand Down
3 changes: 2 additions & 1 deletion packages/conformance-suite/test/requirements-report.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
rollUpClauseResult,
} from "../src/report/requirements.ts";
import { buildReport, type CaseResult, exitCodeFor } from "../src/report/result.ts";
import { SPEC_SOURCE } from "../src/requirements/catalog.ts";
import { CLAUSE_MATRIX, type Observable } from "../src/requirements/matrix.ts";
import { clauseFragments, normalizeSpecText } from "../src/requirements/spec-scan.ts";
import { ALL_CASES, SUITE } from "../src/suite.ts";
Expand Down Expand Up @@ -158,7 +159,7 @@ test("the header names the spec file, its SHA-256, the suite version, the target
reportWith(() => "pass"),
SPEC
);
assert.equal(out.header.specFile, "spec-core.md");
assert.equal(out.header.specFile, SPEC_SOURCE.path);
assert.equal(out.header.specSha256, createHash("sha256").update(SPEC).digest("hex"));
assert.equal(out.header.suiteVersion, SUITE.version);
assert.equal(out.header.targetId, "synthetic");
Expand Down
4 changes: 2 additions & 2 deletions packages/conformance-suite/test/spec-completeness.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { describe, it, test } from "node:test";
import { fileURLToPath } from "node:url";
import { REQUIREMENTS } from "../src/requirements/catalog.ts";
import { REQUIREMENTS, SPEC_SOURCE } from "../src/requirements/catalog.ts";
import { SPEC_SENTENCE_EXCLUSIONS } from "../src/requirements/exclusions.ts";
import { CLAUSE_MATRIX } from "../src/requirements/matrix.ts";
import {
Expand All @@ -25,7 +25,7 @@ import {
const PATTERN_BETA_ITEM = /beta item/;

const REPO_ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
const SPEC = readFileSync(join(REPO_ROOT, "spec-core.md"), "utf8");
const SPEC = readFileSync(join(REPO_ROOT, SPEC_SOURCE.path), "utf8");
const SPEC_LINES = SPEC.split("\n");
const CLAUSE_TEXTS = CLAUSE_MATRIX.map((clause) => clause.text);
const CONFORMANCE_SECTION = "9";
Expand Down
Loading