Read-only local validation: recomputes geometry findings and hydroloom-backed connectivity, compares persisted node/connection tables, checks classified roles, membership, lineage references and operation order. Earlier validation results are not trusted or overwritten. This first implementation supports SOURCE_NETWORK_RETAINED observations only.

validate_stream_network(
  configuration,
  configuration_streams,
  observation,
  stream_network,
  sources = NULL,
  operations = NULL,
  level = c("WORKING", "ACCEPTANCE"),
  nodes = NULL,
  connections = NULL,
  review_features = NULL,
  reaches = NULL,
  actor,
  validated_at = Sys.time()
)

Arguments

configuration

One governed Configuration row.

configuration_streams

Configuration-Stream membership table.

observation

One constructor-compatible Observation row.

stream_network

Current candidate segment sf.

sources

Source lineage table; required at ACCEPTANCE.

operations

Applied operation table; required at ACCEPTANCE (may be empty).

level

WORKING or ACCEPTANCE.

nodes

Current stream_network_node POINT sf.

connections

Current stream_network_connection table.

review_features

Current stream_network_review sf. Required at ACCEPTANCE; every candidate must have at least one accepted inspection and no pending or rejected required inspection. INSPECT acceptance does not authorize repairs.

reaches

Optional table of unique reach_id and stream_id, required to verify any nonmissing candidate Reach classifications.

actor

Validator's actor/process identifier (not an inferred reviewer).

validated_at

Validation time, converted to UTC.

Value

Named validation run and issue tibbles, with result PASS or REVIEW_REQUIRED. A new run UUID is generated; inputs and old runs are unchanged.

Details

ACCEPTANCE additionally requires explicit accepted inspection decisions and their actor/time/notes, and observation review notes qualifying incomplete coverage/provenance or disconnected/multiple-outlet topology. PASS means these local checks passed, not that the observation was accepted. No review status is changed. Terrain provenance, scientific suitability of supplied roles, undeclared boundaries, source completeness, and enterprise identity still require human/loader checks. Malformed tables/UUIDs raise input errors; assessed inconsistencies return blocking findings.