@serve.zone/dcrouter 18.1.1 → 18.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deno.json +1 -1
- package/dist_serve/bundle.js +2065 -1617
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.dcrouter.d.ts +62 -1
- package/dist_ts/classes.dcrouter.js +158 -1
- package/dist_ts/email/classes.accepted-email-spool.d.ts +66 -0
- package/dist_ts/email/classes.accepted-email-spool.js +238 -18
- package/dist_ts/email/classes.workapp-mail-manager.js +5 -2
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/package.json +3 -3
- package/readme.md +16 -0
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.dcrouter.ts +202 -1
- package/ts/email/classes.accepted-email-spool.ts +312 -22
- package/ts/email/classes.workapp-mail-manager.ts +4 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/readme.plan.md +0 -22
|
@@ -1128,7 +1128,10 @@ export class WorkAppMailManager {
|
|
|
1128
1128
|
spoolItem: {
|
|
1129
1129
|
id: cachedEmailArg.id,
|
|
1130
1130
|
owner,
|
|
1131
|
-
|
|
1131
|
+
// The persisted field is the single source of truth: it is derived from
|
|
1132
|
+
// the recipients at acceptance, whereas re-deriving from the session
|
|
1133
|
+
// username here reproduced the "authenticated means outbound" mistake.
|
|
1134
|
+
direction: cachedEmailArg.direction,
|
|
1132
1135
|
status,
|
|
1133
1136
|
envelope: {
|
|
1134
1137
|
mailFrom: cachedEmailArg.from,
|
package/readme.plan.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Platform refactoring program
|
|
2
|
-
|
|
3
|
-
Status: approved 2026-07-21, derived from that day's incident ledger (deploy-verification crashes, unbounded scans, DNS/IP logic duplication, version-skew scares). Upstream foundations are RELEASED; consumer adoption and the dcrouter-internal refactors are sequenced below — do not start them mid-wave, fold them into the next natural release of each surface.
|
|
4
|
-
|
|
5
|
-
## Shipped upstream (adopt on next dependency bump)
|
|
6
|
-
|
|
7
|
-
1. **Typed-request error boundary — already existed.** @api.global/typedrequest ≥ 3.3.2 sanitizes every handler/middleware throw into a structured error envelope (no socket destruction). Action: ensure every deployed consumer (cloudly, dcrouter, coreflow, onebox) resolves ≥ 3.3.2 and remove any local try/catch layers that only re-implement it.
|
|
8
|
-
2. **Canonical IP helpers — @push.rocks/smartnetwork 4.9.0.** `isPublicIpAddress`, `toReverseDnsName` (non-throwing), `expandIpv6`, alongside the existing `getIpVersion`/`isValidIpv4`/`isValidIpv6`. Adoption: dcrouter ts/email/classes.mail-dns-sync.ts drops its private `toReverseDnsName`/`expandIpv6` (and the `Invalid IP address:` throw); cloudly's `isPublicDeploymentAddress` (classes.deploymentoperationmanager.ts) delegates to `isPublicIpAddress` (IPv4 semantics are byte-identical; IPv6 is 2000::/3 minus 2001:db8::/32).
|
|
9
|
-
3. **Cursor pagination as the org default — @push.rocks/smartdata 7.4.0.** `SmartDataDbDoc.getPagedInstances({ filter, sortField, sortDirection, uniqueField, limit ≤ 1000, cursor, withTotal })` — seek pagination with a unique tiebreaker, never materializes the full set. Adoption: OpsConfigEventDoc.findFiltered becomes a thin wrapper; every future list surface uses it. Review rule: a list API without a cursor is a defect.
|
|
10
|
-
4. **Binary provenance — @git.zone/tsrust 1.7.0.** Every built binary gets a JSON trailer (project, version, git commit, target, builtAt, tsrust version); `tsrust inspect <binary>` prints it. Adoption: bump tsrust across the Rust-bridge repos (smartdb, smartproxy, smartmta, smartnetwork, coretraffic, remoteingress) on their next releases; deployment verification can then assert binary identity instead of guessing (see the strings-on-x86 pitfall in smartdb readme.hints.md).
|
|
11
|
-
|
|
12
|
-
## Sequenced (do NOT start mid-wave)
|
|
13
|
-
|
|
14
|
-
5. **Ops-handler base class (dcrouter).** 25 handler files carry 11 copies of the requireAuth wrapper and 49 hand-written "manager not initialized" guards. Introduce a base with `registerMethod(name, scope, handlerFn)` doing auth, manager guard, error boundary, and realtime invalidation; migrate handlers opportunistically (new handlers must use it; old ones migrate when touched).
|
|
15
|
-
6. **Composition-root service table (dcrouter).** classes.dcrouter.ts (2,326 lines) has 20 near-identical addService blocks with drift (withRetry presence, error logging). Replace with a declarative registration table; behavior-preserving.
|
|
16
|
-
7. **Mail-detail contract dedup (interfaces + catalog + dcrouter).** IEmailDetail and friends exist twice by convention ("matches @serve.zone/catalog"). Move the contract into @serve.zone/interfaces; catalog and dcrouter consume it. Sequence AFTER the in-flight mail-detail wave (countdown, verdicts, transfer stats) fully lands — one migration wave, no compatibility layer.
|
|
17
|
-
8. **Version-skew hardening (conventions).** (a) Tolerant-reader parsing for persisted operation/evidence/state documents that cross release boundaries; (b) version handshake wherever a live process or socket is reused across upgrades (LocalSmartDb engine reuse — smartdb plan Track 6; gateway-client policyGeneration is the precedent).
|
|
18
|
-
|
|
19
|
-
## Non-goals
|
|
20
|
-
|
|
21
|
-
- No big-bang rewrites: every item lands either additive-upstream or inside a surface's next natural release.
|
|
22
|
-
- No compatibility layers (org rule): consumers move to the canonical helpers outright when their wave touches the code.
|