Initial Commit
This commit is contained in:
76
openspec/archive/2026-05-25-enterprise-video/tasks.md
Normal file
76
openspec/archive/2026-05-25-enterprise-video/tasks.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# Tasks: enterprise-video
|
||||
|
||||
**Change ID**: enterprise-video
|
||||
**Package**: `@suaveplan/video`
|
||||
**Layout**: `packages/media/video/video/`
|
||||
|
||||
## 0. Pre-flight
|
||||
|
||||
- [x] Confirm `@suaveplan/error` + `@suaveplan/events` are shipped on `genesis` via `workspace:^`.
|
||||
- [x] Add `video` to the `media` super-category in `scripts/folder-reorg/assignment.yml` `__categories__:` row.
|
||||
|
||||
## 1. Scaffold
|
||||
|
||||
- [x] Create `packages/media/video/video/{src,tests/setup}` with feature directories.
|
||||
- [x] `package.json` at `0.1.0`, `type: module`, `sideEffects: false`.
|
||||
- [x] Subpath exports per feature: `./error-codes/error-codes`, `./errors/errors`, `./types/video-types`, `./processor/processor`, `./pipeline-builder/pipeline-builder`, `./detection/detection`, `./duration/duration`, `./resize/resize`, `./trim/trim`, `./format/format`, `./instruments/instruments`.
|
||||
- [x] `tsconfig.lib.json` mirroring `@suaveplan/image`.
|
||||
- [x] `vite.config.ts` mirroring `@suaveplan/image`.
|
||||
- [x] `vitest.config.ts` mirroring `@suaveplan/image` (forks pool, istanbul 100/100/100/100, polyfills setup).
|
||||
- [x] `tests/setup/polyfills.ts` re-exporting `@suaveplan/testing/polyfills`.
|
||||
|
||||
## 2. Error codes + typed error
|
||||
|
||||
- [x] `src/error-codes/error-codes.ts` — `defineCodes("VIDEO", […])` with 16 codes covering every upstream factory plus `CONFIG_INVALID`.
|
||||
- [x] `VIDEO_ERROR_METADATA` — preserved HTTP/severity/retry table.
|
||||
- [x] `registerVideoErrorCodes()` — callable alias returning the metadata table.
|
||||
- [x] `src/errors/errors.ts` — `VideoError extends SuaveplanError<VideoCode>` with typed `context` + 15 upstream factories.
|
||||
- [x] Co-located `.md` for both modules.
|
||||
|
||||
## 3. Types + schemas
|
||||
|
||||
- [x] `src/types/video-types/video-types.ts` — Zod schemas for every public type; inferred types; `RESOLUTION_PRESETS`; `VIDEO_MIME_TYPES`; `VideoEventMap`.
|
||||
- [x] Discriminated union `VideoTransformOpSchema` (9 variants).
|
||||
|
||||
## 4. Pure helpers
|
||||
|
||||
- [x] `src/detection/detection.ts` — `detectVideoFormat`.
|
||||
- [x] `src/resize/resize.ts` — `calculateVideoResize`.
|
||||
- [x] `src/trim/trim.ts` — `validateTrimRange`.
|
||||
- [x] `src/duration/duration.ts` — `formatDuration` + `parseDuration`.
|
||||
- [x] `src/format/format.ts` — `videoFormatToExtension`.
|
||||
- [x] Co-located `.md` per module.
|
||||
|
||||
## 5. Processor + builder
|
||||
|
||||
- [x] `src/instruments/instruments.ts` — meter, 2 counters + 2 histograms, tracer.
|
||||
- [x] `src/processor/processor.ts` — `VideoProcessor` composing `EventBus<VideoEventMap>`; `extractMetadata` + `planTransform` + `createPipeline` + `on`/`once`/`off`; AbortSignal + OTel + Zod config validation.
|
||||
- [x] `src/pipeline-builder/pipeline-builder.ts` — `VideoPipelineBuilder` fluent surface; `build()` emits `pipeline.built` when wired.
|
||||
|
||||
## 6. Tests
|
||||
|
||||
- [x] Per-feature `.test.ts` files; all import from `@suaveplan/testing/runner`; every `it(...)` carries `{ timeout: 5000 }`.
|
||||
- [x] `processor.spec-conformance.test.ts` validates OTel + AbortSignal + event-emission contracts end-to-end.
|
||||
|
||||
## 7. Barrel + README
|
||||
|
||||
- [x] `src/index.ts` with explicit named re-exports only.
|
||||
- [x] Package `README.md` with Modules index.
|
||||
|
||||
## 8. Pre-publish gate
|
||||
|
||||
- [x] `bunx turbo lint typecheck test build --filter=@suaveplan/video` green.
|
||||
- [x] `bunx turbo test:coverage --filter=@suaveplan/video` at 100/100/100/100.
|
||||
- [x] Banned-pattern scan clean.
|
||||
- [x] Subpath-export count matches feature-module count.
|
||||
|
||||
## 9. Fold + archive
|
||||
|
||||
- [x] Fold `specs/video/spec.md` into `openspec/specs/video/spec.md`.
|
||||
- [x] Move `openspec/changes/enterprise-video/` to `openspec/archive/2026-05-25-enterprise-video/`.
|
||||
|
||||
## 10. STATUS + MANIFEST refresh
|
||||
|
||||
- [x] Flip `@suaveplan/video` from `-` to migrated in `STATUS.md`.
|
||||
- [x] Update migrated/pending counter.
|
||||
- [x] Run `bun scripts/folder-reorg/generate-manifest.ts`.
|
||||
Reference in New Issue
Block a user