Skip to content

PointSav Documentation

The engineering library for the PointSav platform — operating systems and services for regulated businesses that own their data, their AI, and their record-keeping outright. Where the monorepo holds the code, this wiki holds the reasoning: architecture, services, security, and the governance commitments that bind future development.

Egress service

← All revisions

e6a21636 · PointSav Digital Systems ·

editorial(services): rewrite service-egress (Track-B) — confirmed real service-egress/src/main.rs (95 lines) is a local-to-outbound release valve, reversed from the article's claimed cloud-to-local import: compresses+chunks local Maildir files into an outbound queue, deletes local source only after an external counterpart's cryptographic receipt (.wipe marker); confirmed zero IMAP/object-store client and zero WORM-ledger /v1/append calls anywhere in the binary; dropped sovereign-airlock-doctrine cross-reference (unconfirmed for this specific service) and the internal TOTEBOX_ROOT tenant path per the public-repo-safety-review infrastructure-exposure category; register-clean EN+ES

View the full record as of this revision →

@@ -3,41 +3,32 @@ schema: foundry-doc-v1
type: topic
content_type: topic
slug: service-egress
short_description: "The data sovereignty service that physically transfers cloud-stored payloads to local cold storage, eliminating vendor-side data retention and cloud dependency."
short_description: "service-egress compresses and chunks local mail data for outbound transfer, and only deletes the local source once an external counterpart confirms receipt with a cryptographic proof — an outbound release valve, not a cloud-to-local import."
title: "Egress service"
category: services
index_group: ring-2-knowledge-and-processing
language: en
paired_with: service-egress.es.md
status: stub
last_edited: 2026-05-07
last_edited: 2026-08-22
editor: pointsav-engineering
---

**Correction (2026-08-02, verified against canonical `origin/main`):** the data-flow direction below is reversed. The real `service-egress/src/main.rs` ("SOVEREIGN RELEASE VALVE") does the opposite: it reads **local** Maildir (`cur/`), zstd-compresses and chunks it for an **outbound** queue, and only wipes the local source after a cryptographic receipt from an external `tool-egress-pull` client — the direction is local-to-cloud, not cloud-to-local. There is no IMAP client, no object-store client, and no `service-fs` `/v1/append` call anywhere in this binary; the "Acquire (cloud) → Write (WORM) → Clear (cloud)" protocol described below has no matching implementation. **Flagged, not resolved** — needs a full rewrite around the real outbound-release architecture.
`service-egress` moves local mail data outward — the reverse of what its name might suggest at first glance. It doesn't pull anything in from the cloud; it stages local data for outbound transfer and only removes the local copy once it has proof the transfer succeeded.

[[service-fs-architecture|`service-egress`]] is the data sovereignty engine that physically transfers cloud-stored payloads to local cold storage, executing the flow-through protocol that removes vendor-side data retention and eliminates dependency on cloud storage continuity. Transferred payloads are written to the per-tenant [[worm-ledger-design|WORM ledger]] managed by [[service-fs-architecture]], where they become append-only records. The service works alongside [[service-email]] to ensure every message ingested from a cloud mailbox has a permanent local copy before the cloud source is cleared. See the [[sovereign-airlock-doctrine|sovereign airlock]] for the architectural principle that governs data flow direction.
## The loop

## Key Takeaways
Running continuously, the service repeats two steps:

- The flow-through protocol is three steps in order: download from cloud → write to local WORM → clear the cloud source. The original cloud copy is removed; the local WORM record is the permanent copy.
- Transferred payloads become append-only WORM records. The egress path cannot overwrite or delete prior records — data sovereignty is enforced structurally, not by policy.
- service-egress operates at the sovereignty boundary. Once a payload crosses from cloud to local WORM storage, it is no longer subject to the cloud provider's data retention, compelled-disclosure, or service-termination policies.
- The service depends on [[service-email]] for mailbox ingestion and on [[service-fs-architecture]] for the WORM storage interface. These three services together constitute the inbound data sovereignty stack.
1. **Stage.** Any local mail file not yet staged is compressed and split into fixed-size chunks in an outbound queue, ready for an external counterpart process to pick up.
2. **Wipe on receipt.** When that external process confirms it has received a transfer — a cryptographic receipt, not a simple acknowledgement — `service-egress` deletes both the original local file and its staged chunks. Nothing is removed until that receipt exists.

