Intelligence research domain: three-state observations, two-axis source grading, and disclosure classification. Peer to domain-research; depends on the kernel only.
| Tier | domain |
| Role | unclassified (baselined) |
| Path | crates/domain/research-intel |
| Edition | 2021 |
| Targets | domain_research_intel |
| Public items | 45 across 3 modules |
| Tests | 33 |
What it is for
Intelligence research — a peer domain of domain_research.
# Where this sits
domain-research is the kernel: run, artifact, conclusion, Confidence, store, history. It is domain-neutral and dependency-light.
This crate is one domain built on that kernel, alongside commerce research. Domains are peers; dependencies point inward only. A commerce consumer never compiles this crate, and this crate never reaches into commerce.
domain-research kernel — domain-neutral
├── domain-research-intel this crate
└── library crates-research-commerce valuation, description, classification
See ADR 0001. An earlier draft placed this inside the kernel; that was overturned at consensus for forcing intel dependencies onto unrelated consumers.
# What it provides
observed— three-state observation.Present,Absent,Unknown, and
the construction discipline that keeps a transport failure from being recorded as a negative finding.
grading— two-axis Admiralty grading. Source reliability and information
credibility, stored separately, projecting onto the kernel's Confidence.
disclosure— what a method reveals and to whom, plus the authorization
record for methods that contact a subject directly.
# The rule the whole crate is organised around
Never record "I could not find out" as "the answer is no."
A certificate-transparency API returned HTTP 502; the result was stored as zero certificates ever issued; a legitimate eight-year-old company with 301 certificates read as a purpose-built fraud instrument. That failure is unrepresentable here — observed::absent requires a witness that cannot be minted from a failure.
Everything else in this crate is guidance and defaults. That one is absolute, because a confident false negative cannot be walked back once it has propagated into the conclusions built on top of it.
Capabilities
Authorization
Disclosure classification — what a collection method reveals, and to whom.
| Item |
|---|
pub struct Authorization |
Authorization :: fn grant(matter_id : Uuid, authorized_by : Uuid, authorized_by_display : impl Into <String>, subject : impl Into <String>, reason : impl Into <String>, granted_at : DateTime <Utc>, expires_at : DateTime <Utc>,) -> Result <Self, AuthorizationError> |
Authorization :: fn covers(& self, subject : & str, now : DateTime <Utc>) -> bool |
Authorization :: fn is_expired(& self, now : DateTime <Utc>) -> bool |
AuthorizationError
Disclosure classification — what a collection method reveals, and to whom.
| Item |
|---|
pub enum AuthorizationError |
DisclosureClass
Disclosure classification — what a collection method reveals, and to whom.
| Item |
|---|
pub enum DisclosureClass |
DisclosureClass :: const fn requires_authorization(self) -> bool |
DisclosureClass :: const fn mechanism(self) -> & 'static str |
DisclosureClass :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result |
AdmiraltyGrade
Two-axis source grading (Admiralty Code / NATO STANAG 2511).
| Item |
|---|
pub struct AdmiraltyGrade |
AdmiraltyGrade :: const fn new(reliability : SourceReliability, credibility : InfoCredibility) -> Self |
AdmiraltyGrade :: fn code(& self) -> String |
AdmiraltyGrade :: const fn is_fully_assessed(& self) -> bool |
AdmiraltyGrade :: fn confidence(& self) -> Confidence |
AdmiraltyGrade :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result |
InfoCredibility
Two-axis source grading (Admiralty Code / NATO STANAG 2511).
| Item |
|---|
pub enum InfoCredibility |
InfoCredibility :: const fn code(self) -> u8 |
InfoCredibility :: const fn is_assessed(self) -> bool |
InfoCredibility :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result |
SourceReliability
Two-axis source grading (Admiralty Code / NATO STANAG 2511).
| Item |
|---|
pub enum SourceReliability |
SourceReliability :: const fn code(self) -> char |
SourceReliability :: const fn is_assessed(self) -> bool |
SourceReliability :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result |
observed (other)
Three-state observation: Present, Absent, or Unknown.
| Item |
|---|
fn absent <T>(_witness : & EmptySuccess) -> Observed <T> |
EmptySuccess
Three-state observation: Present, Absent, or Unknown.
| Item |
|---|
pub struct EmptySuccess |
EmptySuccess :: fn from_verified_response(source : impl Into <String>, status : u16, parsed_ok : bool,) -> Result <Self, Unknown> |
EmptySuccess :: fn from_authoritative_negative(source : impl Into <String>, protocol : & str, status : u16, well_formed_negative : bool,) -> Result <Self, Unknown> |
EmptySuccess :: fn source(& self) -> & str |
EmptySuccess :: const fn status(& self) -> u16 |
Observed
Three-state observation: Present, Absent, or Unknown.
| Item |
|---|
pub type Observed<T>: Result <Option <T>, Unknown> |
fn present <T>(value : T) -> Observed <T> |
Observed<T>
Three-state observation: Present, Absent, or Unknown.
| Item |
|---|
Observed<T> :: fn presence(& self) -> Presence |
Observed<T> :: fn undetermined(& self) -> Option <& Unknown> |
ObservedExt
Three-state observation: Present, Absent, or Unknown.
| Item |
|---|
pub trait ObservedExt<T> |
Presence
Three-state observation: Present, Absent, or Unknown.
| Item |
|---|
pub enum Presence |
Presence :: const fn is_scorable(self) -> bool |
Presence :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result |
Unknown
Three-state observation: Present, Absent, or Unknown.
| Item |
|---|
pub struct Unknown |
Unknown :: fn transport(source : impl Into <String>, reason : impl Into <String>, attempts : u8) -> Self |
Unknown :: fn http_failure(source : impl Into <String>, status : u16, attempts : u8) -> Self |
Unknown :: fn malformed(source : impl Into <String>, reason : impl Into <String>) -> Self |
Unknown :: fn exhausted(source : impl Into <String>, attempts : u8, last : impl Into <String>) -> Self |
Unknown :: fn not_attempted(source : impl Into <String>, reason : impl Into <String>) -> Self |
Unknown :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result |
fn unknown <T>(u : Unknown) -> Observed <T> |
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
domain_research_intel
disclosuregradingobserved
flowchart TD n_domain_research_intel["domain_research_intel"] n_domain_research_intel --> n_disclosure["disclosure"] n_domain_research_intel --> n_grading["grading"] n_domain_research_intel --> n_observed["observed"]
Public surface
`disclosure`
| Item | What it is |
|---|---|
pub enum DisclosureClass | What a collection method discloses, and to whom. |
DisclosureClass :: const fn requires_authorization(self) -> bool | Whether an Authorization record is required before this may run. |
DisclosureClass :: const fn mechanism(self) -> & 'static str | A one-line explanation of the mechanism, for the operator |
DisclosureClass :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result | — |
pub struct Authorization | A recorded decision to perform a disclosing action against a named subject |
Authorization :: fn grant(matter_id : Uuid, authorized_by : Uuid, authorized_by_display : impl Into <String>, subject : impl Into <String>, reason : impl Into <String>, granted_at : DateTime <Utc>, expires_at : DateTime <Utc>,) -> Result <Self, AuthorizationError> | Record a decision |
Authorization :: fn covers(& self, subject : & str, now : DateTime <Utc>) -> bool | Whether this authorization covers subject at time now |
Authorization :: fn is_expired(& self, now : DateTime <Utc>) -> bool | Whether this has lapsed at now. |
pub enum AuthorizationError | Why an authorization could not be recorded. |
`grading`
| Item | What it is |
|---|---|
pub enum SourceReliability | Reliability of the source (Admiralty axis 1). |
SourceReliability :: const fn code(self) -> char | The letter used in reports. |
SourceReliability :: const fn is_assessed(self) -> bool | Whether the source has actually been assessed |
SourceReliability :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result | — |
pub enum InfoCredibility | Credibility of this specific claim (Admiralty axis 2). |
InfoCredibility :: const fn code(self) -> u8 | The digit used in reports. |
InfoCredibility :: const fn is_assessed(self) -> bool | Whether the claim has actually been assessed. |
InfoCredibility :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result | — |
pub struct AdmiraltyGrade | A two-axis grade, e.g |
AdmiraltyGrade :: const fn new(reliability : SourceReliability, credibility : InfoCredibility) -> Self | Construct a grade. |
AdmiraltyGrade :: fn code(& self) -> String | The canonical short form, e.g |
AdmiraltyGrade :: const fn is_fully_assessed(& self) -> bool | Whether both axes have been assessed |
AdmiraltyGrade :: fn confidence(& self) -> Confidence | Project onto the kernel's coarse Confidence scale |
AdmiraltyGrade :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result | — |
`observed`
| Item | What it is |
|---|---|
pub type Observed<T>: Result <Option <T>, Unknown> | A three-state observation |
pub struct Unknown | Why an observation could not be determined |
Unknown :: fn transport(source : impl Into <String>, reason : impl Into <String>, attempts : u8) -> Self | The request never completed: connection refused, TLS failure, timeout, DNS failure. |
Unknown :: fn http_failure(source : impl Into <String>, status : u16, attempts : u8) -> Self | The server answered, but not with a usable result — 5xx, 429, or any status that is not a well-formed success. |
Unknown :: fn malformed(source : impl Into <String>, reason : impl Into <String>) -> Self | The response arrived with a success status but could not be parsed — truncated JSON, an HTML error page where JSON was expected, a schema change |
Unknown :: fn exhausted(source : impl Into <String>, attempts : u8, last : impl Into <String>) -> Self | The retry budget was exhausted without a usable answer. |
Unknown :: fn not_attempted(source : impl Into <String>, reason : impl Into <String>) -> Self | The source was never consulted — not attempted, skipped, or gated |
Unknown :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result | — |
pub struct EmptySuccess | Proof that a source affirmatively answered "nothing here" |
EmptySuccess :: fn from_verified_response(source : impl Into <String>, status : u16, parsed_ok : bool,) -> Result <Self, Unknown> | Mint a witness from a verified response |
EmptySuccess :: fn from_authoritative_negative(source : impl Into <String>, protocol : & str, status : u16, well_formed_negative : bool,) -> Result <Self, Unknown> | Mint a witness from a protocol-level authoritative negative |
EmptySuccess :: fn source(& self) -> & str | The source that answered. |
EmptySuccess :: const fn status(& self) -> u16 | The success status observed. |
fn present <T>(value : T) -> Observed <T> | A determined, present observation. |
fn absent <T>(_witness : & EmptySuccess) -> Observed <T> | A determined absence — the source said "nothing here" and we believe it |
fn unknown <T>(u : Unknown) -> Observed <T> | An undetermined observation. |
pub enum Presence | What an observation determined, for explicit branching and reporting. |
Presence :: const fn is_scorable(self) -> bool | Whether this observation may be used to support a finding |
Presence :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result | — |
pub trait ObservedExt<T> | Explicit accessors for Observed |
Observed<T> :: fn presence(& self) -> Presence | — |
Observed<T> :: fn undetermined(& self) -> Option <& Unknown> | — |
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
Confidence | domain_research::Confidence |
{AdmiraltyGrade,InfoCredibility,SourceReliability} | grading::{AdmiraltyGrade,InfoCredibility,SourceReliability} |
{Authorization,AuthorizationError,DisclosureClass} | disclosure::{Authorization,AuthorizationError,DisclosureClass} |
{EmptySuccess,Observed,ObservedExt,Presence,Unknown} | observed::{EmptySuccess,Observed,ObservedExt,Presence,Unknown} |
Boundary
Depends on no other workspace tier.
Shares tier domain with 41 other crates: domain-agreements, domain-ai-report, domain-billing, domain-catalog, domain-classify, domain-comments, domain-competitive-intel, domain-contact, … (41 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) | domain |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/domain/research-intel |
| Vocabulary in force (lexicon) | current |
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `domain-research` | domain | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
chrono | ^0.4 | serde | no | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
thiserror | ^2 | — | no | always |
uuid | ^1 | v4, v7, serde, js | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tokio-test | ^0.4 | — | no | always |
Build. None.
Depended on by. 2 workspace crates.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_application_research_intel["application-research-intel"] -->|uses| SELF n_domain_domain_survey["domain-domain-survey"] -->|uses| SELF SELF["domain-research-intel"] SELF -->|runtime| n_domain_research["domain-research"] 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
| Kind | Name | Source |
|---|---|---|
| lib | domain_research_intel | `src/lib.rs` |
Error model
| Error type | Named by |
|---|---|
AuthorizationError | declared, no public signature returns it |
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none 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.
Related capabilities
2 workspace crates depend on this one: application-research-intel, domain-domain-survey.
Verification
| Kind | Count |
|---|---|
| Unit tests | 33 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
disclosure | 3 | 0 | 2 |
grading | 3 | 0 | 6 |
observed | 8 | 0 | 8 |
What the tests establish, by name:
authorization_must_expire—src/disclosure.rsauthorization_rejects_wildcard_scope—src/disclosure.rsauthorization_requires_a_reason—src/disclosure.rsauthorization_requires_a_subject—src/disclosure.rsauthorization_round_trips_through_serde—src/disclosure.rsclasses_order_from_silent_to_disclosing—src/disclosure.rscovers_only_the_named_subject—src/disclosure.rsevery_class_explains_its_mechanism—src/disclosure.rsexpiry_is_enforced_at_use_time_not_grant_time—src/disclosure.rsonly_disclosing_requires_authorization—src/disclosure.rsaxes_order_from_strong_to_weak—src/grading.rscannot_judge_is_distinct_from_judged_badly—src/grading.rsgrade_round_trips_through_serde—src/grading.rsmiddle_grades_are_medium—src/grading.rsregistry_response_grades_a1_and_is_high—src/grading.rsreliable_source_speculating_is_not_high—src/grading.rssubject_self_description_grades_low—src/grading.rsunassessed_is_not_flattered_by_the_summary—src/grading.rsunreliable_source_with_confirmed_claim_is_not_low—src/grading.rsa_verified_absence_is_a_real_finding_and_grades_normally—src/lib.rsan_undetermined_observation_cannot_be_graded_as_a_finding—src/lib.rsquiet_collection_needs_no_authorization—src/lib.rsa_404_without_a_well_formed_negative_body_mints_nothing—src/observed.rsa_502_cannot_mint_an_authoritative_negative_either—src/observed.rsa_well_formed_404_mints_a_witness—src/observed.rsabsent_and_unknown_are_distinguishable—src/observed.rshttp_502_cannot_become_absent—src/observed.rsnot_attempted_is_not_absent—src/observed.rspresent_is_scorable—src/observed.rssuccess_with_unparseable_body_is_unknown—src/observed.rs- _… 3 more_
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 37 | 45 |
Public modules with a //! block | 3 | 3 |
pie showData
title Public items with rustdoc
"Documented" : 37
"No rustdoc detected" : 8
Metrics
| Metric | Value |
|---|---|
| Rust source files | 4 |
| Source lines | 1257 |
| Code lines | 730 |
| Public API items | 45 |
| Public modules | 3 |
| Tests | 33 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 6 |
| Workspace reverse dependencies | 2 |
pie showData
title Public API by kind
"enum" : 5
"function" : 3
"method" : 31
"struct" : 4
"trait" : 1
"type alias" : 1
pie showData
title Rust source composition
"Code" : 730
"Blank or comment" : 527
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.