feat: DLID licensing system — tables, models, update endpoint #658

Closed
jmiller wants to merge 0 commits from dev into main
Owner

Summary\n\nCloses #617, #618, #619, #620, #621\n\nPhase 1+2 of the consumer DLID licensing system:\n\n### Database (v359 migration)\n- 5 new tables: license, license_entitlement, license_activation, product_tier, license_audit_log\n- 13 seeded product tiers (base → enterprise)\n- Composite unique indexes on (license_id, product_code) and (license_id, domain)\n\n### Models (models/licensing/)\n- License: DLID generation (CRC32 checksum), CRUD, status transitions\n- Entitlement: tier-based rebuild with custom entitlement preservation\n- Activation: domain tracking with upsert and limit enforcement\n- ProductTier: tier hierarchy with JSON repo lists\n- AuditLog: status and tier change tracking\n\n### API Endpoint\n- GET /api/v1/licensing/updates/{product}.xml?dlid=XXX&domain=YYY\n- Validates DLID, checks license + entitlement, auto-activates domain\n- Returns Joomla-compatible update XML or empty <updates/> on failure\n\n## Test plan\n- [ ] Migration runs on fresh and existing databases\n- [ ] DLID generation produces valid checksummed keys\n- [ ] Tier change rebuilds entitlements, preserves custom ones\n- [ ] Domain limit enforcement works\n- [ ] Update endpoint returns valid XML for entitled products\n- [ ] Invalid DLID returns empty updates (no error)

## Summary\n\nCloses #617, #618, #619, #620, #621\n\nPhase 1+2 of the consumer DLID licensing system:\n\n### Database (v359 migration)\n- 5 new tables: license, license_entitlement, license_activation, product_tier, license_audit_log\n- 13 seeded product tiers (base → enterprise)\n- Composite unique indexes on (license_id, product_code) and (license_id, domain)\n\n### Models (models/licensing/)\n- License: DLID generation (CRC32 checksum), CRUD, status transitions\n- Entitlement: tier-based rebuild with custom entitlement preservation\n- Activation: domain tracking with upsert and limit enforcement\n- ProductTier: tier hierarchy with JSON repo lists\n- AuditLog: status and tier change tracking\n\n### API Endpoint\n- `GET /api/v1/licensing/updates/{product}.xml?dlid=XXX&domain=YYY`\n- Validates DLID, checks license + entitlement, auto-activates domain\n- Returns Joomla-compatible update XML or empty `<updates/>` on failure\n\n## Test plan\n- [ ] Migration runs on fresh and existing databases\n- [ ] DLID generation produces valid checksummed keys\n- [ ] Tier change rebuilds entitlements, preserves custom ones\n- [ ] Domain limit enforcement works\n- [ ] Update endpoint returns valid XML for entitled products\n- [ ] Invalid DLID returns empty updates (no error)
jmiller added 6 commits 2026-06-20 22:16:02 +00:00
feat: add licensing tables — license, entitlement, activation, product_tier (#617)
Universal: Auto Version Bump / Version Bump (push) Successful in 8s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 3m18s
86bbad9fa1
Migration v359 creates 4 tables for the consumer DLID licensing system:
- license: DLID-based licenses with tier, status, expiry
- license_entitlement: per-license product/repo access mapping
- license_activation: domain tracking with limit enforcement
- product_tier: 13 seeded tiers from base to enterprise

Models in models/licensing/ with CRUD, DLID generation (CRC32 checksum),
entitlement rebuild on tier change, and domain activation with upsert.
feat: add license CRUD, audit logging, status transitions (#618)
Universal: Auto Version Bump / Version Bump (push) Successful in 6s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 1m46s
7d5eff194d
- RevokeLicense, SuspendLicense, ReactivateLicense convenience methods
- LicenseAuditLog table for tracking status and tier changes
- UpdateLicenseTier now logs old→new tier before rebuilding entitlements
- SetLicenseStatus logs old→new status transitions
feat: add DLID-gated update XML endpoint for Joomla updater (#621)
Universal: Auto Version Bump / Version Bump (push) Successful in 8s
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 2s
Universal: PR Check / Validate PR (pull_request) Failing after 14s
Generic: Project CI / Lint & Validate (pull_request) Successful in 41s
PR RC Release / Build RC Release (pull_request) Failing after 1m13s
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Successful in 1m23s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 3m6s
Universal: Build & Release / Promote to RC (pull_request) Successful in 23s
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been skipped
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
212b8c9e6d
GET /api/v1/licensing/updates/{product}.xml?dlid=XXX&domain=YYY

Validates DLID format (CRC32), checks license status and entitlement,
auto-activates domain, returns Joomla-compatible update XML from the
entitled repo's stable release. Invalid/expired returns empty <updates/>.
jmiller added 1 commit 2026-06-20 22:16:50 +00:00
jmiller added 1 commit 2026-06-20 22:18:55 +00:00
fix: remove invalid SortType field from FindReleasesOptions
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 2s
Universal: PR Check / Validate PR (pull_request) Failing after 10s
Generic: Project CI / Lint & Validate (pull_request) Successful in 37s
PR RC Release / Build RC Release (pull_request) Failing after 1m30s
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Successful in 1m31s
Universal: Auto Version Bump / Version Bump (push) Successful in 6s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 1m47s
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
6f6a8b0f2c
jmiller added 1 commit 2026-06-20 22:20:43 +00:00
jmiller closed this pull request 2026-06-20 22:21:07 +00:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.