Scopes
A scope tells Kerno which entry points to list.
A scope narrows Kerno's view of your application to a subset of entry points. It is a required argument on kerno_list_endpoints.
The four scopes
all
Every entry point in the selected application
changed
Only entry points affected by your current git changes
file:path/to/handler.ts
Entry points defined in that source file
endpoint:METHOD /path
A single route, identified by HTTP method and path
When to use each
all. Surveying an application, or checking overall coverage.changed. The everyday one. Kerno compares your working tree againstHEAD, including both staged and unstaged changes. A new file counts once it is staged, and a change stops counting once you commit it. Kerno resolves which entry points your edits reach. It follows the call graph rather than just the file you edited, so a change to a shared helper surfaces every entry point downstream of it. Touched scenario files count too, not only handlers. It also reports the user flows that cross those entry points, so they can be re-run too.file:. Focused changes to one handler file.endpoint:. A single route you already have in mind.
Syntax
file: paths are interpreted relative to your workspace root.
endpoint: expects exactly one space between the method and the path, as in endpoint:POST /api/orders. The method is uppercased for you and the path normalized, but both must be present.
Where scopes apply
Scopes are used by kerno_list_endpoints, where the argument is required.
How scopes work behind the scenes
Kerno's dependency graph maps every entry point to the code that produces it. When you pick a scope, Kerno resolves it to a concrete list of entry points and works from that list.
See Change Validation for how the changed scope fits into the everyday loop.
Last updated