Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- uses: actions/setup-node@v6
with:
node-version: '22'
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Prepare pnpm
run: |
corepack enable
Expand All @@ -22,6 +27,5 @@ jobs:
corepack prepare pnpm@10.32.1 --activate
fi
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm test
- run: pnpm docs:check
- run: python -m pip install lizard==1.23.0
- run: pnpm quality
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pnpm build # Astro production static build
pnpm test # vitest run
pnpm lint # biome check .
pnpm typecheck # astro check
pnpm quality # complete CI code-health gate

# Catalog (CI-only credentials; checked-in catalog needs no key)
pnpm run build:catalog # fetch + process (no NER)
Expand Down
7 changes: 6 additions & 1 deletion PROJECT_STATUS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LoopTV — PROJECT STATUS

Last updated: 2026-08-09
Last updated: 2026-08-12

> Detailed feature inventory and timeline live in
> [docs/product/features.md](docs/product/features.md).
Expand All @@ -22,6 +22,10 @@ catalog freshness, and documentation hygiene.

## Timeline

- **2026-08-12:** Adopted the Fleet code-health contract with truthful
whole-library coverage, unused-code, cycle, complexity, duplication,
dependency, suppression, build, docs, and repository-hygiene ratchets in CI;
removed three unused public exports and recorded existing debt in GitHub.
- **2026-08-09:** Adopted the verified Ultracite-backed Biome baseline through
the existing read-only check, with explicit compatibility exceptions and no
source rewrite, catalog rebuild, production dependency, playback, or deploy
Expand All @@ -43,6 +47,7 @@ catalog freshness, and documentation hygiene.
- Owned editorial product changelog at `/changelog`.
- Exact Ultracite-backed Biome presets with explicit local compatibility
exceptions; `pnpm check` remains non-writing.
- One `pnpm quality` command reproduces the complete hosted code-health gate.
- The complete shipped feature inventory lives in
[docs/product/features.md](docs/product/features.md).

Expand Down
1 change: 1 addition & 0 deletions docs/development/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pnpm lint # biome check .
pnpm format # biome format --write .
pnpm typecheck # astro check
pnpm check # biome check . (alias of lint)
pnpm quality # full code-health gate used by CI
```

`pnpm build` prerenders every public route and generated endpoint into `dist/`.
Expand Down
13 changes: 11 additions & 2 deletions docs/development/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pnpm test # vitest run (unit)
pnpm test:coverage # vitest with v8 coverage
pnpm lint # biome check .
pnpm typecheck # tsc --noEmit
pnpm quality # complete local/CI code-health gate
```

