1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//! Governance presence (C-064): required before a public 1.0
//! announcement. Pins the documents, their enforceable commitments
//! (fix SLAs, advisory reporting URL, referenced specs), and the
//! files the process names (CODEOWNERS, templates, RFC template).
use std::path::Path;
fn root(name: &str) -> String {
let path = Path::new(env!("CARGO_MANIFEST_DIR")).join("..").join(name);
std::fs::read_to_string(&path).unwrap_or_else(|e| panic!("{name} missing: {e}"))
}
#[test]
fn governance_documents_exist_with_substance() {
// Presence + key-phrase pins (not full prose assertions —
// wording evolves, commitments must not silently vanish).
let required: &[(&str, &[&str])] = &[
(
"SECURITY.md",
&[
"private security advisory",
"3 days",
"14 days",
"30 days",
"RatioArtificiosa/solid-lang/security/advisories",
"spec/threat-model.md",
],
),
(
"CODE_OF_CONDUCT.md",
&[
"harassment-free",
"private security advisory",
"CODEOWNERS",
"contributor-covenant.org",
],
),
(
"CONTRIBUTING.md",
&[
"Spec before code",
"RFC",
"Non-goals",
"--locked",
"DCO",
"CODEOWNERS",
],
),
(
"docs/rfcs/README.md",
&[
"Lifecycle",
"Non-goals",
"14 days",
"Fast-track",
"CODEOWNERS",
],
),
(
"docs/rfcs/0000-template.md",
&[
"Non-goals check",
"Test plan",
"Status: draft",
"Conformance",
],
),
(".github/CODEOWNERS", &["@RatioArtificiosa"]),
(
".github/PULL_REQUEST_TEMPLATE.md",
&["Checklist item or RFC", "standing rules"],
),
(
".github/ISSUE_TEMPLATE/bug_report.md",
&["Minimal", "reproducer"],
),
(
".github/ISSUE_TEMPLATE/proposal.md",
&["rfc-draft", "Non-goals check"],
),
];
for (rel, phrases) in required {
let text = root(rel);
for phrase in *phrases {
assert!(text.contains(phrase), "{rel} missing {phrase:?}");
}
}
}