The problem
docs/content/reference/context-api.md imports getContext from @opensaas/stack-core/context in four places. That subpath is not exported by the package at all, so every one of those samples fails to resolve for a reader who copies it.
Found by a mechanical sweep while fixing the same class of error in the RAG docs on PR #1293. Two more instances there — import { sudo } from '@opensaas/stack-core/context' — were fixed on that PR because they sat inside blocks it had rewritten. These four are pre-existing and in a non-RAG file, so they were left alone rather than widening that diff.
Worth confirming while fixing: sudo is reached as context.sudo() returning a sudo context, not as a free function taking a promise. If context-api.md documents it the other way, that is wrong too.
What to do
Point the samples at the path that genuinely exports getContext, and check the rest of the file's imports the same way.
Worth doing at the same time
Nothing catches this class of error. Markdown is not typechecked, and the docs link-check only validates internal links, so a documentation sample importing from a non-existent subpath builds green and ships. The sweep that found these was a throwaway script parsing every @opensaas/… import in the changed files against the built export surfaces.
That script, made permanent and run over all of docs/content/, would close the gap for good. It is closely related to #1278, which records the same shape of hole for pnpm generate.
Context
Generated by Claude Code
The problem
docs/content/reference/context-api.mdimportsgetContextfrom@opensaas/stack-core/contextin four places. That subpath is not exported by the package at all, so every one of those samples fails to resolve for a reader who copies it.Found by a mechanical sweep while fixing the same class of error in the RAG docs on PR #1293. Two more instances there —
import { sudo } from '@opensaas/stack-core/context'— were fixed on that PR because they sat inside blocks it had rewritten. These four are pre-existing and in a non-RAG file, so they were left alone rather than widening that diff.Worth confirming while fixing:
sudois reached ascontext.sudo()returning a sudo context, not as a free function taking a promise. Ifcontext-api.mddocuments it the other way, that is wrong too.What to do
Point the samples at the path that genuinely exports
getContext, and check the rest of the file's imports the same way.Worth doing at the same time
Nothing catches this class of error. Markdown is not typechecked, and the docs link-check only validates internal links, so a documentation sample importing from a non-existent subpath builds green and ships. The sweep that found these was a throwaway script parsing every
@opensaas/…import in the changed files against the built export surfaces.That script, made permanent and run over all of
docs/content/, would close the gap for good. It is closely related to #1278, which records the same shape of hole forpnpm generate.Context
Generated by Claude Code