Remove membership classes (spec, registry schema, enforcement); no roles or tiers

This commit is contained in:
George Coles
2026-09-15 12:59:35 -04:00
parent 276fe5e438
commit dfa1fb1143
16 changed files with 68 additions and 222 deletions
+14 -22
View File
@@ -91,7 +91,7 @@ async fn application_pending_then_approve_then_enroll_binds_key() {
assert_eq!(dup.status(), reqwest::StatusCode::CONFLICT);
// MA approves: member stub; a member token then authorizes key enrollment
commands::registry_approve(&dir, id, None, None).unwrap();
commands::registry_approve(&dir, id, None).unwrap();
let signed = registry::load_registry(&dir.join("registry.json")).unwrap();
assert!(signed.doc.members.iter().any(|member| member.id == id));
let apps = registry::load_applications(&dir.join("applications.json")).unwrap();
@@ -137,7 +137,7 @@ async fn application_pending_then_approve_then_enroll_binds_key() {
}
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn signup_stores_private_application_and_class() {
async fn signup_stores_private_application() {
let root = tempfile::tempdir().unwrap();
let dir = setup_ma(root.path());
let base = spawn_registry_server(&dir).await;
@@ -181,8 +181,7 @@ async fn signup_stores_private_application_and_class() {
Some("keswick-research.frx.invalid")
);
// private application record holds the contract details; applicants do not
// self-declare a class — the MA assigns it at approval
// private application record holds the contract details
let apps = registry::load_applications(&dir.join("applications.json")).unwrap();
assert_eq!(apps.len(), 1);
let app = &apps[0];
@@ -192,25 +191,18 @@ async fn signup_stores_private_application_and_class() {
assert_eq!(app.email, "ops@keswick.example");
assert_eq!(app.payment, "IBAN XX00 0000");
assert_eq!(app.privacy_link, "https://keswick.example/privacy");
assert_eq!(app.class, "source");
assert_eq!(app.status, "pending");
// approval with --class enrichment creates the member with that class
commands::registry_approve(
&dir,
"keswick-research.frx.invalid",
None,
Some(frxd::config::CLASS_ENRICHMENT),
)
.unwrap();
// approval creates the member entry
commands::registry_approve(&dir, "keswick-research.frx.invalid", None).unwrap();
let signed = registry::load_registry(&dir.join("registry.json")).unwrap();
let member = signed
.doc
.members
.iter()
.find(|m| m.id == "keswick-research.frx.invalid")
.unwrap();
assert_eq!(member.class, frxd::config::CLASS_ENRICHMENT);
assert!(
signed
.doc
.members
.iter()
.any(|m| m.id == "keswick-research.frx.invalid")
);
// public registry stays minimal: no org data in the signed snapshot
let raw = std::fs::read_to_string(dir.join("registry.json")).unwrap();
@@ -229,7 +221,7 @@ async fn invite_reissues_token_per_node() {
.unwrap();
submit_application(&http, &base, "Multi Node").await;
let id = "multi-node.frx.invalid";
commands::registry_approve(&dir, id, None, None).unwrap();
commands::registry_approve(&dir, id, None).unwrap();
let enroll = |token: String, pubkey: String| {
let http = http.clone();
@@ -282,7 +274,7 @@ async fn wizard_enrolls_and_writes_config() {
let http = reqwest::Client::new();
submit_application(&http, &base, "Wizard Test").await;
let id = "wizard-test.frx.invalid";
commands::registry_approve(&dir, id, None, None).unwrap();
commands::registry_approve(&dir, id, None).unwrap();
let token = commands::registry_token(&dir, id, None).unwrap();
let signed = registry::load_registry(&dir.join("registry.json")).unwrap();
let credentials = format!(