Skip to main content

Lesson

Struct Lesson 

Source
pub struct Lesson {
Show 20 fields pub id: String, pub origin_ms: i64, pub repo: String, pub question: String, pub situations: Vec<String>, pub consequence: String, pub support: u32, pub episodes: Vec<String>, pub history: Vec<Value>, pub version: u32, pub engineers: Vec<String>, pub joined: BTreeMap<String, i64>, pub area: String, pub supersedes: Vec<String>, pub source: String, pub scope: Vec<String>, pub overrides: String, pub origin: String, pub facets: Vec<String>, pub reach: String,
}
Expand description

A lesson as stored: the conscience’s Challenge plus provenance and consolidation state. Append-only: a merge writes a new version with the same id; readers keep the latest.

Fields§

§id: String§origin_ms: i64§repo: String§question: String§situations: Vec<String>§consequence: String§support: u32§episodes: Vec<String>§history: Vec<Value>§version: u32§engineers: Vec<String>

Engineers whose corrections this lesson was learned from, first contributor first.

§joined: BTreeMap<String, i64>

When each later engineer joined (ms of their first episode merged in): trust.rs counts a lesson’s outcomes for an engineer only from then on. The first contributor is absent.

§area: String

Kind of concern (trust.rs AREAS), set by the generalising model call; “other” if absent.

§supersedes: Vec<String>

Existing lessons this one replaces or contradicts; the conscience asks this one instead.

§source: String

“queen” for a queen answer (queen.rs), “import” for team knowledge read from a directory (assimilate_dir.rs), kept across merges; empty for learned lessons.

§scope: Vec<String>

Where the lesson applies, as names (systems, repos, services: “Orion”, “harbor_orion”). Empty: wherever it matches. A scoped lesson is asked only when the drone’s context names one of them (conscience.rs in_scope), so a team rule for one system never reaches another.

§overrides: String

The outside rule or idiom this lesson replaces, and why (“upstream petri-net-design seeds a budget with a reset arc; Orion drains instead because …”). Lessons replace lessons via supersedes; this names what is not a lesson (a vendored skill, upstream docs). Rendered with the question: an override that does not name what it replaces loses to it (seen in an earlier eval).

§origin: String

Source location of an imported lesson (path:line in the source repo); empty for learned ones.

§facets: Vec<String>

Alternative phrasings of the lesson for search (facets.rs): the concept without names, the symptom, the action, the consequence, German, the identifiers as aliases. Each is its own BM25 document (conscience.rs rank); never shown to a drone. Empty for lessons learned before facets existed.

§reach: String

Who should hear the lesson (reach.rs): empty for the team, repo for its repo only, personal for a tombstone withdrawn to an engineer’s private collective.

Trait Implementations§

Source§

impl Clone for Lesson

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 Lesson

Source§

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

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

impl Default for Lesson

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Lesson

Source§

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

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Lesson

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> 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.