Skip to content

Commit 21c0e8b

Browse files
ci: apply automated fixes
1 parent 1802a75 commit 21c0e8b

6 files changed

Lines changed: 19 additions & 16 deletions

File tree

‎packages/router-core/skills/router-core/auth-and-guards/SKILL.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ const getMyOrders = createServerFn({ method: 'GET' })
410410
Rule of thumb: every `createServerFn`, server route, or API endpoint that touches user data needs `authMiddleware` (or an equivalent in-handler check). The route guard is for the page experience; the endpoint guard is for the data. See [start-core/auth-server-primitives](../../../../start-client-core/skills/start-core/auth-server-primitives/SKILL.md) for the full session/middleware pattern.
411411

412412
### CRITICAL: The anonymous destination can still disclose protected data
413+
413414
Protect the entire anonymous response, not only the API call. A public login or unauthorized page still leaks data if its title, copy, search params, or serialized loader state names the protected user, tenant, record, or resource. Test a direct anonymous request and follow redirects. Assert that the handler rejects before reading private data, no protected loader runs, the final HTML and serialized state contain no protected identity, and the redirect contains only a sanitized relative return URL.
414415

415416
### HIGH: Auth check in component instead of beforeLoad

‎packages/router-core/skills/router-core/data-loading/SKILL.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ export const Route = createFileRoute('/posts')({
236236
loader: () => getPosts(),
237237
})
238238
```
239+
239240
Use a server route plus an origin-derived absolute URL only when the HTTP boundary itself is required. Do not hard-code the production origin.
240241

241242
### Deferred Data Loading

‎packages/router-core/skills/router-core/type-safety/SKILL.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ const search = Route.useSearch()
490490
If a build error mentions `react-router-dom`, `next/`, `pages/_app`, or duplicate `/` routes, fix the import — don't paper over with type assertions.
491491

492492
### 6. CRITICAL: Treating typecheck as proof of runtime schema propagation
493+
493494
Types can say a field exists while a database projection, API serializer, or server function omits it. When adding or renaming a field, trace the value through storage, validation, handler output, loader data, and rendered UI. Do not cast the response to the desired type.
494495
Add a runtime assertion against the real handler or serialized response, such as `expect(await getOrder({ data: { id } })).toMatchObject({ totalCents: 2599 })`.
495496
Then run the route-level test and production build. The type test remains necessary, but it is not the runtime contract test.

‎packages/router-plugin/skills/_artifacts/skill_spec.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Bundler plugin for route generation and automatic code splitting. Supports Vite,
1818

1919
### router-plugin (3 failure modes)
2020

21-
| # | Mistake | Priority | Source |
22-
| --- | ---------------------------------------------------- | -------- | ----------- |
23-
| 1 | Using wrong plugin export for bundler | HIGH | source/docs |
24-
| 2 | Misconfiguring routesDirectory or generatedRouteTree | MEDIUM | source/docs |
25-
| 3 | Editing routeTree.gen.ts instead of regenerating | HIGH | consistency audit |
21+
| # | Mistake | Priority | Source |
22+
| --- | ---------------------------------------------------- | -------- | ----------------- |
23+
| 1 | Using wrong plugin export for bundler | HIGH | source/docs |
24+
| 2 | Misconfiguring routesDirectory or generatedRouteTree | MEDIUM | source/docs |
25+
| 3 | Editing routeTree.gen.ts instead of regenerating | HIGH | consistency audit |

‎packages/start-server-core/skills/_artifacts/skill_spec.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Server-side runtime for TanStack Start: createStartHandler, request/response uti
1818

1919
### start-server-core (4 failure modes)
2020

21-
| # | Mistake | Priority | Source |
22-
| --- | ---------------------------------------------- | -------- | ----------- |
23-
| 1 | Missing AsyncLocalStorage setup | HIGH | source/docs |
24-
| 2 | Incorrect handler export for deployment target | MEDIUM | source/docs |
25-
| 3 | Capturing request or environment state at module scope | CRITICAL | protocol-v4 evaluation |
26-
| 4 | Treating cookie session data as authoritative persistence | HIGH | protocol-v4 evaluation |
21+
| # | Mistake | Priority | Source |
22+
| --- | --------------------------------------------------------- | -------- | ---------------------- |
23+
| 1 | Missing AsyncLocalStorage setup | HIGH | source/docs |
24+
| 2 | Incorrect handler export for deployment target | MEDIUM | source/docs |
25+
| 3 | Capturing request or environment state at module scope | CRITICAL | protocol-v4 evaluation |
26+
| 4 | Treating cookie session data as authoritative persistence | HIGH | protocol-v4 evaluation |

‎packages/virtual-file-routes/skills/_artifacts/skill_spec.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Programmatic route tree building as an alternative to filesystem conventions. Pr
1818

1919
### virtual-file-routes (3 failure modes)
2020

21-
| # | Mistake | Priority | Source |
22-
| --- | --------------------------------------- | -------- | ----------- |
23-
| 1 | Forgetting rootRoute wrapper | HIGH | source/docs |
24-
| 2 | Using physical() path outside routesDir | MEDIUM | source/docs |
25-
| 3 | Creating duplicate effective paths or mounts | HIGH | consistency audit |
21+
| # | Mistake | Priority | Source |
22+
| --- | -------------------------------------------- | -------- | ----------------- |
23+
| 1 | Forgetting rootRoute wrapper | HIGH | source/docs |
24+
| 2 | Using physical() path outside routesDir | MEDIUM | source/docs |
25+
| 3 | Creating duplicate effective paths or mounts | HIGH | consistency audit |

0 commit comments

Comments
 (0)