P06 — Custom Domains
Parent tracker: #1
Base integration commit: ed82747f9f7ddb7696534cdda110f2f7f594b46a (merged P05)
Status
IN PROGRESS — ENTRY CONDITIONS SATISFIED
Goal
Implement the GoJet V10 Custom Domains authority model: CAP-DOMAIN-ENTITLEMENT, ownership verification, DNS/HTTPS/domain-risk axes, periodic revalidation and fail-closed custom-host routing enforcement.
Entry conditions
Specification authority
- Master Plan
GJ-V10-MP-GREENFIELD-2026-08-20 — P06
- Page-Level IA
GJ-V10-IA-GREENFIELD-2026-08-20 — APP-DOMAINS, APP-DOMAIN-NEW, APP-DOMAIN-DETAIL, §§9 and 11
- Design System
GJ-V10-DS-GREENFIELD-2026-08-20 — domain/trust state semantics and all exact visual values
In scope
- structured custom-domain entitlement store and resolver
- entitlement source
none | plan | manual_approval
- entitlement status
requested | active | suspended | expired | revoked, with derived seven-calendar-day grace_period where applicable
- active
business plan automatic entitlement from structured server data
manual_approval core API with required reason, validity window and existing support-ticket reference
- coexistence of valid plan and manual-approval sources without weakening security state
- atomic
domain_limit enforcement under concurrency
- server-authoritative direct-API and crafted-client denial
- hostname normalization and cross-Workspace ownership/conflict policy without tenant disclosure
- DNS TXT ownership secret/hash lifecycle and rotation
- ingress DNS target validation
- HTTPS readiness / active state
- independent domain-risk decision axis
- periodic revalidation and history
- immediate suspension for abuse/fraud/ownership loss/security conditions; no grace for these cases
- normal plan downgrade seven-calendar-day grace for existing active domains only
- entitlement enforcement for create/verify/activate/restore/rotate/new-link-assignment checkpoints
- redirect-time enforcement for custom hosts
- no silent fallback from an unavailable custom host to an official GoJet short host
- official/custom hostname destination-risk parity for primary, routing and A/B reachable targets
- Workspace
/app/domains, /app/domains/new, /app/domains/{domainId} flows and applicable states
- Add Domain wizard axes:
- Entitlement preflight
- Hostname normalization/conflict check
- DNS TXT ownership
- DNS ingress target
- HTTPS readiness
- Domain risk decision
- Ready for links
Authority / correctness invariants
- support ticket creation is a request only; it MUST NOT create or imply active entitlement
- public plan feature text / feature JSON / frontend controls are never entitlement authority
- only a valid structured plan source or recorded manual approval can resolve active entitlement
- inactive entitlement rejects
POST /api/workspaces/{id}/domains before any domain row or ownership token is created
domain_limit is enforced atomically; concurrent calls cannot over-allocate
- deep-link
/app/domains/new requires Workspace manage permission + active entitlement + remaining limit and MUST NOT mount/prefill the wizard when denied
- verification/activation/restoration/rotation require current entitlement and ownership; denial cannot advance an axis
- custom-domain link assignment requires current entitlement/authorization + ownership verified + ingress DNS valid + HTTPS active + domain risk allow
- redirect resolution requires current entitlement/grace policy + domain trust + current target-fingerprint allow
- ownership, DNS, HTTPS, risk and entitlement remain separate authoritative axes; no single collapsed
verified boolean may substitute for them
- cross-tenant hostname conflicts must not reveal the other Workspace or provider evidence
- all denial responses use allowlisted codes, correlation IDs and safe remediation
Workspace state contract
APP-DOMAINS must represent at least: locked, requested, active-empty, active-list, verification, grace_period, suspended, expired, revoked, partial-axis.
APP-DOMAIN-NEW must represent at least: entitlement-denied, input, conflict, ownership-pending, DNS-invalid, HTTPS-error, risk-review, ready, error.
APP-DOMAIN-DETAIL must represent at least: loading, verification, ready, ownership-failed, DNS-invalid, HTTPS-error, risk-review, grace_period, suspended, revoked.
Persistent domain/security failures must remain visible in-page/Attention surfaces; Toast is not the sole carrier of persistent state.
Excluded / later-owned work
- P14 owns the full custom-domain request UX/mail workflow; P06 only establishes the core authority/API contract and may bind an existing support-ticket reference
- P17 owns the administrator entitlement queue/UI; it must consume, not redefine, the P06 authority model
- P13 owns the full billing/subscription product; P06 may use the already-approved structured entitlement seam and test fixtures but must not implement P13
- P16 owns the full destination/domain risk provider and abuse administration product; P06 implements the domain-risk axis interface/state/enforcement required for this node, without pre-implementing the provider/admin product
- no support reply, frontend button or feature JSON may directly authorize custom domains
- no production Docker/Node runtime
Deliverables
Required tests
Evidence
P06 root: artifacts/v10/P06/
Required evidence includes request/response records, MySQL state, entitlement resolution, audit records, DNS/TLS observations, redirect records and browser captures. Unit tests or mocked DNS/TLS alone cannot satisfy the P06 Exit Conditions where a real integration harness can provide deterministic local authoritative evidence.
Exit conditions
P06 exits only when all custom-domain entitlement/ownership/DNS/HTTPS/risk checkpoints are server-enforced, redirect-time behavior is fail closed, official/custom destination-risk parity remains proven, required tests pass with reviewable current-repository evidence, accountable technical review is signed, P0/P1 defects are zero, DECISION REQUIRED is zero, and the signed exact head passes P00-P06 plus all affected Gate regressions.
P06 — Custom Domains
Parent tracker: #1
Base integration commit:
ed82747f9f7ddb7696534cdda110f2f7f594b46a(merged P05)Status
IN PROGRESS — ENTRY CONDITIONS SATISFIED
Goal
Implement the GoJet V10 Custom Domains authority model:
CAP-DOMAIN-ENTITLEMENT, ownership verification, DNS/HTTPS/domain-risk axes, periodic revalidation and fail-closed custom-host routing enforcement.Entry conditions
ed82747f9f7ddb7696534cdda110f2f7f594b46aSpecification authority
GJ-V10-MP-GREENFIELD-2026-08-20— P06GJ-V10-IA-GREENFIELD-2026-08-20—APP-DOMAINS,APP-DOMAIN-NEW,APP-DOMAIN-DETAIL, §§9 and 11GJ-V10-DS-GREENFIELD-2026-08-20— domain/trust state semantics and all exact visual valuesIn scope
none | plan | manual_approvalrequested | active | suspended | expired | revoked, with derived seven-calendar-daygrace_periodwhere applicablebusinessplan automatic entitlement from structured server datamanual_approvalcore API with required reason, validity window and existing support-ticket referencedomain_limitenforcement under concurrency/app/domains,/app/domains/new,/app/domains/{domainId}flows and applicable statesAuthority / correctness invariants
POST /api/workspaces/{id}/domainsbefore any domain row or ownership token is createddomain_limitis enforced atomically; concurrent calls cannot over-allocate/app/domains/newrequires Workspace manage permission + active entitlement + remaining limit and MUST NOT mount/prefill the wizard when deniedverifiedboolean may substitute for themWorkspace state contract
APP-DOMAINSmust represent at least:locked,requested,active-empty,active-list,verification,grace_period,suspended,expired,revoked,partial-axis.APP-DOMAIN-NEWmust represent at least:entitlement-denied,input,conflict,ownership-pending,DNS-invalid,HTTPS-error,risk-review,ready,error.APP-DOMAIN-DETAILmust represent at least:loading,verification,ready,ownership-failed,DNS-invalid,HTTPS-error,risk-review,grace_period,suspended,revoked.Persistent domain/security failures must remain visible in-page/Attention surfaces; Toast is not the sole carrier of persistent state.
Excluded / later-owned work
Deliverables
test-plan.jsonbefore implementation proceeds beyond contractsRequired tests
domain_limitEvidence
P06 root:
artifacts/v10/P06/Required evidence includes request/response records, MySQL state, entitlement resolution, audit records, DNS/TLS observations, redirect records and browser captures. Unit tests or mocked DNS/TLS alone cannot satisfy the P06 Exit Conditions where a real integration harness can provide deterministic local authoritative evidence.
Exit conditions
P06 exits only when all custom-domain entitlement/ownership/DNS/HTTPS/risk checkpoints are server-enforced, redirect-time behavior is fail closed, official/custom destination-risk parity remains proven, required tests pass with reviewable current-repository evidence, accountable technical review is signed, P0/P1 defects are zero,
DECISION REQUIREDis zero, and the signed exact head passes P00-P06 plus all affected Gate regressions.