Remove fictional sync authority
This commit is contained in:
parent
8f2ccac120
commit
99bc1bb335
8 changed files with 30 additions and 10 deletions
|
|
@ -198,7 +198,7 @@ fn run_smoke(args: Args) -> Result<Value> {
|
|||
require_text(&request_text, "safe_action_family = \"repo.sync_request\"")?;
|
||||
require_text(&request_text, "[request]")?;
|
||||
require_text(&request_text, "status = \"awaiting-upstream-main-proof\"")?;
|
||||
require_text(&request_text, "requested_owner = \"Bifrost\"")?;
|
||||
require_text(&request_text, "proof_owner = \"Bifrost\"")?;
|
||||
require_text(
|
||||
&request_text,
|
||||
"requested_effect = \"prove-published-commit-contained-by-upstream-main\"",
|
||||
|
|
@ -252,6 +252,8 @@ fn run_smoke(args: Args) -> Result<Value> {
|
|||
require_text(&request_text, "credit_ledger_authorized = false")?;
|
||||
require_text(&request_text, "hands_action_authorized = false")?;
|
||||
require_text(&request_text, "cross_body_mutation_authorized = false")?;
|
||||
require_text(&request_text, "bifrost_upstream_proof_required = true")?;
|
||||
require_text(&request_text, "maintainer_review_receipt_required = true")?;
|
||||
require_text(&request_text, "private_state_exposed = false")?;
|
||||
|
||||
let summary = json!({
|
||||
|
|
|
|||
|
|
@ -4107,7 +4107,7 @@ fn derive_repo_sync_request_plan(
|
|||
"[request]".to_string(),
|
||||
format!("id = {}", toml_basic_string(&request_id)),
|
||||
"status = \"awaiting-upstream-main-proof\"".to_string(),
|
||||
"requested_owner = \"Bifrost\"".to_string(),
|
||||
"proof_owner = \"Bifrost\"".to_string(),
|
||||
"requested_effect = \"prove-published-commit-contained-by-upstream-main\"".to_string(),
|
||||
format!(
|
||||
"publication_request_ref = {}",
|
||||
|
|
@ -4150,7 +4150,8 @@ fn derive_repo_sync_request_plan(
|
|||
"service_lifecycle_authority = false".to_string(),
|
||||
"cross_body_mutation_authorized = false".to_string(),
|
||||
"private_verse_rummaging = false".to_string(),
|
||||
"operator_or_maintainer_authority_required = true".to_string(),
|
||||
"bifrost_upstream_proof_required = true".to_string(),
|
||||
"maintainer_review_receipt_required = true".to_string(),
|
||||
String::new(),
|
||||
"[verification]".to_string(),
|
||||
"asks = [".to_string(),
|
||||
|
|
|
|||
|
|
@ -674,7 +674,7 @@ impl RepoSyncRequest {
|
|||
}
|
||||
pub(super) fn awaits_upstream_proof(&self) -> bool {
|
||||
self.request.status == "awaiting-upstream-main-proof"
|
||||
&& self.request.requested_owner == "Bifrost"
|
||||
&& self.request.proof_owner == "Bifrost"
|
||||
&& self.request.requested_effect == "prove-published-commit-contained-by-upstream-main"
|
||||
&& !self.request.publication_request_ref.is_empty()
|
||||
}
|
||||
|
|
@ -715,13 +715,14 @@ impl RepoSyncRequest {
|
|||
&& !a.service_lifecycle_authority
|
||||
&& !a.cross_body_mutation_authorized
|
||||
&& !a.private_verse_rummaging
|
||||
&& a.operator_or_maintainer_authority_required
|
||||
&& a.bifrost_upstream_proof_required
|
||||
&& a.maintainer_review_receipt_required
|
||||
}
|
||||
}
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct RepoSyncRequestBody {
|
||||
status: String,
|
||||
requested_owner: String,
|
||||
proof_owner: String,
|
||||
requested_effect: String,
|
||||
publication_request_ref: String,
|
||||
}
|
||||
|
|
@ -762,7 +763,8 @@ struct RepoSyncAuthority {
|
|||
service_lifecycle_authority: bool,
|
||||
cross_body_mutation_authorized: bool,
|
||||
private_verse_rummaging: bool,
|
||||
operator_or_maintainer_authority_required: bool,
|
||||
bifrost_upstream_proof_required: bool,
|
||||
maintainer_review_receipt_required: bool,
|
||||
}
|
||||
pub(super) fn parse_repo_sync_request(text: &str) -> Result<RepoSyncRequest> {
|
||||
toml::from_str(text).context("sync request is not valid typed TOML")
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ summary = "summary"
|
|||
private_state_exposed = false
|
||||
[request]
|
||||
status = "awaiting-upstream-main-proof"
|
||||
requested_owner = "Bifrost"
|
||||
proof_owner = "Bifrost"
|
||||
requested_effect = "prove-published-commit-contained-by-upstream-main"
|
||||
publication_request_ref = "publication"
|
||||
[antecedents]
|
||||
|
|
@ -354,7 +354,8 @@ hands_action_authorized = false
|
|||
service_lifecycle_authority = false
|
||||
cross_body_mutation_authorized = false
|
||||
private_verse_rummaging = false
|
||||
operator_or_maintainer_authority_required = true
|
||||
bifrost_upstream_proof_required = true
|
||||
maintainer_review_receipt_required = true
|
||||
"#;
|
||||
let request = parse_repo_sync_request(text).expect("fixture is typed TOML");
|
||||
assert!(!request.has_authority_seals());
|
||||
|
|
|
|||
Reference in a new issue