@remit/api-http-client 0.0.6 → 0.0.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types.gen.ts +24 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-http-client",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.ts",
package/types.gen.ts CHANGED
@@ -1489,20 +1489,35 @@ export type RemitImapPlacementAction = 'MoveToInbox' | 'MoveToJunk';
1489
1489
  * Closed rather than free text: this is the one diagnostic that is interpolated
1490
1490
  * into the title of an issue filed under the user's own GitHub account, so its
1491
1491
  * publishability has to be a property of the type instead of a claim about the
1492
- * writer. Grows with the same narrowing that grows QuarantineFailureStage.
1492
+ * writer.
1493
+ *
1494
+ * The vocabulary is total — every quarantine write picks a member, and a defect
1495
+ * the writer cannot name is `UnreadableBody` rather than an invented code. It
1496
+ * is deliberately small: the body parser reports its refusals as free text with
1497
+ * no stable type or code, so a member exists only where the writer can identify
1498
+ * the defect without reading parser prose. `UnterminatedMultipartBoundary` and
1499
+ * `TruncatedBody` were provisional members carried by Phase 2 and are gone —
1500
+ * nothing on the narrowed sync path could produce either, and a member no
1501
+ * writer can reach is a vocabulary that lies about what the field means.
1502
+ * `MissingEnvelope` is absent for the same reason: see QuarantineFailureStage.
1493
1503
  */
1494
- export type RemitImapQuarantineFailureCode = 'UnterminatedMultipartBoundary' | 'UnknownCharset' | 'TruncatedBody';
1504
+ export type RemitImapQuarantineFailureCode = 'UnknownCharset' | 'UnreadableBody';
1495
1505
 
1496
1506
  /**
1497
1507
  * The pipeline step that refused a quarantined message.
1498
1508
  *
1499
- * One member. No catch site on the sync path can currently tell a parse failure
1500
- * from an infrastructure failure: the per-message frame in `body-sync.ts` wraps
1501
- * the S3 body write, the parsed-body cache write, the body-part upserts, the
1502
- * placement move and the label and counter writes alongside the `simpleParser`
1503
- * call, and filters only connection drops out of it. A stage is added when a
1504
- * try block is narrowed far enough to attribute it, never ahead of that — an
1505
- * enum member that reached stored rows cannot be walked back.
1509
+ * One member, and it is behind a real narrowing rather than a promise of one:
1510
+ * the body parse has its own try block around the parse call and nothing else,
1511
+ * so an error out of it can only be the message. S3, queue and database
1512
+ * failures propagate and never become a record here quarantining one would
1513
+ * set a message aside for an outage, tell the user it was unreadable, and
1514
+ * invite a public GitHub issue about it.
1515
+ *
1516
+ * A message that arrives with no ENVELOPE is deliberately NOT a member. Nothing
1517
+ * can tell that apart from the FETCH row glitching (#408), and the IMAP client
1518
+ * is far more often the cause than the message; the sync path holds its cursor
1519
+ * and retries instead, so a transient glitch heals and a persistent one trips
1520
+ * the stalled-cursor alert.
1506
1521
  */
1507
1522
  export type RemitImapQuarantineFailureStage = 'BodyParse';
1508
1523