This document turns the current loadngo architecture into an implementation
backlog for an offline-first field network that can operate under weak,
intermittent, or absent connectivity.
The intended use is not "replace all cloud systems." The intended use is:
- keep a local authority node working when the internet is absent
- preserve important state and chain-of-custody
- reconcile safely later
- support physical relay when radio or IP paths fail
This is the field-operations counterpart to:
The current codebase already provides useful substrate pieces.
- platform-agnostic host boundaries and UI contracts exist in host-core/src/lib.rs
- the intended event-driven runtime model exists in proactor/src/lib.rs
- CAS hashing and storage exist in data/src/cas.rs
- incomplete writes, later verification, and content listing already exist
- workspace ingestion and manifest creation already exist in data/src/bin/pudding_cas_ingest.rs
- UDP transport, multicast bootstrap, frame send/receive, and timeouts exist in network/src/lib.rs
- chunked content transfer into CAS exists in network/src/core.rs
- higher-level
SneakerNetrequest/response content transfer exists in network/src/p2p.rs
Validated locally:
cargo test -p data -p networkpasses- content can be requested by hash and reconstructed into receiver CAS
- missing chunks and corrupt payloads are detected
- incomplete CAS entries can remain open for later completion
Relevant tests:
- network/tests/sneakernet.rs
- network/tests/p2p_protocol.rs
- network/tests/core.rs
- data/tests/cas_storage.rs
The current implementation is not yet a deployable life-critical field system.
Major gaps:
- no incident-oriented manifest schema
- no operator/device identity and trust model on the wire
- no transport encryption or message authentication
- no finished retransmit/resume logic for missed UDP chunks
- no replica promotion or signed lineage verification
- no domain workflows for intake, triage, inventory, dispatch, or delivery proof
- no field-grade operator UX, alerting, or stale-data semantics
- proactor integration is incomplete on active platform paths
Important current limitations:
TransferFileMissedexists in the protocol but is not handled yet in network/src/p2p.rs- participant registration is still a placeholder in network/src/lib.rs
- PQ lineage is a design target, not a finished implementation, per PUDDING_CAS_PQ_MODEL.md
- the Windows
IOCPbackend currently does not satisfy theSend + Syncrequirement ofCompletionPort, soloadngo-proactordoes not currently build on Windows
The recommended deployment model is "portable local authority with delayed reconciliation."
- Local authority node
- clinic, warehouse, vehicle, or field-command laptop
- owns the writable local truth for its operating cell
- stores authoritative manifests and CAS blobs for that cell
- Operator device
- tablet, phone, or workstation used by responders
- syncs against a local authority node over LAN, hotspot, or direct link
- may hold a materialized replica for offline read/write capture
- Relay node
- another laptop, vehicle node, or removable media kit
- carries signed manifests and missing blobs between disconnected cells
- Regional consolidation node
- validates lineage
- imports replicas
- reconciles cross-cell state
- does not erase local accountability history
- exchange signed manifests first
- compare lineage and missing blob hashes
- request only missing content by hash
- promote verified content into local CAS
- record replica observation and acknowledgement
This sequence minimizes bandwidth and supports physical relay.
Define and freeze:
- what local nodes are allowed to authoritatively decide
- what can be edited offline
- what requires later confirmation
- stale-data rules
- conflict classes: mergeable, review-required, forbidden
Deliverables:
- field authority model document
- risk classification for every record type
- operator-visible stale/conflict states
Exit criteria:
- every future schema and protocol change can point to an authority rule
Build a domain manifest format distinct from the current workspace/git manifest.
Add under data:
- manifest type for field records
- manifest id and versioning
- record envelope with timestamps, origin node, actor, and schema version
- parent/ancestor references
- attachment/blob references by CAS hash
- materialization status and replica observations
Suggested first record families:
- incident
- site
- person or patient pseudonymous record
- inventory item
- asset or vehicle
- dispatch task
- delivery or handoff confirmation
Likely crates:
- data/src/cas.rs
- new manifest module under
data/src
Exit criteria:
- a single signed manifest can describe a coherent field-state snapshot
- all large attachments are externalized as CAS blobs
Turn the current CAS ingest direction into a general bundle workflow.
Build:
- export command for manifest plus referenced blobs
- import command that verifies manifest, imports missing blobs, and records the replica observation
- resumable copy layout for USB, SD card, or other removable media
Suggested bundle shape:
manifest.jsonormanifest.ronsignatures/objects/xx/<hash>.binreceipts/
Likely crates:
datanetworkfor shared serialization helpers
Exit criteria:
- two disconnected nodes can exchange state entirely by removable media
- import is idempotent
- imported blobs are verified before promotion
Move from plain integrity to authenticated lineage.
Build:
- signed manifest envelope
- trust root store
- signer identity model for nodes and operators
- manifest verification result types
- lineage validation rules
Initial scope:
- classical signatures are acceptable first if they unblock real validation
- algorithm agility must remain in the type system
- PQ support should remain the target, not a blocker for the first end-to-end field deployment
Likely crates:
data- new crypto/signature module
Current note:
loadngo-pq-authnow exists as an initial signed challenge-token foundation for operator/node authentication semantics- it is not yet a full trust-root store or manifest-acceptance policy layer
Exit criteria:
- imported manifests can be accepted, quarantined, or rejected with explicit reasons
- authority and ancestry can be verified without trusting transport
Finish the network behavior required for unreliable links.
Build:
- manifest-first sync messages
- missing-chunk bitset exchange
- actual
TransferFileMissedhandling - retransmit windowing
- duplicate suppression
- resume after interrupted transfer
- message size and pacing rules
The current UDP transport is a reasonable starting point, but it is still too thin for field use.
Likely crates:
Exit criteria:
- packet loss does not require full restart of a content transfer
- nodes can resume a partially received bundle
- receiver can explicitly request missing ranges or chunks
Turn "copied somewhere else" into explicit state.
Build:
- replica records
- acknowledgement receipts
- promotion states: materialized, verified, authoritative, archived
- conflict records
- reconciliation journal
This should follow the distinctions already described in PUDDING_CAS_PQ_MODEL.md.
Exit criteria:
- an operator can tell whether data is local-only, relayed, verified remotely, or merged into a broader lineage
Move the network/storage path onto the intended runtime model.
Build:
- integrate network and sync work with
loadngo-proactor - remove dependence on blocking polling loops for active sync paths
- finish Windows IOCP integration
- add Linux
epollbackend - add Android
ALooperbackend if mobile field nodes are required
Immediate Windows fix:
- make
IocpPortsatisfy theCompletionPort: Send + Synccontract safely - restore passing
loadngo-proactortests on Windows
Likely crates:
Exit criteria:
- sync, timers, and wakeups are event-driven on supported platforms
cargo test -p loadngo-proactorpasses on Windows
After storage and transport are trustworthy, build the domain UX.
Suggested first operator surfaces:
- intake queue
- inventory and stock movement
- dispatch board
- handoff confirmation
- stale/conflict review
- sync status and relay health
UX requirements:
- large-state indicators
- explicit sync freshness
- explicit authority source
- explicit conflict and quarantine handling
- low-cognitive-load interaction for stressed operators
Likely crates:
taskguiui-core
Exit criteria:
- a responder can complete a core workflow without interpreting raw manifests, hashes, or transport state
Build the validation harness before claiming operational readiness.
Required test classes:
- packet loss and reordering
- interrupted transfer resume
- stale manifest replay
- wrong-signer rejection
- media corruption on physical relay
- clock skew
- duplicate import
- split-brain local edits across disconnected cells
Required non-test exercises:
- tabletop incident drill
- battery/power-loss recovery drill
- removable-media relay drill
- operator handoff drill
Exit criteria:
- failure behavior is understandable and recoverable by operators
If the goal is an early but credible field deployment, the minimum useful slice is:
- incident manifest schema
- signed manifest verification
- export/import by removable media
- hash-addressed missing-content fetch
- replica state and acknowledgement
- basic stale/conflict operator view
That slice is more valuable than prematurely building live multi-hop mesh routing.
Do not lead with:
- generalized peer-to-peer consensus
- full automatic conflict merging for all record types
- heavy live-mesh routing protocols
- runtime-generated cryptographic policy complexity
- broad cloud dependency
Those are expensive and will slow down the local-authority model that already fits the architecture.
The next concrete implementation tasks should be:
- create a
field_manifestmodule indata - define signed manifest envelope and verification result types
- implement bundle export/import around CAS and manifest references
- implement real missing-chunk recovery in
network - fix Windows
IOCPconformance inloadngo-proactor
loadngo already has the right backbone for resilient field operation:
- platform-agnostic host seams
- local-first storage
- hash-addressed content transfer
- a deliberate lineage and replication direction
To become something that can credibly support life-preserving operations, it now needs:
- authenticated lineage
- bundle-based relay
- reliable transfer recovery
- explicit replica state
- domain workflows for responders