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
16 changes: 8 additions & 8 deletions openvtc-core/src/persona/binding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ impl BindingSummary {
.clone()
.or_else(|| self.profile_id.clone())
.unwrap_or_else(|| "an unnamed face".to_string());
let facts = if self.claim_count == 1 {
"1 fact".to_string()
let attributes = if self.claim_count == 1 {
"1 attribute".to_string()
} else {
format!("{} facts", self.claim_count)
format!("{} attributes", self.claim_count)
};
format!("wears: {label} ({facts})")
format!("wears: {label} ({attributes})")
}
}

Expand Down Expand Up @@ -228,7 +228,7 @@ mod tests {
claim_count: 3,
..Default::default()
};
assert_eq!(s.describe(), "wears: work (3 facts)");
assert_eq!(s.describe(), "wears: work (3 attributes)");
}

/// One claim is not "1 claims". Small, and the kind of thing that makes a
Expand All @@ -241,7 +241,7 @@ mod tests {
claim_count: 1,
..Default::default()
};
assert_eq!(s.describe(), "wears: gaming (1 fact)");
assert_eq!(s.describe(), "wears: gaming (1 attribute)");
}

/// A profile with no label falls back to its id, and then to a phrase —
Expand All @@ -255,13 +255,13 @@ mod tests {
claim_count: 2,
..Default::default()
};
assert_eq!(by_id.describe(), "wears: 01J8 (2 facts)");
assert_eq!(by_id.describe(), "wears: 01J8 (2 attributes)");

let bare = BindingSummary {
bound: true,
claim_count: 2,
..Default::default()
};
assert_eq!(bare.describe(), "wears: an unnamed face (2 facts)");
assert_eq!(bare.describe(), "wears: an unnamed face (2 attributes)");
}
}
14 changes: 7 additions & 7 deletions openvtc-core/src/persona/disclosure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//! "disclose something now" button here would be a request with no requester —
//! the one shape the two-call gate exists to prevent.
//!
//! What the TUI can usefully answer is the question after the fact: what does
//! What the TUI can usefully answer is the question asked after the fact: what does
//! anyone already know, and how did they come to know it. That is this module.
//!
//! # A rung is not a detail
Expand Down Expand Up @@ -111,17 +111,17 @@ impl DisclosureRow {
}
}

/// The facts as one line: `email.work (whole), age.over18 (yes/no only)`.
/// The attributes as one line: `email.work (whole), age.over18 (yes/no only)`.
///
/// The rung travels with every fact rather than being summarised, because
/// The rung travels with every attribute rather than being summarised, because
/// there is no summary of a mixed release that is not misleading in one
/// direction or the other — and because severity inverts intuition: a
/// credential shown *whole* links the holder more than a fact they simply
/// credential shown *whole* links the holder more than an attribute they simply
/// asserted.
#[must_use]
pub fn describe_claims(&self) -> String {
if self.claims.is_empty() {
return "no facts recorded".to_string();
return "no attributes recorded".to_string();
}
self.claims
.iter()
Expand Down Expand Up @@ -178,7 +178,7 @@ mod tests {
/// Rungs are shown in the words the vocabulary fixes, and an unrecognised
/// one is passed through rather than mapped to a friendlier neighbour — the
/// four words carry a privacy ordering, so guessing would misstate how much
/// of the fact left.
/// of the attribute left.
#[test]
fn a_fact_carries_its_rung_into_the_row() {
let row = DisclosureRow::from_wire(&serde_json::json!({
Expand Down Expand Up @@ -224,6 +224,6 @@ mod tests {
#[test]
fn a_factless_record_says_so() {
let row = DisclosureRow::default();
assert_eq!(row.describe_claims(), "no facts recorded");
assert_eq!(row.describe_claims(), "no attributes recorded");
}
}
2 changes: 1 addition & 1 deletion openvtc-core/src/persona/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! The holder's own identity — the personas, the facts behind them, and what each
//! The holder's own identity — the personas, the attributes behind them, and what each
//! persona presents where.
//!
//! # Two meanings of "persona", and they compose
Expand Down
10 changes: 5 additions & 5 deletions openvtc-core/src/persona/pool.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! The attribute pool — the facts themselves, held once and projected many
//! The attribute pool — the attributes themselves, held once and projected many
//! times. **Holder-scoped**: above every trust context, and never readable
//! from inside one.
//!
Expand Down Expand Up @@ -94,7 +94,7 @@ impl ProvenanceKind {
///
/// Always shown beside the label, because it is the half people miss: a
/// credential is *provable* and carries the same issuer signature to every
/// verifier, which is the more consequential of the two facts and the less
/// verifier, which is the more consequential of the two attributes and the less
/// obvious one. Severity inverts intuition here — a credential shown whole
/// links more than a value the holder simply asserted — so the words must
/// not hide it.
Expand Down Expand Up @@ -174,7 +174,7 @@ impl PoolAttribute {
match self.label.as_deref() {
Some(label) if !label.trim().is_empty() => label,
_ if !self.claim_type.is_empty() => &self.claim_type,
_ => "(unnamed fact)",
_ => "(unnamed attribute)",
}
}

Expand Down Expand Up @@ -292,7 +292,7 @@ impl AttributeEdit {
pub fn refusal(kind: ProvenanceKind) -> Self {
Self::Refused(match kind {
ProvenanceKind::CredentialBacked => {
"This fact comes from a credential — typing over it would turn something \
"This attribute comes from a credential — typing over it would turn something \
provable into something you said. Change it at its source, or replace the \
credential."
.to_string()
Expand Down Expand Up @@ -542,7 +542,7 @@ mod tests {
assert_eq!(attr.revealed_value(true), "4242424242424242");
}

/// A type whose style is `none` is shown as it is held. Masking every fact
/// A type whose style is `none` is shown as it is held. Masking every attribute
/// would teach the reveal key as a reflex, and a reveal pressed by reflex
/// protects nothing.
#[test]
Expand Down
4 changes: 2 additions & 2 deletions openvtc-core/src/persona/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//! attribute, a `pinVersion` pin of one, an `override` of its value, and an
//! `inline` value that never enters the pool. [`put`] from here writes the
//! first, and a picker over the pool is exactly what that form is: tick the
//! facts this persona shows. It keeps "edit once, everywhere" true, which is the
//! attributes this persona shows. It keeps "edit once, everywhere" true, which is the
//! property a holder is relying on when they correct their address in one
//! place.
//!
Expand Down Expand Up @@ -147,7 +147,7 @@ impl ResolvedClaim {
/// rather than an omission. A resolved claim has no identity of its own to
/// reveal *one* of — a face is read as a whole — so the only reveal this
/// type could offer is the blanket one the mask exists to avoid. A holder
/// who wants to check a value reads it among their facts, one at a time.
/// who wants to check a value reads it among their attributes, one at a time.
#[must_use]
pub fn display_value(&self) -> String {
if self.stale {
Expand Down
4 changes: 3 additions & 1 deletion openvtc/src/health_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ impl VtaAccess {
// `--capabilities` narrows everywhere else it appears, and someone
// pasting that second line deserves to know why this one does not.
println!(" `persona-holder` is the exception that grants rather than narrows: it adds");
println!(" authority over your own identity — the facts and faces that sit above every");
println!(
" authority over your own identity — the attributes and faces that sit above every"
);
println!(" context — without widening this install's reach into any other context.");
println!();
}
Expand Down
4 changes: 2 additions & 2 deletions openvtc/src/state_handler/actions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ pub enum PersonaAction {
/// a listing fetched without values does not hold them, which is what makes
/// this an opt-in rather than a blindfold.
ToggleValues,
/// Show the selected fact's value unmasked, or stop showing it.
/// Show the selected attribute's value unmasked, or stop showing it.
///
/// One fact, not a mode: a claim type carrying a mask style is shown
/// One attribute, not a mode: a claim type carrying a mask style is shown
/// reduced even in a listing that asked for values, and this lifts that for
/// the row under the cursor only. Moving the selection puts it back.
RevealValue(usize),
Expand Down
8 changes: 4 additions & 4 deletions openvtc/src/state_handler/main_page/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ pub enum PersonaTab {
/// The persona DIDs themselves — a persona as an *identity*.
#[default]
Personas,
/// The attribute pool: the facts, held once.
/// The attribute pool: the attributes, held once.
Attributes,
/// Named projections over the pool.
Profiles,
Expand Down Expand Up @@ -447,7 +447,7 @@ impl PersonaTab {
pub fn label(self) -> &'static str {
match self {
PersonaTab::Personas => "Personas",
PersonaTab::Attributes => "Your facts",
PersonaTab::Attributes => "Your attributes",
PersonaTab::Profiles => "Faces",
PersonaTab::Communities => "Communities",
PersonaTab::Disclosures => "What has left",
Expand Down Expand Up @@ -746,12 +746,12 @@ pub struct IdentityState {
/// holder asking to see their own identity, so it is a keypress they make
/// on purpose and a network round-trip, not a display flag.
pub show_values: bool,
/// The one fact whose value is being shown unmasked, by `attribute_id`.
/// The one attribute whose value is being shown unmasked, by `attribute_id`.
///
/// One, and only while it is also the selected row — the render checks
/// both. Sensitivity is a property of the claim type, so a card number and
/// a date of birth are masked even in a listing the holder asked to see
/// (`openvtc_core::persona::claim_types`), and lifting that is a per-fact
/// (`openvtc_core::persona::claim_types`), and lifting that is a per-attribute
/// act rather than a mode the pane can be left in.
///
/// Cleared by moving the selection, changing tab, or a re-read. A reveal
Expand Down
14 changes: 7 additions & 7 deletions openvtc/src/state_handler/persona_actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//! This module is engineering-side: it keeps the spec's nouns
//! (`attribute`, `profile`, `binding`), because those are what it addresses on
//! the wire. The strings it *hands to the panel* — status lines, refusals — use
//! the vocabulary a person reads (`design-docs/persona-vocabulary.md`): a fact,
//! the vocabulary a person reads (`design-docs/persona-vocabulary.md`): an attribute,
//! a face, wearing one.
//!
//! # Questions are asked once, and correctly
Expand Down Expand Up @@ -118,7 +118,7 @@ pub(crate) fn apply(state: &mut State, action: &PersonaAction) -> PersonaEffect
p.open_profile = None;
p.status_message = None;
// A reveal is granted to one row on one tab. Coming back to the
// facts should find them masked again, not still open.
// attributes should find them masked again, not still open.
p.revealed_attribute = None;
// Read on arrival, once. The agent-served tabs are not polled: a
// pane nobody has opened should not be asking the agent about the
Expand Down Expand Up @@ -652,7 +652,7 @@ impl PersonaJobRun {
let client = self.admin_vta;
match self.job {
PersonaJob::AttributePut(draft) => PersonaOutcome::Written {
verb: "Saved the fact",
verb: "Saved the attribute",
error: pool::put(&client, draft)
.await
.err()
Expand All @@ -662,7 +662,7 @@ impl PersonaJobRun {
attribute_id,
cascade,
} => PersonaOutcome::Written {
verb: "Forgot the fact",
verb: "Forgot the attribute",
error: pool::delete(&client, &attribute_id, cascade)
.await
.err()
Expand Down Expand Up @@ -1098,7 +1098,7 @@ mod tests {
assert!(matches!(personas(&state).mode, PersonaMode::Attribute(_)));
}

/// A reveal names one fact, is put back by the same key, and never becomes
/// A reveal names one attribute, is put back by the same key, and never becomes
/// a read.
///
/// Lifting the mask touches nothing but this pane: the value is already in
Expand Down Expand Up @@ -1276,7 +1276,7 @@ mod tests {
for error in [None, Some("refused".to_string())] {
let mut state = State::default();
PersonaOutcome::Written {
verb: "Saved the fact",
verb: "Saved the attribute",
error,
}
.apply(&mut state);
Expand Down Expand Up @@ -1348,7 +1348,7 @@ mod tests {
});

PersonaOutcome::Written {
verb: "Saved the fact",
verb: "Saved the attribute",
error: Some("version conflict".to_string()),
}
.apply(&mut state);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Panel for CommunitiesPanel {
/// Render the communities panel content.
///
/// `bindings` is the persona pane's map, read here rather than copied: this
/// panel and the persona pane render the same fact — what a persona presents in a
/// panel and the persona pane render the same thing — what a persona presents in a
/// community — and two copies of it would drift the moment one was refreshed
/// and the other was not.
pub fn render(
Expand Down
Loading
Loading