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
2 changes: 1 addition & 1 deletion .claude/skills/e2e-runner/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Per tier, in order `bronze, silver, gold, youth`:
5. Asserts, also only over returned ids: bronze was granted no 4K library, and no tier was
granted a `9X.` private library.
6. **Downloads is printed, never asserted.** `EXPECT_DOWNLOADS` (`bronze:false, silver:false,
gold:true, youth:true`) only appears in the `ok` line; the invite's real `allow_downloads` is
gold:true, youth:true`) only appears in the `ok` line; the invite's real `allow_downloads` is
never read back. Do not report the tiers suite as proof the downloads flag is right.
7. **Cleanup**: `DELETE /api/invitations/<id>` for every invite found, in a `finally`, so it runs
after failed POSTs, failed assertions and a thrown error alike, then "Cleaned up N test
Expand Down
4 changes: 2 additions & 2 deletions .claude/skills/member-triage/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Expect Wizarr `records: none found`. There is no "disabled" record to look at.
still `pending`, `subscribed=1`. A tier change that dropped one of their servers forces
disable-first, because Wizarr has no per-server unshare. They are mid-migration, not
disabled. Resend the pending link. Only the checkout path logs this (`reset N existing
record(s) for <email> pending re-join`); an admin reissue disables silently and reports
record(s) for <email> pending re-join`); an admin reissue disables silently and reports
the count as `disabled: N` in its own response, so the store event is the evidence, not
the log.
- **Window lapsed.** That shows up as a record with a past `expires`, not as a missing
Expand Down Expand Up @@ -232,7 +232,7 @@ a `subscription_update` or a one-off invoice renews too.
touching anything. A missing expiry usually heals itself; a wrong one never does. It
will not heal for a VIP, for a member with no `invited_at`, or when `invited_at` plus 35
days is already past, which logs `reconcile: computed expiry ... is already past;
skipping` rather than letting a background job revoke anyone. Those are the ones that
skipping` rather than letting a background job revoke anyone. Those are the ones that
need Set expiry.

**Remedy.** `/user`, **Set expiry** to the paid date plus 35 days
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/sales-agent/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ steps, and steps 3 and 5 are the only writes anywhere in this whole path:
spam filtering.
4. The operator reviews it inside Gmail itself and sends it by hand.
5. Only after that send actually happens does the main session run `--record <email>
<play>` for each recipient (and `--opt-out <email>` for anyone whose reply asks to
<play>` for each recipient (and `--opt-out <email>` for anyone whose reply asks to
stop). Recording before a send actually goes out would start a cooldown clock for
outreach that never happened.

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ history was rewritten on 2026-08-08 to make it so. See
## v0.4.1 (2026-10-09)

- Answer a wrong method on a known route with 405, `{"detail": "Method Not
Allowed"}` and an `Allow` header in both servers, as the FastAPI services
Allowed"}` and an `Allow` header in both servers, as the FastAPI services
did, where the NestJS port had fallen through to 404. Lives in
`libs/server-common` as `starletteMethodNotAllowed`
- Version every workspace package in lockstep: `fleet-monitor` and
Expand Down
8 changes: 6 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The contribution framing is deliberate: Plex TOS prohibits selling access, and S

## Structure

An Nx monorepo over bun workspaces (`workspaces: ["apps/*", "libs/*"]`), with three apps and one shared lib. The two servers are NestJS; both were FastAPI services until the migration in `docs/superpowers/specs/2026-09-26-nestjs-migration-design.md`.
An Nx monorepo over bun workspaces (`workspaces.packages: ["apps/*", "libs/*"]`), with three apps and one shared lib. The two servers are NestJS; both were FastAPI services until the migration in `docs/superpowers/specs/2026-09-26-nestjs-migration-design.md`.

