Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hub/docs/HUB-LAW.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ lockstep with `HubEvent::kind()` by a test that reads the function's own source.
| pairing + channels | `pairing_requested`, `pairing_confirmed`, `pairing_revoked`, `pair_message_posted`, `intro_requested`, `intro_responded` |
| devices | `device_enrolled`, `device_revoked` |
| obligations + trust | `obligation_opened`, `obligation_resolved`, `reputation_recorded` |
| degraded-window audit | `degraded_reconciled` (F0.1: the witnessed summary of infrastructure-failure windows — recorded by the hub at ignition, never member conduct) |
| vault unlock (audit) | `vault_unlock_requested`, `vault_unlock_attested`, `vault_unlock_resolved` |
| records | `event_recorded`, `lct_published`, `referenced_act` |

Expand Down
16 changes: 14 additions & 2 deletions hub/hub-daemon/src/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -910,13 +910,25 @@ fn event_summary(event: &HubEvent) -> String {
html_escape(&act.substance.uri),
)
}
HubEvent::ReputationRecorded { delta } => format!(
HubEvent::DegradedReconciled { count, first_ts, last_ts, by_source, .. } => format!(
"🛠 degraded window reconciled <span class=\"muted\">— {} infrastructure event(s), \
{} → {}, by source: {}</span>",
count,
first_ts.format("%Y-%m-%d %H:%M"),
last_ts.format("%Y-%m-%d %H:%M"),
html_escape(
&by_source.iter().map(|(k, v)| format!("{k}×{v}")).collect::<Vec<_>>().join(", ")
),
),
HubEvent::ReputationRecorded { delta, applied } => format!(
"📊 reputation Δ for {} <span class=\"muted\">in role</span> {} \
<span class=\"muted\">(ΔT3 {:+.3}, ΔV3 {:+.3}) — {}</span>",
<span class=\"muted\">(ΔT3 {:+.3}, ΔV3 {:+.3}, class {:?}, {}) — {}</span>",
html_escape(&delta.subject_lct),
html_escape(&delta.role_lct),
delta.net_trust_change(),
delta.net_value_change(),
delta.class,
if *applied { "applied" } else { "recorded-only" },
html_escape(&delta.reason),
),
HubEvent::ObligationOpened { request_id, subject_lct, role_lct, due_at, criticality, .. } => format!(
Expand Down
219 changes: 206 additions & 13 deletions hub/hub-daemon/src/rest.rs

Large diffs are not rendered by default.

Loading
Loading