Initial Commit
This commit is contained in:
35
openspec/archive/2026-04-19-enterprise-dmarc/proposal.md
Normal file
35
openspec/archive/2026-04-19-enterprise-dmarc/proposal.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# OpenSpec Change: enterprise-dmarc
|
||||
|
||||
- **Change ID**: enterprise-dmarc
|
||||
- **Package**: `@suaveplan/dmarc`
|
||||
- **Category**: universal
|
||||
- **Target path**: `universal/email/dmarc`
|
||||
- **Status**: PROPOSED
|
||||
- **Date**: 2026-04-19
|
||||
- **Reference spec**: `/mnt/s/web/suaveplan/enterprise/dmarc.md`
|
||||
|
||||
## Summary
|
||||
Parses DMARC aggregate (RUA) and forensic (RUF) reports into typed structures. Input: raw XML or `application/gzip`-wrapped XML as produced by Google / Microsoft / Yahoo aggregate reporters. Output: `DmarcAggregateReport` / `DmarcForensicReport`. Leaf package — useful to deliverability analytics.
|
||||
|
||||
## Current-state audit (genesis)
|
||||
Package does not exist yet — fresh build.
|
||||
|
||||
## Dependencies
|
||||
- Workspace: none (leaf)
|
||||
- External (via catalog): `fast-xml-parser`, `fflate`, `zod`, `tslib`, `@opentelemetry/api`
|
||||
- Dev (via catalog): `vitest`, `@vitest/coverage-istanbul`, `fast-check`, `mitata`
|
||||
|
||||
## Preserved public surface
|
||||
- `parseDmarcAggregate(input, options?): DmarcAggregateReport`
|
||||
- `parseDmarcForensic(input, options?): DmarcForensicReport`
|
||||
- Types: `DmarcAggregateReport`, `DmarcForensicReport`, `DmarcRecord`, `DmarcPolicyPublished`, `DmarcAuthResult`, `DmarcDateRange`, `DmarcIdentifier`, `DmarcReportMetadata`, `AlignmentMode`, `DispositionMode`
|
||||
|
||||
## New genesis additions
|
||||
- Codes: `DMARC.PARSE_ERROR`, `DMARC.INVALID_REPORT`, `DMARC.UNSUPPORTED_ENCODING`.
|
||||
- Zod schemas for each report type.
|
||||
- OTel counter `dmarc.parse.total{kind}`, histogram `dmarc.parse.duration_ms{kind}`.
|
||||
- Property tests on random but structurally valid XML trees.
|
||||
|
||||
## Impact
|
||||
- Adds one new package: `universal/email/dmarc`
|
||||
- Adds one new spec capability: `dmarc`
|
||||
Reference in New Issue
Block a user