Playwright browser tests exist (`tests/example.spec.ts`, `tests/mobile.spec.ts`,
Expand All @@ -25,8 +26,16 @@ Vitest is configured in `vitest.config.ts` and includes:
- `src/**/*.test.ts`
- `scripts/__tests__/**/*.test.ts`

Coverage targets `src/lib/**/*.ts` with thresholds
`lines: 80, functions: 80, branches: 70, statements: 80`.
Coverage targets the complete `src/lib/**/*.ts` surface, including modules with
no current tests. The ratchet starts at the coverage the suite proves:
`lines: 70, functions: 67, branches: 58, statements: 63`. Thresholds may move
up, never silently down.

`pnpm quality` also prevents regressions in unused code, import cycles,
complexity, exact duplication, critical/high dependency advisories, suppression
markers, formatting, documentation, build output, and repository hygiene.
Existing measurable debt is recorded in GitHub issue #38 and checked as a
ceiling rather than described as clean.

## What's tested

Expand Down
14 changes: 6 additions & 8 deletions docs/operations/jobs/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ Single job, `ubuntu-latest`, Node 22:
2. Setup Node 22.
3. Prepare pnpm (corepack, pinned version from `packageManager`).
4. `pnpm install --frozen-lockfile`.
5. `pnpm lint` (Biome check).
6. `pnpm test` (Vitest run).

No build step — that's covered by [weekly-quality.md](weekly-quality.md) and
the deploy workflows. CI is the fast feedback gate.
5. Install the pinned Lizard complexity analyzer.
6. `pnpm quality`: formatting, lint, types, coverage, unused code, complexity,
duplication, cycles, dependency advisories, suppressions, docs, build, and
repository hygiene.

## What's not here

- No catalog rebuild (that's [fetch-catalog-sources.md](fetch-catalog-sources.md)
+ [build-catalog.md](build-catalog.md)).
- No deploy (that's [deploy.md](deploy.md)).
- No docs validation in this workflow — `pnpm docs:check` runs as a CI
step here, and the dedicated `docs.yml` workflow runs the strict check on
docs-only changes. See [../runbooks/](../runbooks/).
- The dedicated `docs.yml` workflow still runs the strict documentation check
on docs-only changes. See [../runbooks/](../runbooks/).
100 changes: 0 additions & 100 deletions knip.json

This file was deleted.

20 changes: 20 additions & 0 deletions knip.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://unpkg.com/knip@6/schema.json",
"entry": [
"src/pages/**/*.{astro,ts}",
"scripts/*.mjs",
"astro.config.ts",
"vitest.config.ts"
],
"project": ["**/*.{astro,ts,tsx,js,jsx,mjs,cjs,mts}"],
"ignore": [
// Optional docs presentation config and the runtime-copied yt-dlp boundary.
"blume.config.ts"
],
"ignoreDependencies": [
// CSS-only dependency and the checker-spawned CLI are not visible in the import graph.
"jscpd",
"tailwindcss"
],
"ignoreBinaries": ["blume", "yt-dlp"]
}
24 changes: 22 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@
"docs:build": "blume build",
"docs:dev": "blume dev",
"knip": "knip --no-exit-code --reporter symbols",
"knip:strict": "knip --reporter symbols"
"knip:strict": "knip --reporter symbols",
"quality:unused": "node scripts/check-code-health.mjs unused",
"quality:complexity": "node scripts/check-code-health.mjs complexity",
"quality:duplication": "node scripts/check-code-health.mjs duplication",
"quality:cycles": "node scripts/check-code-health.mjs cycles",
"quality:dependencies": "node scripts/check-code-health.mjs dependencies",
"quality:suppressions": "node scripts/check-code-health.mjs suppressions",
"quality:hygiene": "node scripts/check-code-health.mjs hygiene",
"quality": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm test:coverage && pnpm quality:unused && pnpm quality:complexity && pnpm quality:duplication && pnpm quality:cycles && pnpm quality:dependencies && pnpm quality:suppressions && pnpm docs:check && pnpm build && pnpm quality:hygiene"
},
"dependencies": {
"@saas-maker/feedback": "^0.2.1",
Expand All @@ -49,6 +57,7 @@
"@vitejs/plugin-react": "4.7.0",
"@vitest/coverage-v8": "^4.1.10",
"astro": "^5.16.6",
"jscpd": "5.0.14",
"knip": "^6.29.0",
"lightningcss": "^1.33.0",
"tailwindcss": "^4.3.3",
Expand All @@ -58,5 +67,16 @@
"vitest": "4.1.10",
"wrangler": "4.114.0"
},
"packageManager": "pnpm@10.33.2"
"packageManager": "pnpm@10.33.2",
"pnpm": {
"overrides": {
"dompurify@<=3.4.12": "3.4.13",
"fast-uri@<3.1.5": "3.1.5",
"js-yaml@>=4.0.0 <4.3.1": "4.3.1",
"nanoid@<3.3.17": "3.3.17",
"postcss@<=8.5.22": "8.5.23",
"sharp@<0.35.0": "0.35.3",
"undici@>=7.0.0 <7.29.0": "7.29.0"
}
}
}
Loading
Loading