summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AGENTS.md5
-rw-r--r--notes/roadmap.md27
2 files changed, 20 insertions, 12 deletions
diff --git a/AGENTS.md b/AGENTS.md
index 6ce2404c..7e8f7232 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -106,9 +106,10 @@ Self-hosting: `docker compose up -d` (full stack at http://localhost:3100; postg
- Root `bunfig.toml` registers `[test] preload` → `apps/web/src/test-utils/mock-opencut-wasm.ts`: the published `opencut-wasm` package is wasm-pack bundler-target glue whose `.wasm` ESM import bun's test runner does not instantiate, so a faithful pure-TS mock (mirrors `rust/crates/time`, TICKS_PER_SECOND=120_000) is registered before any test module evaluates. Extend its export surface when a test transitively links new `opencut-wasm` imports.
- ~30 test files, colocated in `__tests__/` dirs next to source: timeline placement/pipeline, retime, animation, fps, masks, params, keybindings, stickers, math. Deepest investment: `apps/web/src/services/storage/migrations/__tests__/` — 18 per-version-step tests (v0-to-v1 … v30-to-v31) with shared `helpers.ts` and `fixtures/` sample projects; copy this pattern when adding a storage migration.
- Conventions: pure-function unit tests, nested describe blocks, deterministic dates. No coverage config anywhere.
-- CI (`.github/workflows/bun-ci.yml`, sole workflow) builds the WASM package and the Next app on ubuntu/windows/macos but its test step is a no-op stub (`echo "No tests implemented yet"`, continue-on-error); no lint, format, or typecheck gates. Tests run locally only.
+- CI (`.github/workflows/bun-ci.yml`, sole workflow) builds the WASM package and the Next app on ubuntu/windows/macos, then runs `bunx tsc --noEmit` and `bun test` from the repo root — all gates are real and expected to pass. `just verify` runs the same gate locally (tests + typecheck + build).
+- Full `bun lint:web` is NOT green: ~112 pre-existing upstream errors (mostly `@typescript-eslint/no-unsafe-type-assertion`). Lint the files you touched; full lint-green is deferred until after the planned feature stripping, which deletes many offending files.
- Rust crates have `#[cfg(test)]` unit tests (time crate, bridge) reachable only via `cargo test -p <crate>` — not wired to scripts or CI.
-- `bunx tsc --noEmit` in `apps/web` reports ~27 lines of PRE-EXISTING upstream type errors (storage migrations v1-to-v2, stickers providers, placement tests). Only care about errors in files you touched.
+- `bunx tsc --noEmit` in `apps/web` is green and CI-gated; keep it that way.
## Fork Notes & Current Work
diff --git a/notes/roadmap.md b/notes/roadmap.md
index 5e2b4e86..304957df 100644
--- a/notes/roadmap.md
+++ b/notes/roadmap.md
@@ -97,17 +97,24 @@ work. The GPUI desktop app sidesteps it entirely (native GPU).
- Per-clip (non-composite) freeze capture — owner unconvinced; parked.
Would need a single-element render pass in the GPU renderer.
-## Known pre-existing breakage (cleanup someday)
+## Quality gates (hardened 2026-07-26)
-- `keybindings/__tests__/persistence.test.ts` imports
- `isActionWithOptionalArgs`, which does not exist anywhere — dead test file.
-- Mask tests need a canvas 2d context bun doesn't provide (DOM-dependent).
-- `custom mask point insertion` test asserts zero handles; code computes
- ±0.1 — stale test or stale code, never ran in CI to catch it.
-- `resolve.test.ts` passes fractional ticks into the validated `mediaTime()`
- constructor — test bug.
-- `eslint/rules/__tests__/prefer-object-params.test.mjs` uses `.only`,
- blocked when `CI` is set.
+Baseline is GREEN: `bun test` (221 pass, 1 skip), `bunx tsc --noEmit`,
+`bun build:web` all pass locally and in CI (the CI test step was a no-op
+stub; it now runs typecheck + tests). `just verify` runs the full gate.
+Rule from here: red means the agent broke it — no tolerated failures.
+Full lint remains red (~112 pre-existing unsafe-assertion errors);
+lint files you touch, full lint-green after the stripping pass.
+
+Fixed along the way (were real runtime bugs, not just test issues):
+`isActionWithOptionalArgs`/`isShortcutKey` guards restored (custom
+keybindings crashed on load), stale positional `IndexedDBAdapter` /
+`stickersRegistry.register` call sites updated (silent no-ops at runtime).
+
+Remaining known breakage:
+
+- One text-mask snap test is `test.skip` — needs a canvas 2d context bun
+ does not provide (DOM-dependent).
- `apps/web/drizzle.config.ts` points at the stale schema path
`./src/lib/db/schema.ts` (real one: `src/db/schema.ts`).