```
wizteros/
Expand Down Expand Up @@ -112,6 +112,10 @@ A cacheable target has to declare every input that can change its result, includ

Bun itself is pinned. `packageManager` in the root `package.json` is the source of truth: CI picks it up through `oven-sh/setup-bun` (no `bun-version` input on purpose), `netlify.toml` mirrors it as `BUN_VERSION`, and `scripts/only-bun.mjs` fails any script run under a different Bun, on top of rejecting npm/pnpm/yarn outright. Moving the pin means moving both files in the same commit. The server Dockerfile installs Bun from that same `packageManager` value at build time, so it carries no copy of the pin.

Every version in every `package.json` is exact, never a range: an exact version, a `catalog:` reference, or `workspace:*` for a sibling package. The root `bunfig.toml` sets `install.exact` so `bun add` writes one, and `bun run check:exact` (`scripts/exact-versions.mjs`, part of `check:repo`) fails on any range.

A dependency that more than one manifest pins takes its version from a Bun catalog in the root `package.json`, never a literal: `workspaces.catalog` holds the versions every user shares (`"catalog:"`), and `workspaces.catalogs.server` holds TypeScript 6, which the servers and libs keep behind the portal for the Nest CLI (`"catalog:server"`). The whole repo runs on Node 24, so `@types/node` stays on 24.x in every project, the portal included. Moving a shared version means editing the catalog, and `bun outdated -r` reports each catalog entry once. `stripe` is held at the SDK release pinned to `STRIPE_API_VERSION` (see `clients/stripe.ts`), and `nx.json` keeps `affected.legacy` so the PR checks select whole projects, as before Nx 24.

`trustedDependencies` in the root `package.json` is the list of packages whose install scripts Bun runs, and setting it replaces Bun's built-in default list. It names `nx` and `@parcel/watcher`, the two that ran before, and deliberately leaves out `better-sqlite3`. That package ships N-API prebuilds and marks itself `"gypfile": false`, but Bun 1.4 ignores the flag and runs `node-gyp rebuild` because a `binding.gyp` is present. Netlify has no `node-gyp`, so that one script failed every deploy at "Install dependencies". A new dependency that genuinely needs its install script has to be added to the list; `bun pm untrusted` shows any that were skipped.

Gates live in `lefthook.yml`, installed by the root `prepare` script on `bun install`: pre-commit runs `bun run lint:staged` (lint-staged, autofixing just the staged files) then `bun run system-check` (admin-portal only), pre-push runs `bun run verify` (every project). CI runs the same checks. lint-staged config is per app in `apps/*/.lintstagedrc.json`, and commands there must spell out `node_modules/.bin/<tool>` because bun keeps the bins in the app, not the root. `lefthook`'s own postinstall stays out of `trustedDependencies` on purpose, so `bun pm untrusted` lists it: `prepare` runs `lefthook install --reset-hooks-path` instead, which also unsets a `core.hooksPath` left behind by husky, since a plain `lefthook install` exits 1 when one is set and would fail `bun install` in that clone.
Expand All @@ -130,7 +134,7 @@ The repo does have linters: oxlint for TS/JS, stylelint for SCSS, oxfmt for form

Several conventions below are enforced as lint errors, not just style preferences, in `apps/admin-portal/.oxlintrc.json` under a block marked "Conventions from CLAUDE.md": no default exports, `type` over `interface`, no `any`, no non-null assertions, `eqeqeq`, `prefer-const`, `prefer-array-flat-map`. Turning one of these off to make code pass is not the fix.

There is a second oxlint and oxfmt pair at the repo root, `.oxlintrc.json` and `.oxfmtrc.json`, covering everything outside `apps/`: the `.mjs` tooling under `scripts/` and `.claude/skills/**`, the docs, and the root config files. It ignores `apps` and `libs` outright, since each project owns its own config, and it is a plain script rather than an Nx target because the repo root is not an Nx project. The oxfmt pass runs with `--disable-nested-config`: without it oxfmt discovers `apps/admin-portal/.oxfmtrc.json`, treats that app as its own formatting root, and formats its files under the root pass regardless of the ignore list. `bun run lint`, `format`, `format:check` and `verify` run it first and then fan out to the projects; `bun run lint:root`, `lint:root:fix`, `format:root` and `format:check:root` run only that pass. The root config disables four rules whose suggested fix contradicts the house style (`for…of` over `forEach`, mutating a `reduce` accumulator, mutating a mapped object, `toSorted` on an array that is already a fresh copy); each carries a comment saying so.
There is a second oxlint and oxfmt pair at the repo root, `.oxlintrc.json` and `.oxfmtrc.json`, covering everything outside `apps/`: the `.mjs` tooling under `scripts/` and `.claude/skills/**`, the docs, and the root config files. It ignores `apps` and `libs` outright, since each project owns its own config, and it is a plain script rather than an Nx target because the repo root is not an Nx project. Both passes run with `--disable-nested-config`: without it oxfmt discovers `apps/admin-portal/.oxfmtrc.json`, treats that app as its own formatting root, and formats its files under the root pass regardless of the ignore list, and oxlint (since 1.92) does the same with each project's `.oxlintrc.json`. `bun run lint`, `format`, `format:check` and `verify` run it first and then fan out to the projects; `bun run lint:root`, `lint:root:fix`, `format:root` and `format:check:root` run only that pass. The root config disables four rules whose suggested fix contradicts the house style (`for…of` over `forEach`, mutating a `reduce` accumulator, mutating a mapped object, `toSorted` on an array that is already a fresh copy); each carries a comment saying so.

Everything else here is convention, and the import-alias rule in particular has no lint rule behind it.

Expand Down
40 changes: 20 additions & 20 deletions apps/admin-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,36 @@
"@fontsource-variable/jetbrains-mono": "5.3.0",
"@fontsource-variable/nunito-sans": "5.3.0",
"@fontsource/lily-script-one": "5.3.0",
"@supabase/supabase-js": "2.116.0",
"@tanstack/query-sync-storage-persister": "5.103.1",
"@tanstack/react-query": "5.103.1",
"@tanstack/react-query-persist-client": "5.103.1",
"@supabase/supabase-js": "2.119.0",
"@tanstack/query-sync-storage-persister": "5.107.1",
"@tanstack/react-query": "5.107.1",
"@tanstack/react-query-persist-client": "5.107.1",
"@wizteros/wire": "workspace:*",
"react": "19.3.0",
"react-dom": "19.3.0",
"react-router-dom": "7.18.4",
"react": "19.3.1",
"react-dom": "19.3.1",
"react-router-dom": "7.18.5",
"recharts": "3.10.1",
"zustand": "5.0.15"
"zustand": "5.1.0"
},
"devDependencies": {
"@happy-dom/global-registrator": "20.14.5",
"@happy-dom/global-registrator": "21.0.4",
"@testing-library/jest-dom": "7.0.1",
"@testing-library/react": "16.3.3",
"@testing-library/user-event": "14.6.7",
"@types/bun": "1.4.2",
"@types/node": "26.6.1",
"@testing-library/user-event": "14.6.8",
"@types/bun": "1.4.4",
"@types/node": "catalog:",
"@types/react": "19.3.0",
"@types/react-dom": "19.3.0",
"@typescript/native-preview": "7.0.0-dev.20260707.2",
"@vitejs/plugin-react": "6.1.1",
"happy-dom": "20.14.5",
"oxfmt": "0.68.0",
"oxlint": "1.83.0",
"sass": "1.104.1",
"stylelint": "17.15.0",
"@typescript/native-preview": "catalog:",
"@vitejs/plugin-react": "6.2.1",
"happy-dom": "21.0.4",
"oxfmt": "catalog:",
"oxlint": "catalog:",
"sass": "1.108.1",
"stylelint": "18.0.0",
"stylelint-config-recommended-scss": "17.0.1",
"typescript": "7.0.2",
"vite": "8.3.0"
"vite": "8.3.6"
},
"nx": {
"projectType": "application",
Expand Down
30 changes: 15 additions & 15 deletions apps/fleet-monitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@
"test:watch": "vitest"
},
"dependencies": {
"@nestjs/common": "12.1.0",
"@nestjs/core": "12.1.0",
"@nestjs/platform-fastify": "12.1.0",
"@nestjs/common": "catalog:",
"@nestjs/core": "catalog:",
"@nestjs/platform-fastify": "catalog:",
"@wizteros/server-common": "workspace:*",
"@wizteros/wire": "workspace:*",
"reflect-metadata": "0.2.2",
"rxjs": "7.8.2",
"zod": "4.6.5"
"reflect-metadata": "catalog:",
"rxjs": "catalog:",
"zod": "catalog:"
},
"devDependencies": {
"@nestjs/cli": "12.0.7",
"@nestjs/testing": "12.1.0",
"@types/node": "24.19.0",
"@typescript/native-preview": "7.0.0-dev.20260707.2",
"jose": "6.2.12",
"oxfmt": "0.68.0",
"oxlint": "1.83.0",
"typescript": "6.0.3",
"vitest": "5.0.2"
"@nestjs/cli": "catalog:",
"@nestjs/testing": "catalog:",
"@types/node": "catalog:",
"@typescript/native-preview": "catalog:",
"jose": "catalog:",
"oxfmt": "catalog:",
"oxlint": "catalog:",
"typescript": "catalog:server",
"vitest": "catalog:"
},
"nx": {
"includedScripts": [
Expand Down
34 changes: 17 additions & 17 deletions apps/stripe-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@
"refresh:libraries": "node --env-file=../../.env scripts/refresh-library-snapshot.mjs"
},
"dependencies": {
"@nestjs/common": "12.1.0",
"@nestjs/core": "12.1.0",
"@nestjs/platform-fastify": "12.1.0",
"@nestjs/common": "catalog:",
"@nestjs/core": "catalog:",
"@nestjs/platform-fastify": "catalog:",
"@wizteros/server-common": "workspace:*",
"@wizteros/wire": "workspace:*",
"fast-xml-parser": "5.11.1",
"nodemailer": "10.0.10",
"reflect-metadata": "0.2.2",
"rxjs": "7.8.2",
"fast-xml-parser": "5.12.0",
"nodemailer": "10.3.1",
"reflect-metadata": "catalog:",
"rxjs": "catalog:",
"stripe": "22.3.2",
"zod": "4.6.5"
"zod": "catalog:"
},
"devDependencies": {
"@nestjs/cli": "12.0.7",
"@nestjs/testing": "12.1.0",
"@types/node": "24.19.0",
"@typescript/native-preview": "7.0.0-dev.20260707.2",
"jose": "6.2.12",
"oxfmt": "0.68.0",
"oxlint": "1.83.0",
"typescript": "6.0.3",
"vitest": "5.0.2"
"@nestjs/cli": "catalog:",
"@nestjs/testing": "catalog:",
"@types/node": "catalog:",
"@typescript/native-preview": "catalog:",
"jose": "catalog:",
"oxfmt": "catalog:",
"oxlint": "catalog:",
"typescript": "catalog:server",
"vitest": "catalog:"
},
"nx": {
"includedScripts": [
Expand Down
Loading
Loading