Prove Bifrost accounting closure in family smokes

This commit is contained in:
Meta Vens 2026-06-21 14:09:29 +01:00
commit 6d33bc8134
5 changed files with 154 additions and 19 deletions

View file

@ -195,7 +195,39 @@ fn run_smoke(args: Args) -> Result<Value> {
let close = read_json(&close_path)?;
let request_text = fs::read_to_string(repo.join(target_path))
.with_context(|| format!("failed to read {}", repo.join(target_path).display()))?;
let bifrost_ledger = cargo_json(
let open_bifrost_ledger = cargo_json(
&manifest,
"epiphany-verse-query",
&[
"bifrost-ledger",
"--store",
path_str(&local_verse)?,
"--runtime-id",
"repo-artifact-acceptance-request-family-smoke",
],
&root,
)?;
let artifact_acceptance_receipt = cargo_json(
&manifest,
"epiphany-verse-query",
&[
"bifrost-artifact-acceptance",
"--store",
path_str(&local_verse)?,
"--runtime-id",
"repo-artifact-acceptance-request-family-smoke",
"--artifact-ref",
"artifact://repo-artifact-acceptance-request-family/final",
"--ledger-entry-id",
"bifrost-ledger:repo-artifact-acceptance-request-family",
"--review-receipt",
"maintainer-review:repo-artifact-acceptance-request-family",
"--public-proof-ref",
"public-proof:repo-artifact-acceptance-request-family",
],
&root,
)?;
let closed_bifrost_ledger = cargo_json(
&manifest,
"epiphany-verse-query",
&[
@ -311,15 +343,54 @@ fn run_smoke(args: Args) -> Result<Value> {
"maintainer_or_bifrost_acceptance_authority_required = true",
)?;
require_text(&request_text, "private_state_exposed = false")?;
require_bifrost_accounting_row(&bifrost_ledger, "artifact-acceptance-request", "open", 3, 1)?;
require_bifrost_accounting_row(
&open_bifrost_ledger,
"artifact-acceptance-request",
"open",
3,
1,
)?;
require_tui_row_contains(
&bifrost_ledger,
&open_bifrost_ledger,
&["accountingTuiRows"],
"BIFROST-ACCOUNTING | artifact-acceptance-request",
)?;
require_tui_row_contains(&bifrost_ledger, &["accountingTuiRows"], "status=open")?;
require_tui_row_contains(&bifrost_ledger, &["accountingTuiRows"], "request=present")?;
require_bool(&bifrost_ledger, &["privateStateExposed"], false)?;
require_tui_row_contains(&open_bifrost_ledger, &["accountingTuiRows"], "status=open")?;
require_tui_row_contains(
&open_bifrost_ledger,
&["accountingTuiRows"],
"request=present",
)?;
require_bool(&open_bifrost_ledger, &["privateStateExposed"], false)?;
require_eq(
&artifact_acceptance_receipt,
&["receiptId"],
"bifrost-artifact-acceptance-repo-artifact-acceptance-request-family",
)?;
require_eq(&artifact_acceptance_receipt, &["status"], "ok")?;
require_bool(
&artifact_acceptance_receipt,
&["privateStateExposed"],
false,
)?;
require_bifrost_accounting_row(
&closed_bifrost_ledger,
"artifact-acceptance-request",
"closed",
1,
1,
)?;
require_tui_row_contains(
&closed_bifrost_ledger,
&["accountingTuiRows"],
"acceptance=present",
)?;
require_tui_row_contains(
&closed_bifrost_ledger,
&["accountingTuiRows"],
"receipt=bifrost-artifact-acceptance-repo-artifact-acceptance-request-family",
)?;
require_bool(&closed_bifrost_ledger, &["privateStateExposed"], false)?;
let summary = json!({
"schemaVersion": "epiphany.repo_artifact_acceptance_request_family_smoke.v0",
@ -342,8 +413,10 @@ fn run_smoke(args: Args) -> Result<Value> {
"publicationAuthorized": false,
"upstreamSyncAuthorized": false,
"handsActionAuthorized": false,
"bifrostLedgerAccountingRowCount": bifrost_ledger["accountingRowCount"],
"bifrostArtifactAcceptanceRequestAccountingRow": bifrost_accounting_row_value(&bifrost_ledger, "artifact-acceptance-request")?,
"bifrostLedgerAccountingRowCount": closed_bifrost_ledger["accountingRowCount"],
"bifrostArtifactAcceptanceReceiptId": artifact_acceptance_receipt["receiptId"],
"bifrostArtifactAcceptanceOpenAccountingRow": bifrost_accounting_row_value(&open_bifrost_ledger, "artifact-acceptance-request")?,
"bifrostArtifactAcceptanceClosedAccountingRow": bifrost_accounting_row_value(&closed_bifrost_ledger, "artifact-acceptance-request")?,
"privateStateExposed": false,
});
write_json(&smoke_dir.join("summary.json"), &summary)?;

View file

@ -186,7 +186,43 @@ fn run_smoke(args: Args) -> Result<Value> {
let close = read_json(&close_path)?;
let request_text = fs::read_to_string(repo.join(target_path))
.with_context(|| format!("failed to read {}", repo.join(target_path).display()))?;
let bifrost_ledger = cargo_json(
let open_bifrost_ledger = cargo_json(
&manifest,
"epiphany-verse-query",
&[
"bifrost-ledger",
"--store",
path_str(&local_verse)?,
"--runtime-id",
"repo-metrics-request-family-smoke",
],
&root,
)?;
let metrics_receipt = cargo_json(
&manifest,
"epiphany-verse-query",
&[
"bifrost-metrics",
"--store",
path_str(&local_verse)?,
"--runtime-id",
"repo-metrics-request-family-smoke",
"--accepted-artifact-receipt-id",
"bifrost-artifact-acceptance:repo-metrics-request-family",
"--model-spend-receipt",
"model-spend:repo-metrics-request-family",
"--review-load-receipt",
"review-load:repo-metrics-request-family",
"--credit-receipt",
"credit-readback:repo-metrics-request-family",
"--public-proof-ref",
"public-proof:repo-metrics-request-family",
"--metrics-summary",
"model spend, review load, accepted artifact, and credit readback recorded for metrics smoke",
],
&root,
)?;
let closed_bifrost_ledger = cargo_json(
&manifest,
"epiphany-verse-query",
&[
@ -305,15 +341,39 @@ fn run_smoke(args: Args) -> Result<Value> {
"bifrost_or_maintainer_metrics_authority_required = true",
)?;
require_text(&request_text, "private_state_exposed = false")?;
require_bifrost_accounting_row(&bifrost_ledger, "metrics-request", "open", 3, 1)?;
require_bifrost_accounting_row(&open_bifrost_ledger, "metrics-request", "open", 3, 1)?;
require_tui_row_contains(
&bifrost_ledger,
&open_bifrost_ledger,
&["accountingTuiRows"],
"BIFROST-ACCOUNTING | metrics-request",
)?;
require_tui_row_contains(&bifrost_ledger, &["accountingTuiRows"], "status=open")?;
require_tui_row_contains(&bifrost_ledger, &["accountingTuiRows"], "request=present")?;
require_bool(&bifrost_ledger, &["privateStateExposed"], false)?;
require_tui_row_contains(&open_bifrost_ledger, &["accountingTuiRows"], "status=open")?;
require_tui_row_contains(
&open_bifrost_ledger,
&["accountingTuiRows"],
"request=present",
)?;
require_bool(&open_bifrost_ledger, &["privateStateExposed"], false)?;
require_eq(
&metrics_receipt,
&["receiptId"],
"bifrost-metrics-repo-metrics-request-family",
)?;
require_eq(&metrics_receipt, &["status"], "ok")?;
require_bool(&metrics_receipt, &["privateStateExposed"], false)?;
require_bifrost_accounting_row(&closed_bifrost_ledger, "metrics-request", "closed", 2, 1)?;
require_tui_row_contains(
&closed_bifrost_ledger,
&["accountingTuiRows"],
"metrics=present",
)?;
require_tui_row_contains(&closed_bifrost_ledger, &["accountingTuiRows"], "credit=1")?;
require_tui_row_contains(
&closed_bifrost_ledger,
&["accountingTuiRows"],
"receipt=bifrost-metrics-repo-metrics-request-family",
)?;
require_bool(&closed_bifrost_ledger, &["privateStateExposed"], false)?;
let summary = json!({
"schemaVersion": "epiphany.repo_metrics_request_family_smoke.v0",
@ -338,8 +398,10 @@ fn run_smoke(args: Args) -> Result<Value> {
"publicationAuthorized": false,
"upstreamSyncAuthorized": false,
"handsActionAuthorized": false,
"bifrostLedgerAccountingRowCount": bifrost_ledger["accountingRowCount"],
"bifrostMetricsRequestAccountingRow": bifrost_accounting_row_value(&bifrost_ledger, "metrics-request")?,
"bifrostLedgerAccountingRowCount": closed_bifrost_ledger["accountingRowCount"],
"bifrostMetricsReceiptId": metrics_receipt["receiptId"],
"bifrostMetricsOpenAccountingRow": bifrost_accounting_row_value(&open_bifrost_ledger, "metrics-request")?,
"bifrostMetricsClosedAccountingRow": bifrost_accounting_row_value(&closed_bifrost_ledger, "metrics-request")?,
"privateStateExposed": false,
});
write_json(&smoke_dir.join("summary.json"), &summary)?;

View file

@ -192,7 +192,7 @@ remembers doctrine; the branch remembers the blade.
- `eve-connect` is the compact connection actuator for the advertised Eve surface; use it when the operator wants a typed collaboration receipt for Persona's public surface without opening the whole local Verse.
- `collaboration-feedback` is the compact public-feedback actuator; use it after or instead of manual `eve-connect` when Persona/human discussion should be routed to Imagination consensus discovery as typed local Verse receipts. Its JSON now points the next agent at Eve and Bifrost follow-on rites.
- `bifrost-publication` is the compact non-mutating Bifrost publication proof; use it to prove body-change routing, credit, and GitHub publication receipt state without performing GitHub mutation. Its JSON now points back to compact swarm overview and tool-directory readback.
- `bifrost-artifact-acceptance` and `bifrost-metrics` are compact Bifrost/Maintainer closure rites for the safe-family planning/accounting lanes. They write typed accepted-artifact and metrics receipts from explicit artifact/public-proof/review/model-spend/review-load/credit refs, verify latest receipt readback, and let `bifrost-ledger` close `artifact-acceptance-request` and `metrics-request` rows from Bifrost-owned receipts instead of request cargo. Direct proofs used `.epiphany-smoke\repo-artifact-acceptance-request-family-20260621-125053` and `.epiphany-smoke\repo-metrics-request-family-20260621-125549`; wrapper proof `local-20260621-135823-262-c40f73b6` read the closed metrics row with `privateStateExposed=False`.
- `bifrost-artifact-acceptance` and `bifrost-metrics` are compact Bifrost/Maintainer closure rites for the safe-family planning/accounting lanes. They write typed accepted-artifact and metrics receipts from explicit artifact/public-proof/review/model-spend/review-load/credit refs, verify latest receipt readback, and let `bifrost-ledger` close `artifact-acceptance-request` and `metrics-request` rows from Bifrost-owned receipts instead of request cargo. The request-family smokes now prove both states: `.epiphany-smoke\repo-artifact-acceptance-request-family-20260621-130520` and `.epiphany-smoke\repo-metrics-request-family-20260621-130635` first assert open request rows, then write final receipts and assert closed rows; wrapper proof `local-20260621-140740-750-2815f6f7` read the closed metrics row with `privateStateExposed=False`.
- `bifrost-ledger` is the compact Bifrost/Imagination readback rite; use it after collaboration, publication, accepted-artifact, or metrics writes to see the latest body-change, public-proof, accepted-artifact, metrics, GitHub, feedback, consensus, credit/review-count, and accounting closure rows without opening the full local Verse.
- `tool-directory` is the non-mutating daemon tool sight rite; it shows which globally available daemon-hosted tools any agent can invoke through typed intents and receipts, while still exposing host readiness.
- `tool-invoke` now embeds compact readbacks for common daemon-hosted tools. Status calls return `daemonStatusReadback`, Eve calls return `eveConnectionReadback`, Self `service-health` returns Idunn-owned `serviceHealthReadback`, Self `service-policy-directory` returns Idunn-owned `servicePolicyDirectoryReadback`, Self `swarm-online-runbook` returns Idunn-owned `swarmOnlineRunbookReadback`, and Hands/Soul authority tools return `authorityToolReadback` with gate, input contract, receipt contract, intent/receipt routes, host cluster, and private-state seal. This proves global tool ergonomics without moving action, verification, or daemon lifecycle ownership into the wrapper; live proofs routed Persona to Hands `repo-action` (`local-20260619-021628-143-7bf7f2e0`), Soul `verify` (`local-20260619-021701-458-852cfa6f`), Self `swarm-online-runbook` (`local-20260619-032244-273-acb3c6a4`), and Self `service-policy-directory` (`local-20260619-035238-138-633f3ff0`) with `privateStateExposed=false`.

Binary file not shown.

File diff suppressed because one or more lines are too long