# Source limits and errors

## Production checks

- Sources are read-only. Use Workspace for durable sync, path rules, diffs, snapshots, or scoped Agent access.
- Read secrets for private origins, such as a GitHub token, from Server Env or a trusted `auth` callback, never from model input. Without `auth`, `github()` reads `VITEHUB_GITHUB_TOKEN`, then `FORGES_GITHUB_TOKEN`.
- Paths are relative to the root. On every host, ViteHub rejects absolute paths, `..`, Windows drive paths such as `C:secrets.txt`, and null bytes.
- `file()` follows a symlink only when its target stays inside the root. `glob()` rejects an item when the file or a parent folder is a symlink, unless `followSymlinks: true` and the target stays inside the root. These checks select files; they do not guard against changes made at the same time.
- Local Workspace stores are stricter and reject symlinks.
- Name each `cachedSource()` cache after its origin and access scope. Do not share a cache name between callers who see different data.
- `cursor` and `limit` are reserved Collection query parameters. Invalid limits, cursors, and filters return HTTP `400`.
- `array()` Collections tie each cursor to the data digest and query. A cursor used after the data changed, or with another filter or search, returns HTTP `409` with `SOURCE_R0027`. Reload from the first page.
- `array()` loads the whole array on each request. Keep it small enough to filter in memory, or use `table()`.
- Collection `authorize` controls the whole route. It does not filter rows per user.

<!-- vitehub-docs:section-links -->
## In this section

- [Overview](https://vitehub.dev/raw/docs/source.md)
- [Get started](https://vitehub.dev/raw/docs/source/get-started.md)
- [Configure](https://vitehub.dev/raw/docs/source/configure.md)
- [Server API](https://vitehub.dev/raw/docs/source/server-api.md)
- [Hosts](https://vitehub.dev/raw/docs/source/hosts.md)
- [Limits and errors](https://vitehub.dev/raw/docs/source/limits-and-errors.md) (this page)

Next: [SOURCE_R0008](https://vitehub.dev/raw/docs/source/diagnostics/source_r0008.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