## Flow-through protocol
## Why the ordering matters

The flow-through protocol proceeds as follows:
This ordering means data loss during a transfer is impossible on this service's side: the local original stays in place through staging and transfer, and disappears only after independent confirmation that the outbound copy landed. A crash mid-transfer simply leaves the local original and its staged chunks both present for the next cycle to pick back up.

1. **Acquire** — `service-egress` connects to the cloud source (a mailbox via IMAP, an object store, or a cloud file system) and fetches the payload.
2. **Write** — the payload is written to the per-tenant WORM ledger via `service-fs`. The write is acknowledged only when the ledger confirms the record is durable on local storage.
3. **Clear** — only after a confirmed durable local write does `service-egress` issue the delete or archive command to the cloud source. The clearing step is conditional: if the write fails, the cloud copy is preserved.

This ordering ensures that payload loss is impossible within the service's failure domain. A crash between steps 2 and 3 leaves the payload in both places; the next run deduplicates before retrying the clear.
This service has no IMAP or object-store client, and never calls into the [[worm-ledger-design|WORM ledger]] interface — the WORM ledger's append-only guarantees are real elsewhere in the platform, just not part of this particular service.

## See also

- [[sovereign-airlock-doctrine]] — the architectural principle governing unidirectional data flow into the WORM ledger
- [[service-email]] — the email ingestion service that coordinates with service-egress for mailbox ingest
- [[service-fs-architecture]] — the file-system service providing the WORM ledger interface
- [[worm-ledger-design]] — the append-only storage discipline that egress records enter
- [[service-email]] — the mail ingestion service whose local Maildir this service stages for outbound transfer
Important Information

Corporate structure. PointSav Digital Systems ("PointSav") is currently a trade name of Woodfine Capital Projects Inc. ("Woodfine"), planned to become a wholly-owned Woodfine subsidiary upon incorporation. PointSav does not itself offer, sell, or solicit any security. Any securities offering associated with Woodfine's real-property direct-hold solutions is made exclusively by Woodfine, and only by means of the applicable Private Placement Memorandum.

No investment advice. This wiki's content is provided for engineering, operational, research, and development purposes. Nothing on this wiki constitutes investment advice or a solicitation to invest in any Woodfine partnership or direct-hold solution.

Intellectual property. The PointSav name, trade name, wordmark, and marks, together with all current and future PointSav- and Totebox-branded products, services, and offerings — and the software, source code, documentation, design system, and all related materials — are proprietary to Woodfine and its affiliates, except for components identified as open source. No rights are granted except as expressly set out in a written license or agreement. The full trademark notice appears in the footer of every page on this site.

Open source components. Portions of the platform are made available under permissive open-source licenses identified in the accompanying repository. Use of those components is governed by their respective license terms.

No warranty; informational use. Content on this wiki is provided for general informational purposes only and does not constitute a representation, warranty, or commitment with respect to product functionality, availability, pricing, or roadmap. Some articles describe planned or intended features, capabilities, and milestones — language such as "planned," "intended," "targeted," "may," and "expected" marks this forward-looking content, which is subject to change and does not constitute a commitment regarding future performance.

Confidentiality. Where an article describes an operational or deployment detail that is not intended for public disclosure, that article is not published on this wiki. Content here is general-purpose engineering documentation, not customer-specific configuration.

Jurisdiction. Woodfine Capital Projects Inc. is organized in British Columbia, Canada. References to the Sovereign Data Foundation on this wiki describe a planned or intended initiative only, not a current equity holder or active governance body.

Changes to this notice. PointSav may update this notice from time to time; the version posted on this page governs.

Not a filing system. This wiki is not a securities filing system, an electronic disclosure repository, or a substitute for SEDAR+ or any other regulatory filing system. Formal securities filings are made through the applicable regulatory filing system, not through this wiki.

Full disclaimer. This notice supplements, and does not replace, the full Disclaimers article. In the event of any conflict, the full Disclaimers article governs.

Read the full disclaimer →