Reachability checks without a general-purpose egress binary. HTTP status via infrastructure-fetcher's SafeHttpClient (SSRF allowlist + byte cap in the type) and TCP connect for port liveness — the replacement for ad-hoc curl and nc, which are denied.
| Tier | tools |
| Role | unclassified (baselined) |
| Path | crates/tools/net-probe |
| Edition | 2021 |
| Targets | tools-net-probe, tools_net_probe, oracle |
| Public items | 7 across 0 modules |
| Tests | 4 |
What it is for
Decision core for tools-net-probe. Pure, so the parts that decide what a result means are tested without opening a socket.
Why this exists: curl and nc are denied (they are send-anything-anywhere channels available to any shell call), and denying them without a replacement just means the check stops happening. This is the narrow capability that was actually being used — "is it up, and what did it answer" — with no request body, no custom method, no upload path, and a byte cap on whatever comes back.
Capabilities
crate root
Decision core for tools-net-probe. Pure, so the parts that decide what a result means
| Item |
|---|
pub const DEFAULT_TIMEOUT: Duration |
pub const DEFAULT_MAX_BYTES: usize |
Health
Decision core for tools-net-probe. Pure, so the parts that decide what a result means
| Item |
|---|
pub enum Health |
fn classify_status(status : u16) -> Health |
fn exit_code(h : Health) -> i32 |
TcpTarget
Decision core for tools-net-probe. Pure, so the parts that decide what a result means
| Item |
|---|
pub struct TcpTarget |
fn parse_tcp_target(s : & str) -> Result <TcpTarget, String> |
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`
| Item | What it is |
|---|---|
pub struct TcpTarget | A parsed TCP target, host:port. |
fn parse_tcp_target(s : & str) -> Result <TcpTarget, String> | — |
pub enum Health | What an HTTP status means for a liveness check |
fn classify_status(status : u16) -> Health | — |
fn exit_code(h : Health) -> i32 | Exit codes are the contract for scripts: 0 healthy, 1 reachable-but-failing, 2 unreachable |
pub const DEFAULT_TIMEOUT: Duration | — |
pub const DEFAULT_MAX_BYTES: usize | — |
No pub use re-exports: every item above is declared in this crate.
Boundary
Reaches into infrastructure.
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) | unclassified (baselined) |
| Location | crates/tools/net-probe |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_tools["tools"] --> n_infrastructure["infrastructure"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `infrastructure-fetcher` | infrastructure | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
anyhow | ^1 | — | no | always |
clap | ^4 | derive | no | always |
tokio | ^1 | rt-multi-thread, macros, net, time | no | always |
url | ^2 | — | no | always |
Development, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `tools-cli-conformance` | tools | no | always |
Build. None.
Depended on by. Nothing in this workspace.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR SELF["tools-net-probe"] SELF -->|development| n_tools_cli_conformance["tools-cli-conformance"] SELF -->|runtime| n_infrastructure_fetcher["infrastructure-fetcher"] 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 |
|---|---|---|
| bin | tools-net-probe | `src/main.rs` |
| lib | tools_net_probe | `src/lib.rs` |
| test | oracle | `tests/oracle.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
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | yes |
| 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
No workspace crate depends on this one.
Verification
| Kind | Count |
|---|---|
| Unit tests | 1 |
| Integration tests | 3 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 7 | 0 | 0 |
What the tests establish, by name:
exit_codes_distinguish_all_three_outcomes—tests/oracle.rsreachable_but_failing_is_not_collapsed_into_unreachable—tests/oracle.rstcp_targets_parse_including_ipv6_and_reject_junk—tests/oracle.rscli_definition_conforms—src/main.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 3 | 7 |
Public modules with a //! block | 0 | 0 |
pie showData
title Public items with rustdoc
"Documented" : 3
"No rustdoc detected" : 4
Metrics
| Metric | Value |
|---|---|
| Rust source files | 2 |
| Source lines | 221 |
| Code lines | 171 |
| Public API items | 7 |
| Public modules | 0 |
| Tests | 4 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 5 |
| Workspace reverse dependencies | 0 |
pie showData
title Public API by kind
"constant" : 2
"enum" : 1
"function" : 3
"struct" : 1
pie showData
title Rust source composition
"Code" : 171
"Blank or comment" : 50
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.