tools tier

tools-sighting-measure

Measures the sighting archive: conversation closure, profile churn, presence density, photo reuse across profiles, and self-description field completeness. Every statistic is computed by a pure function over rows, so the arithmetic is tested without a database and the numbers are reproducible from the corpus rather than estimated.

Measures the sighting archive: conversation closure, profile churn, presence density, photo reuse across profiles, and self-description field completeness. Every statistic is computed by a pure function over rows, so the arithmetic is tested without a database and the numbers are reproducible from the corpus rather than estimated.

Tiertools
Roletooling
Pathcrates/tools/sighting-measure
Edition2021
Targetstools-sighting-measure, tools_sighting_measure
Public items17 across 0 modules
Tests14

What it is for

Measures the sighting archive and reports numbers a product document can cite as a baseline.

Five measurements, each a pure function over rows that the binary reads from Postgres: conversation closure, profile churn, presence density, photo reuse across profiles, and self-description field completeness. The arithmetic lives here so it is tested against fixture rows with no database attached; the binary supplies real rows and prints the same structs.

Every result carries the corpus it was computed over. A statistic without its denominator is not a baseline, and the store grows while the tap runs — so a number is only meaningful with the row count and the as-of instant beside it.

Capabilities

crate root

Measures the sighting archive and reports numbers a product document can cite as a baseline.

Item
fn closure_stats(msgs : & Message, observer : & str, as_of : DateTime <Utc>, silent_after : Duration,) -> ClosureStats
fn churn_stats(lives : & ProfileLife, as_of : DateTime <Utc>, dark_after : Duration,) -> ChurnStats
fn density_stats(rows : & Position) -> DensityStats
fn reuse_stats(rows : & MediaRow) -> ReuseStats

ChurnStats

Measures the sighting archive and reports numbers a product document can cite as a baseline.

Item
pub struct ChurnStats

ClosureStats

Measures the sighting archive and reports numbers a product document can cite as a baseline.

Item
pub struct ClosureStats

DensityStats

Measures the sighting archive and reports numbers a product document can cite as a baseline.

Item
pub struct DensityStats

Ending

Measures the sighting archive and reports numbers a product document can cite as a baseline.

Item
pub enum Ending
fn ending_of(msgs : & Message, observer : & str, as_of : DateTime <Utc>, silent_after : Duration,) -> Ending

FieldFill

Measures the sighting archive and reports numbers a product document can cite as a baseline.

Item
pub struct FieldFill
fn facet_fill(pairs : & (& str, usize), total : usize) -> Vec <FieldFill>

MediaRow

Measures the sighting archive and reports numbers a product document can cite as a baseline.

Item
pub struct MediaRow

Message

Measures the sighting archive and reports numbers a product document can cite as a baseline.

Item
pub struct Message

Position

Measures the sighting archive and reports numbers a product document can cite as a baseline.

Item
pub struct Position

ProfileLife

Measures the sighting archive and reports numbers a product document can cite as a baseline.

Item
pub struct ProfileLife
ProfileLife :: fn reobserved(& self) -> bool

ReuseStats

Measures the sighting archive and reports numbers a product document can cite as a baseline.

Item
pub struct ReuseStats

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

`crate root`

ItemWhat it is
pub struct MessageOne message, reduced to what closure depends on.
pub enum EndingHow a conversation ended, from the observer's side.
pub struct ClosureStats
fn ending_of(msgs : & Message, observer : & str, as_of : DateTime <Utc>, silent_after : Duration,) -> EndingClassify one conversation
fn closure_stats(msgs : & Message, observer : & str, as_of : DateTime <Utc>, silent_after : Duration,) -> ClosureStatsGroup messages by conversation and classify every one.
pub struct ProfileLifeOne profile's life, reduced to what churn depends on
ProfileLife :: fn reobserved(& self) -> boolWas this profile ever captured a second time? Only then could an edit have been seen
pub struct ChurnStats
fn churn_stats(lives : & ProfileLife, as_of : DateTime <Utc>, dark_after : Duration,) -> ChurnStats
pub struct Position
pub struct DensityStats
fn density_stats(rows : & Position) -> DensityStats
pub struct MediaRow
pub struct ReuseStats
fn reuse_stats(rows : & MediaRow) -> ReuseStats
pub struct FieldFillOne field's fill rate
fn facet_fill(pairs : & (& str, usize), total : usize) -> Vec <FieldFill>Build fill rates from (field, filled) pairs against a shared row total.

No pub use re-exports: every item above is declared in this crate.

Boundary

Reaches into identity.

Shares tier tools with 84 other crates: tools-advisory-reach, tools-archive-guard, tools-artifact-scaffold, tools-ask-ai-core, tools-ask-ais, tools-ask-gemini, tools-book, tools-book-report, … (84 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)tools
Architectural role (taxonomy)tooling
Locationcrates/tools/sighting-measure
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_tools["tools"] --> n_identity["identity"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`identity-tenant`identitynoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
anyhow^1noalways
chrono^0.4serdenoalways
clap^4derive, envnoalways
serde^1derivenoalways
serde_json^1noalways
sqlx^0.8runtime-tokio, postgres, chrono, uuid, jsonnoalways
tokio^1fullnoalways

Development, in this workspace.

CrateTierOptionalOnly on
`tools-cli-conformance`toolsnoalways

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["tools-sighting-measure"]
  SELF -->|development| n_tools_cli_conformance["tools-cli-conformance"]
  SELF -->|runtime| n_identity_tenant["identity-tenant"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
bintools-sighting-measure`src/main.rs`
libtools_sighting_measure`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimeyes
database accessyes
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

No workspace crate depends on this one.

Verification

KindCount
Unit tests14
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root1600

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc817
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 8
    "No rustdoc detected" : 9

Metrics

MetricValue
Rust source files2
Source lines1154
Code lines932
Public API items17
Public modules0
Tests14
Examples0
Cargo features0
Direct runtime dependencies8
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "enum" : 1
    "function" : 6
    "method" : 1
    "struct" : 9
pie showData
    title Rust source composition
    "Code" : 932
    "Blank or comment" : 222

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All tools · Manual