Files
2026-05-27 23:29:53 +01:00

53 lines
3.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Tasks — enterprise-license
> All checkboxes ticked reflect work done in this change. Package was implemented in one session; spec authored after impl per "collapse to one change" decision (matches `§13` reconciliation pattern).
## 1. Spec authoring
- [x] 1.1 Read `../suaveplan/enterprise/license.md` end-to-end
- [x] 1.2 Read upstream `index.ts` / `index.types.ts` / `bitpack.ts` / `obfuscation.ts`
- [x] 1.3 Draft proposal + spec delta (one terse `### Requirement` per feature module, every Verified-by line points at a real `it(...)` or `describe(...)` title)
## 2. Implementation (port-main verbatim + enterprise stack)
- [x] 2.1 Scaffold: `package.json` v0.1.0, 16 subpath exports, tsconfig + tsconfig.lib, vite.config, vitest.config (`pool: forks`, `provider: istanbul`, 100/100/100/100), tests/setup/polyfills
- [x] 2.2 `src/error-codes.ts` + `.md` — 12-code `LICENSE.*` registry + `LicenseError extends SuaveplanError<LicenseErrorCode>`
- [x] 2.3 `src/constants/constants.ts` + `.md` — `LICENSE_VERSION`, `FULL_SIGNATURE_BYTES`, `SIGNATURE_BYTES`, `MIN_SIGNATURE_BYTES`, `BASE32_ALPHABET`, `LICENSE_SCHEMA`, `FIELD_BITS`, `PAYLOAD_BYTES`
- [x] 2.4 `src/types/license.ts` + `.md` — every enum/interface/type from upstream `index.types.ts` verbatim
- [x] 2.5 `src/codec/base32/base32.{ts,test.ts,md}`
- [x] 2.6 `src/codec/bitpack/bitpack.{ts,test.ts,md}`
- [x] 2.7 `src/codec/payload/payload.{ts,test.ts,md}`
- [x] 2.8 `src/codec/obfuscation/obfuscation.{ts,test.ts,md}`
- [x] 2.9 `src/time/time.{ts,test.ts,md}` — `Clock` injection
- [x] 2.10 `src/flags/flags.{ts,test.ts,md}`
- [x] 2.11 `src/schemas/schemas.{ts,test.ts,md}` — Zod boundary schemas
- [x] 2.12 `src/otel/instruments.{ts,test.ts,md}` — counters + histogram + attributes
- [x] 2.13 `src/generate/generate.{ts,test.ts,md}` — `generateLicense`, `createPayload`, `parseLicense`; OTel, Zod, AbortSignal, Rng/Clock injection
- [x] 2.14 `src/validate/validate.{ts,test.ts,md}` — full + truncated sig paths; OTel; AbortSignal
- [x] 2.15 `src/manager/manager.{ts,test.ts,md}` — full `LicenseManager` surface incl. `revoke` / `isRevoked`
- [x] 2.16 `src/revocation/revocation-store/revocation-store.{ts,test.ts,md}` — `RevocationStore` interface + `createMemoryRevocationStore` (LRU) + `fingerprintLicense`
- [x] 2.17 `src/index.ts` — named re-exports only
- [x] 2.18 `README.md`
- [x] 2.19 `src/__benchmarks__/license.bench.ts` (mitata)
- [x] 2.20 `tests/property.test.ts` (fast-check), `tests/dep-graph.test.ts`, `src/license.spec-conformance.test.ts`
## 3. Gates
- [x] 3.1 `bunx turbo lint typecheck test --filter=@suaveplan/license` — 11/11 green, 15 test files, 158 tests pass
- [x] 3.2 `bunx turbo test:coverage --filter=@suaveplan/license` — 100/100/100/100 across every module
- [x] 3.3 `bunx turbo build --filter=@suaveplan/license` — green
- [x] 3.4 `bun scripts/openspec-conformance.ts @suaveplan/license` — PASS (0 errors, 3 informational warnings about schemas-invoked-via-wrapper false positive)
- [x] 3.5 Banned-pattern grep — clean (3 hits are the word "any" in JSDoc prose, not type annotations)
- [x] 3.6 No `export *` in any feature barrel
- [x] 3.7 No direct `vitest`/`bun:test` imports
- [x] 3.8 Every implementation `.ts` has a sibling `.md` (≥200 words)
> Note: `bun run check` (monorepo-wide Biome) reports 1619 errors / 14 warnings but all are pre-existing in other packages; `bunx turbo lint --filter=@suaveplan/license` is clean.
## 4. Archive
- [ ] 4.1 Fold `specs/license/spec.md` → `openspec/specs/license/spec.md`
- [ ] 4.2 Move `openspec/changes/enterprise-license/` → `openspec/archive/2026-05-17-enterprise-license/`
- [ ] 4.3 Refresh `MANIFEST.md` (`bun scripts/folder-reorg/generate-manifest.ts`)
- [ ] 4.4 Update root `STATUS.md` — `@suaveplan/license` `–` → `✅ enterprise`