pub struct ScratchEntry {
pub scratch_id: String,
pub symbol_id: Option<String>,
pub workflow: Option<String>,
pub session: String,
pub content: String,
pub status: ScratchStatus,
pub promoted_to: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub expires_at: Option<DateTime<Utc>>,
pub tags: Vec<String>,
}Expand description
Ephemeral working note scoped to a symbol and/or named workflow.
Scratch entries are stored locally at /asd/v1/scratch/<scratch_id>.
They are not synced to the sidecar and not subject to policy gate.
Use ScratchStatus::Promoted + promoted_to to link a note that
has been elevated to a durable LedgerEntry.
Fields§
§scratch_id: StringStable ID, format "scr_<uuid-simple>".
symbol_id: Option<String>Optional: scope to an indexed symbol_id.
workflow: Option<String>Optional: named investigation context (e.g. "tracing-sync-bug").
session: StringAgent or user who wrote the note (agent_id).
content: StringMarkdown-friendly working notes.
status: ScratchStatusCurrent status.
promoted_to: Option<String>Set when status transitions to Promoted; holds the ledger entry_id.
created_at: DateTime<Utc>§updated_at: DateTime<Utc>§expires_at: Option<DateTime<Utc>>When set, the entry is considered expired after this timestamp.
Freeform tags for grouping.
Implementations§
Source§impl ScratchEntry
impl ScratchEntry
Sourcepub fn new(content: impl Into<String>, session: impl Into<String>) -> Self
pub fn new(content: impl Into<String>, session: impl Into<String>) -> Self
Create a new draft entry with minimal fields. Caller fills in optional
symbol_id, workflow, expires_at, and tags after construction.
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Returns true when expires_at is set and is in the past.