Files
zarinpal-analytics-deployment/docs/decisions/0003-consume-licensed-font-from-frontend.md

48 lines
2.5 KiB
Markdown

# ADR 0003: Consume licensed font from the frontend repository
- Status: Accepted
- Date: 2026-08-20
## Context
The frontend requires the licensed Iran Yekan X Professional Persian-number variable webfont. The approved ownership decision is implemented by frontend commit `64f5ac2`, which tracks these required files in its ordinary source tree:
- `static/fonts/IRANYekanXVFaNumVF.woff2`
- `static/fonts/FontLicense.txt`
The deployment repository must not duplicate application assets or introduce a second delivery path.
## Decision
Treat both files as ordinary frontend-owned build inputs. Frontend CI builds them through the normal frontend context and the immutable frontend image contains the emitted font resource. Deployment consumes only that normal frontend image/build context.
Platform Operations does not create a separate asset-injection path, copy either file into deployment Git, or maintain font-specific credentials. Release provenance is the recorded frontend Git commit and the local image built from that checkout.
Frontend CI and deployment smoke checks must fail if the required source inputs are absent, the built resource is absent, or the resource is not served with the expected font MIME type. The deployment repository records no second binary or license copy.
## Alternatives considered
### Separate CI asset injection
- Rejected: it conflicts with the approved direct-tracking decision and creates a second source of build inputs.
### Copy assets into the deployment repository
- Pros: centralizes production build inputs.
- Cons: duplicates proprietary files, violates repository ownership, and can diverge from frontend source.
- Rejected: frontend owns static application assets.
### Runtime host mount
- Pros: keeps the binary outside the image.
- Cons: runtime drift, missing-asset failure after a deploy, harder rollback/provenance, and special server bootstrap.
- Rejected: the normal immutable frontend artifact must be self-contained.
## Consequences
- Frontend commit `64f5ac2` is the first approved provenance point for the tracked assets.
- Frontend repository policy and license compliance govern changes to the files.
- Deployment rollback restores the recorded frontend commit and rebuilds its font output through the normal context.
- No separate font injection workflow, font-specific deployment secret, or deployment-repository font copy is allowed.
- Platform smoke tests verify the emitted resource without reading or reproducing the license text.