Context Propagation
sqry context-propagation finds Go context.Context plumbing breaks using the same graph-backed query exposed through the context_propagation MCP tool.
What It Detects
break_site— a synchronous caller has acontext.Contextparameter, the callee acceptscontext.Context, but the call passes no context argument.unthreaded_goroutine— ago callee(...)invocation calls a function that acceptscontext.Contextwithout passing context.http_handler_leak— an HTTP handler-shaped caller invokes a context-accepting callee without threadingr.Context().
CLI Usage
sqry context-propagation [PATH] [--scope <SCOPE>] [--mode <MODE>] [--limit <N>] [--json]
| Flag | Default | Description |
|---|---|---|
[PATH] | . | Workspace path. sqry walks up to the nearest .sqry-index when needed. |
--scope | global | global or file:<path>. File paths can be relative to the workspace root. |
--mode | all | all, break-site, unthreaded-goroutine, or http-handler-leak. |
--limit | 1000 | Maximum number of leak records to print. |
--json, -j | off | Emit machine-readable JSON. |
Examples
# All context propagation findings in the workspace
sqry context-propagation
# Only HTTP-handler leaks
sqry context-propagation --mode http-handler-leak
# Restrict to one file
sqry context-propagation --scope file:src/handler.go
# JSON for CI or agent workflows
sqry context-propagation --json --limit 10
MCP Tool
The standalone MCP server exposes the same analysis as context_propagation.
Key parameters: path (string), scope (object, default { "kind": "global" }, or { "kind": "file", "path": "src/handler.go" }), mode (all/break_site/unthreaded_goroutine/http_handler_leak, default all), max_results (int, default 200).
Example:
{
"path": ".",
"scope": { "kind": "file", "path": "src/handler.go" },
"mode": "http_handler_leak",
"max_results": 50
}
Zero findings is a successful result, not an error.