Separate metrics accounting and review evidence
This commit is contained in:
parent
4dde747ee8
commit
1f5f8d1d64
10 changed files with 51 additions and 15 deletions
|
|
@ -1083,7 +1083,7 @@ fn run_cli() -> Result<()> {
|
|||
|| args.receipt_status.is_some()
|
||||
{
|
||||
anyhow::bail!(
|
||||
"bifrost-metrics inspects a pending repo request only; Bifrost/Maintainer owns accepted artifact, spend, review load, credit, proof, summary, and receipt result fields"
|
||||
"bifrost-metrics inspects a pending request only; Bifrost owns accounting fields and Maintainer owns review-load evidence"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -1110,7 +1110,7 @@ fn run_cli() -> Result<()> {
|
|||
"creditReadbackReceiptIds": [],
|
||||
"publicProofRef": null,
|
||||
"metricsSummary": null,
|
||||
"responseOwner": "Bifrost/Maintainer",
|
||||
"responseOwner": "Bifrost",
|
||||
"commands": {
|
||||
"swarmOverview": WRAPPER_OVERVIEW_COMMAND,
|
||||
"bifrostMetrics": WRAPPER_BIFROST_METRICS_COMMAND,
|
||||
|
|
@ -7802,7 +7802,7 @@ fn bifrost_ledger_report(
|
|||
&mut tui_rows,
|
||||
BifrostLedgerRow {
|
||||
document_kind: "metrics-receipt".to_string(),
|
||||
owner: "Bifrost/Maintainer".to_string(),
|
||||
owner: "Bifrost".to_string(),
|
||||
id: receipt.receipt_id.clone(),
|
||||
status: receipt.status.clone(),
|
||||
route: receipt.artifact_acceptance_receipt_id.clone(),
|
||||
|
|
@ -8323,7 +8323,7 @@ fn push_metrics_accounting_row(
|
|||
tui_rows,
|
||||
BifrostAccountingRow {
|
||||
lane: "metrics-request".to_string(),
|
||||
owner: "Bifrost/Maintainer".to_string(),
|
||||
owner: "Bifrost".to_string(),
|
||||
status: bifrost_accounting_status(
|
||||
false,
|
||||
latest_request.is_some() || latest_receipt.is_some(),
|
||||
|
|
|
|||
|
|
@ -4834,7 +4834,11 @@ fn derive_repo_metrics_request_plan(
|
|||
"[request]".to_string(),
|
||||
format!("id = {}", toml_basic_string(&request_id)),
|
||||
"status = \"awaiting-metrics-review\"".to_string(),
|
||||
"requested_owner = \"Bifrost/Maintainer\"".to_string(),
|
||||
"routing_owner = \"Self\"".to_string(),
|
||||
"accounting_owner = \"Bifrost\"".to_string(),
|
||||
"review_evidence_owner = \"Maintainer\"".to_string(),
|
||||
"spend_receipt_required = true".to_string(),
|
||||
"review_load_receipt_required = true".to_string(),
|
||||
"requested_effect = \"record-compute-review-and-artifact-accounting\"".to_string(),
|
||||
format!(
|
||||
"publication_request_ref = {}",
|
||||
|
|
@ -4889,7 +4893,8 @@ fn derive_repo_metrics_request_plan(
|
|||
"service_lifecycle_authority = false".to_string(),
|
||||
"cross_body_mutation_authorized = false".to_string(),
|
||||
"private_verse_rummaging = false".to_string(),
|
||||
"bifrost_or_maintainer_metrics_authority_required = true".to_string(),
|
||||
"bifrost_accounting_required = true".to_string(),
|
||||
"maintainer_review_evidence_required = true".to_string(),
|
||||
String::new(),
|
||||
"[verification]".to_string(),
|
||||
"asks = [".to_string(),
|
||||
|
|
|
|||
|
|
@ -114,7 +114,11 @@ impl RepoMetricsRequest {
|
|||
|
||||
pub(super) fn awaits_owned_review(&self) -> bool {
|
||||
self.request.status == "awaiting-metrics-review"
|
||||
&& self.request.requested_owner == "Bifrost/Maintainer"
|
||||
&& self.request.routing_owner == "Self"
|
||||
&& self.request.accounting_owner == "Bifrost"
|
||||
&& self.request.review_evidence_owner == "Maintainer"
|
||||
&& self.request.spend_receipt_required
|
||||
&& self.request.review_load_receipt_required
|
||||
&& self.request.requested_effect == "record-compute-review-and-artifact-accounting"
|
||||
&& !self.request.publication_request_ref.is_empty()
|
||||
&& !self.request.credit_request_ref.is_empty()
|
||||
|
|
@ -169,14 +173,19 @@ impl RepoMetricsRequest {
|
|||
&& !a.service_lifecycle_authority
|
||||
&& !a.cross_body_mutation_authorized
|
||||
&& !a.private_verse_rummaging
|
||||
&& a.bifrost_or_maintainer_metrics_authority_required
|
||||
&& a.bifrost_accounting_required
|
||||
&& a.maintainer_review_evidence_required
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct RepoMetricsRequestBody {
|
||||
status: String,
|
||||
requested_owner: String,
|
||||
routing_owner: String,
|
||||
accounting_owner: String,
|
||||
review_evidence_owner: String,
|
||||
spend_receipt_required: bool,
|
||||
review_load_receipt_required: bool,
|
||||
requested_effect: String,
|
||||
publication_request_ref: String,
|
||||
credit_request_ref: String,
|
||||
|
|
@ -231,7 +240,8 @@ struct RepoMetricsAuthority {
|
|||
service_lifecycle_authority: bool,
|
||||
cross_body_mutation_authorized: bool,
|
||||
private_verse_rummaging: bool,
|
||||
bifrost_or_maintainer_metrics_authority_required: bool,
|
||||
bifrost_accounting_required: bool,
|
||||
maintainer_review_evidence_required: bool,
|
||||
}
|
||||
|
||||
pub(super) fn parse_repo_metrics_request(text: &str) -> Result<RepoMetricsRequest> {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,11 @@ summary = "summary"
|
|||
private_state_exposed = false
|
||||
[request]
|
||||
status = "awaiting-metrics-review"
|
||||
requested_owner = "Bifrost/Maintainer"
|
||||
routing_owner = "Self"
|
||||
accounting_owner = "Bifrost"
|
||||
review_evidence_owner = "Maintainer"
|
||||
spend_receipt_required = true
|
||||
review_load_receipt_required = true
|
||||
requested_effect = "record-compute-review-and-artifact-accounting"
|
||||
publication_request_ref = "publication"
|
||||
credit_request_ref = "credit"
|
||||
|
|
@ -129,7 +133,8 @@ hands_action_authorized = false
|
|||
service_lifecycle_authority = false
|
||||
cross_body_mutation_authorized = false
|
||||
private_verse_rummaging = false
|
||||
bifrost_or_maintainer_metrics_authority_required = true
|
||||
bifrost_accounting_required = true
|
||||
maintainer_review_evidence_required = true
|
||||
"#;
|
||||
let request = parse_repo_metrics_request(text).expect("fixture is typed TOML");
|
||||
assert!(!request.has_authority_seals());
|
||||
|
|
|
|||
|
|
@ -4681,7 +4681,7 @@ pub fn epiphany_cultmesh_bifrost_artifact_acceptance_receipt_for_map_entry(
|
|||
notes: vec![
|
||||
"Bifrost artifact acceptance receipt closes accepted-artifact accounting for Mind-admitted branch work.".to_string(),
|
||||
"This receipt carries artifact, review, ledger, commit, and path refs only; private worker/operator/agent state remains sealed.".to_string(),
|
||||
"Repo-work request cargo may ask for this receipt, but Bifrost/Maintainer owns acceptance.".to_string(),
|
||||
"Repo-work request cargo may ask for this receipt; Maintainer owns acceptance and Bifrost owns accounting.".to_string(),
|
||||
],
|
||||
}
|
||||
}
|
||||
|
|
@ -4743,7 +4743,7 @@ pub fn epiphany_cultmesh_bifrost_metrics_receipt_for_map_entry(
|
|||
notes: vec![
|
||||
"Bifrost metrics receipt closes model-spend, review-load, accepted-artifact, and credit-readback accounting for branch work.".to_string(),
|
||||
"Metrics are operator-safe refs and summaries, not private worker transcripts or raw model streams.".to_string(),
|
||||
"Repo-work request cargo may ask for this receipt, but Bifrost/Maintainer owns accounting.".to_string(),
|
||||
"Repo-work request cargo may ask for this receipt; Bifrost owns accounting and Maintainer owns review-load evidence.".to_string(),
|
||||
],
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue