Skip to main content

Challenge

Struct Challenge 

Source
pub struct Challenge {
Show 22 fields pub id: String, pub origin_ms: i64, pub question: String, pub situations: Vec<String>, pub consequence: String, pub area: String, pub engineers: Vec<String>, pub joined: BTreeMap<String, i64>, pub supersedes: Vec<String>, pub source: String, pub scope: Vec<String>, pub overrides: String, pub facets: Vec<String>, pub repo: String, pub reach: String, pub off_system: bool, pub weight: f64, pub dormant: bool, pub consolidated: bool, pub explore: f64, pub belief: (f64, f64), pub trust: f64,
}

Fields§

§id: String§origin_ms: i64

Epoch ms of the correction this challenge was learned from.

§question: String§situations: Vec<String>

World-model form of the lesson (see predict.rs); empty for question-only lessons.

§consequence: String§area: String

Kind of concern (trust.rs AREAS); “other” for lessons learned before areas existed.

§engineers: Vec<String>

Engineers whose corrections the lesson was learned from (git user.email).

§joined: BTreeMap<String, i64>

When each later engineer joined the lesson (learn.rs Lesson::joined).

§supersedes: Vec<String>

Lessons this one replaces or contradicts (set by borg learn or a queen answer).

§source: String

“queen” for a queen answer (queen.rs lesson), empty otherwise.

§scope: Vec<String>

Names the lesson is limited to (learn.rs Lesson::scope); empty: unscoped.

§overrides: String

The outside rule this lesson replaces (learn.rs Lesson::overrides), shown with the question.

§facets: Vec<String>

Alternative phrasings for search (learn.rs Lesson::facets): each is its own BM25 document of this lesson (rank), never shown.

§repo: String

The repo the lesson was learned in (for an import: where the knowledge was written down).

§reach: String

Who should hear it (reach.rs): empty for the team, repo, or personal (a withdrawn tombstone).

§off_system: bool

Scoped to systems none of which is the work’s known system (systems.rs gate): scores 0.

§weight: f64

Memory weight (memory.rs: activation × usefulness belief), multiplies the BM25 score; 1 for a new lesson without outcomes.

§dormant: bool

Dormant (memory.rs): recalled only on a strong match (rank).

§consolidated: bool

Consolidated (memory.rs): may be delivered early without a scope (early).

§explore: f64

This session’s Thompson draw of the lesson’s usefulness relative to its mean (memory.rs): orders the lessons that cleared the bar when there are more than the slots (budget, early); 1 without a session.

§belief: (f64, f64)

The usefulness belief behind explore (memory.rs Memory::alpha, beta): Beta(α, β), (1, 1) without outcomes. For the propensity of a slot (propensity).

§trust: f64

Mean trust of the lesson’s authors in its area (trust.rs), 0.5 without evidence.

Implementations§

Source§

impl Challenge

Source

pub fn standing(&self) -> bool

A standing lesson: a constraint an engineer ratified (veto.rs ratify). Consolidated, never dormant, its weight and trust fixed (no outcome or author moves them), and delivered early whenever its scope is in play, whatever the match, on every harness that takes prompt context (standing_pool, hook.rs early).

Trait Implementations§

Source§

impl Clone for Challenge

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Challenge

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Challenge

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Challenge

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.