mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-03 21:51:22 +09:00
Two more shards were red on generated artifacts nobody regenerated: - api_controller_boundary_baseline.json: the attachment round rewrote _persist_user_message to build the row before adding it, so the fingerprint moved from `db.session.add(AiMessage(...))` to `db.session.add(message)`. Same crossing, same category, count unchanged at 509 -- one line. - docs/MIGRATION_INVENTORY.md: three measured numbers had moved without a regeneration -- bare @jwt_required() routes 577 -> 576, and the two frontend rows whose totals come from maps inside check-frontend-boundaries.mjs (setInterval pollers 10 -> 9, hex colour literals 151 -> 150). All three are deterministic AST/constant counts, so these are CI's numbers, not this box's. The reason nobody caught the inventory locally is the third fix here: the generator hardcoded `node`, and under WSL the Windows nvm directory is on PATH but exposes only `node.exe`, so test_migration_inventory.py skipped on the dev box. Both the generator and the test now resolve $NODE / node / node.exe, and the test runs instead of skipping. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2.6 KiB
2.6 KiB
Remaining-migration inventory
Plan 76 closure artifact (milestone H). Each row is a cross-cutting
concern whose door exists and is guarded by an executable ratchet; the
"remaining" column is the measured legacy population that has not yet
walked through it. A row at 0 is a completed migration held as an
invariant. Rows marked REGISTERED EXCEPTION are deliberate policy, not
debt. Regenerate with python scripts/generate-migration-inventory.py.
| Concern | Door | Remaining | Ceiling | Policy |
|---|---|---|---|---|
| Identity lookups outside rbac.get_current_user() | rbac.get_current_user() | 69 | 69 | JWT-only routes; the API-key-capable population is held at 0 by a companion assertion |
| Routes on bare @jwt_required() | auth_required() / role decorators | 576 | 577 | REGISTERED EXCEPTION: JWT-only is the deliberate default; conversion grants API-key access and happens per route, on decision |
| HTTP statuses chosen by sniffing error text | typed errors from app.exceptions | 0 | 0 | INVARIANT at 0 - migration completed 2026-08-19 |
| API crashes swallowed without recording | app.error_reporting | 0 | 0 | INVARIANT at 0 |
| Hand-shaped {'error': ...} bodies in app/api | typed errors + the global handler | 1144 | 1144 | migrate when touched; new endpoints raise |
| Raw subprocess calls outside the runners | app/utils/system.py runners | 24 | 24 | migrate when touched |
| Controller-boundary violations (routes doing service work) | service layer extraction | 509 | 509 | migrate when touched (first-wave ratchet) |
| raw api.* calls in pages/ | E1: useServerQuery/useServerMutation | 460 | 460 | migrate when touched |
| per-page toast.error extractions in pages/ | E1: query-layer error presentation | 264 | 264 | migrate when touched |
| hand-rolled form-group blocks | F2: FormField/useForm | 343 | 343 | migrate when touched |
| unencoded ?k=${v} query interpolations in services/api | C4: buildQuery/encoding template | 97 | 97 | migrate when touched |
| raw setInterval pollers | E2: usePolling/refetchInterval | 9 | 9 | DELIBERATE RESIDUE: clock ticks, socket-fallback hooks, and sibling-repo extension timers - each listed per file |
| direct navigator.clipboard call sites | F3: copyToClipboard | 0 | 0 | INVARIANT at 0 |
| hex colour literals outside token files | G: var(--token) | 150 | 150 | migrate when touched |
| SCSS class names defined in multiple files | single-owner partials | 114 | 114 | needs eyes on pages (no byte-identical proof available) |