Skip to main content

Finding

Struct Finding 

Source
#[non_exhaustive]
pub struct Finding { pub id: String, pub file: String, pub function: String, pub line: u32, pub verdict: Verdict, pub invocations: Option<u64>, pub confidence: Confidence, pub evidence: Evidence, pub actions: Vec<Action>, pub identity: Option<FunctionIdentity>, }
Expand description

A per-function finding combining static analysis and runtime coverage.

Marked #[non_exhaustive] in 0.6.0: downstream Rust consumers must stop using struct-literal construction. The wire shape is unchanged.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§id: String

Deterministic content hash of shape fallow:prod:<hash>. See finding_id for the canonical helper. Continues to ship through 0.6 alongside Finding::identity.

Which key for which job. Three identifiers travel with a function and serve different axes; do not conflate them:

  • Finding::id is the per-finding suppression key. It hashes file + function + line + "prod", so it changes when the function moves. Agents writing suppression files / baselines / CI dedup key on this to suppress THIS specific finding, not every finding on the function.
  • FunctionIdentity::stable_id is the cross-surface + cross-producer join key. The same function gets ONE value across findings, hot paths, blast-radius entries, and importance entries, and across V8 / Istanbul / oxc producers (columns are excluded from the hash, so producers of differing positional fidelity still agree). Cloud aggregation and any “show me this function’s history” join uses it. It hashes start_line, so, exactly like Finding::id, it is NOT immune to line moves: a function that moves to a new line gets a new stable_id.
  • FunctionIdentity::source_hash is the content tiebreaker. It hashes the canonical body bytes and excludes position, so it is the only one of the three that survives a line move with an unchanged body. Optional and absent unless a producer computes it; consumers that want line-move-tolerant matching layer it on top of stable_id when present.

New agent suppression formats SHOULD write identity.stable_id when present (so one entry correlates the function across every surface, not just this one finding) AND retain Finding::id for backwards-compatibility with 0.5-era baselines. Readers MUST accept both forms during the grace window.

§file: String

Path to the source file, relative to Request::project_root.

§function: String

Function name as reported by the static analyzer. Matches StaticFunction::name and FunctionIdentity::name.

§line: u32

1-indexed line number the function starts on. Included in the ID hash so anonymous functions with identical names but different locations get distinct IDs.

§verdict: Verdict

Per-finding verdict. Describes what the agent should do with this specific function.

§invocations: Option<u64>

Raw invocation count from the V8 dump. None when the function was not tracked (lazy-parsed, worker-thread isolate, etc.).

§confidence: Confidence

Confidence the sidecar has in this finding’s Finding::verdict.

§evidence: Evidence

Evidence rows the sidecar used to arrive at the finding.

§actions: Vec<Action>

Machine-readable next-step hints for AI agents.

§identity: Option<FunctionIdentity>

Canonical function identity introduced in 0.6.0. Optional for forward-compat with 0.5-shape sidecars. See FunctionIdentity for the canonical join semantics.

Trait Implementations§

Source§

impl Clone for Finding

Source§

fn clone(&self) -> Finding

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 Finding

Source§

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

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

impl<'de> Deserialize<'de> for Finding

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 Finding

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

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